mirror of
https://github.com/MariaDB/server.git
synced 2025-11-12 10:22:39 +03:00
The following is an excerption from the WL.
1. Change so that MIXED is default format
1.1 to change the default for command line --binlog-format
1.2 to alter global_system_variables.binlog_format calculation
basing on command line --binlog-format parameter and
its default.
2. Change test suite so that more testing is done by MIXED format.
2.1 to check if there are test cases requiring --binlog-foramt=statement via
`source include/have_binlog_format_statement.inc' and affected by
altering the latter to be "mixed".
2.2 to check the content of such vulnerable cases to find if
extending to the mixed does not modify results. In that case simply
substitute source arguments as explained.
2.3 if a test in mixed mode deals with features triggering
row-binlogging then if necessary we can switch explicitly
to statement mode or create another test to run with
non-recommended STATEMENT mode
Particullarily, extracting INSERT DELAYED
binlogging subtest for statement mode is performed, and
the snippet is moved into a separate test file.
Note that since now all three modes verify this use case
through 3 different tests.
No changes in item 3 of HLD appeared to be needed.
74 lines
1.8 KiB
Plaintext
74 lines
1.8 KiB
Plaintext
-- source include/have_ndb.inc
|
|
-- source include/have_multi_ndb.inc
|
|
-- source include/not_embedded.inc
|
|
-- source include/have_binlog_format_mixed_or_statement.inc
|
|
|
|
--disable_warnings
|
|
connection server2;
|
|
drop table if exists t1, t2, t3, t4;
|
|
connection server1;
|
|
drop table if exists t1, t2, t3, t4;
|
|
--enable_warnings
|
|
|
|
flush status;
|
|
|
|
# Create test tables on server1
|
|
create table t1 (a int) engine=ndbcluster;
|
|
create table t2 (a int) engine=ndbcluster;
|
|
insert into t1 value (2);
|
|
insert into t2 value (3);
|
|
select * from t1;
|
|
select * from t2;
|
|
show status like 'handler_discover%';
|
|
|
|
# Check dropping and recreating table on same server
|
|
connect (con1,localhost,,,test);
|
|
connect (con2,localhost,,,test);
|
|
connection con1;
|
|
select * from t1;
|
|
connection con2;
|
|
drop table t1;
|
|
create table t1 (a int) engine=ndbcluster;
|
|
insert into t1 value (2);
|
|
connection con1;
|
|
select * from t1;
|
|
|
|
# Check dropping and recreating table on different server
|
|
connection server2;
|
|
show status like 'handler_discover%';
|
|
drop table t1;
|
|
create table t1 (a int) engine=ndbcluster;
|
|
insert into t1 value (2);
|
|
connection server1;
|
|
## Currently a retry is required remotely
|
|
#--error 1412
|
|
#select * from t1;
|
|
#show warnings;
|
|
#flush table t1;
|
|
# Table definition change should be propagated automatically
|
|
select * from t1;
|
|
|
|
# Connect to server2 and use the tables from there
|
|
connection server2;
|
|
flush status;
|
|
select * from t1;
|
|
update t1 set a=3 where a=2;
|
|
show status like 'handler_discover%';
|
|
|
|
# Create a new table on server2
|
|
create table t3 (a int not null primary key, b varchar(22),
|
|
c int, last_col text) engine=ndb;
|
|
insert into t3 values(1, 'Hi!', 89, 'Longtext column');
|
|
create table t4 (pk int primary key, b int) engine=ndb;
|
|
|
|
# Check that the tables are accessible from server1
|
|
connection server1;
|
|
select * from t1;
|
|
select * from t3;
|
|
show tables like 't4';
|
|
show tables;
|
|
|
|
drop table t1, t2, t3, t4;
|
|
|
|
# End of 4.1 tests
|