mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#30907
"Regression: "--innodb_autoinc_lock_mode=0" (off) not same as older releases" Bug#28430 "Failure in replication of innodb partitioned tables on row/mixed format" Bug#30888 "Innodb table + stored procedure + row deletion = server crash" Apply Oracle patch from Sunny Include tests cases by Omer Ensure that innobase_read_and_init_auto performs table autoinc lock when lock_mode = 0 No need for "if" guard around row_unlock_table_autoinc_for_mysql() because it already performs same check. Make autoinc_lock_mode variable read-only for duration of running mysqld process. storage/innobase/handler/ha_innodb.cc: Bug30907/28430 "Regression: "--innodb_autoinc_lock_mode=0" (off) not same as older releases" "Failure in replication of innodb partitioned tables on row/mixed format" Apply Oracle patch from Sunny Ensure that innobase_read_and_init_auto performs table autoinc lock when lock_mode = 0 No need for "if" guard around row_unlock_table_autoinc_for_mysql() because it already performs same check. Make autoinc_lock_mode variable read-only for duration of running mysqld process. storage/innobase/row/row0sel.c: Bug30888 "Innodb table + stored procedure + row deletion = server crash" Remove endian-specific code. Fix function row_search_autoinc_read_column() to handle any integer size up to 8 bytes. mysql-test/suite/rpl/r/rpl_innodb_bug28430.result: New BitKeeper file ``mysql-test/suite/rpl/r/rpl_innodb_bug28430.result'' mysql-test/suite/rpl/r/rpl_innodb_bug30888.result: New BitKeeper file ``mysql-test/suite/rpl/r/rpl_innodb_bug30888.result'' mysql-test/suite/rpl/t/rpl_innodb-master.opt: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb-master.opt'' mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt'' mysql-test/suite/rpl/t/rpl_innodb_bug28430.test: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug28430.test'' mysql-test/suite/rpl/t/rpl_innodb_bug30888.test: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30888.test''
This commit is contained in:
163
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
Normal file
163
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
Normal file
@ -0,0 +1,163 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP DATABASE IF EXISTS test;
|
||||
CREATE DATABASE test;
|
||||
use test;
|
||||
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||
fkid MEDIUMINT, filler VARCHAR(255),
|
||||
PRIMARY KEY(id)) ENGINE='innodb';
|
||||
CREATE TABLE test.bykey_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||
fkid MEDIUMINT, filler VARCHAR(255),
|
||||
PRIMARY KEY(id)) ENGINE='innodb'
|
||||
PARTITION BY KEY(id) partitions 5;
|
||||
CREATE TABLE test.byrange_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||
fkid MEDIUMINT, filler VARCHAR(255),
|
||||
PRIMARY KEY(id)) ENGINE='innodb'
|
||||
PARTITION BY RANGE(id)
|
||||
SUBPARTITION BY hash(id) subpartitions 2
|
||||
(PARTITION pa1 values less than (10),
|
||||
PARTITION pa2 values less than (20),
|
||||
PARTITION pa3 values less than (30),
|
||||
PARTITION pa4 values less than (40),
|
||||
PARTITION pa5 values less than (50),
|
||||
PARTITION pa6 values less than (60),
|
||||
PARTITION pa7 values less than (70),
|
||||
PARTITION pa8 values less than (80),
|
||||
PARTITION pa9 values less than (90),
|
||||
PARTITION pa10 values less than (100),
|
||||
PARTITION pa11 values less than MAXVALUE);
|
||||
CREATE PROCEDURE test.proc_norm()
|
||||
BEGIN
|
||||
DECLARE ins_count INT DEFAULT 1000;
|
||||
DECLARE del_count INT;
|
||||
DECLARE cur_user VARCHAR(255);
|
||||
DECLARE local_uuid VARCHAR(255);
|
||||
DECLARE local_time TIMESTAMP;
|
||||
SET local_time= NOW();
|
||||
SET cur_user= CURRENT_USER();
|
||||
SET local_uuid= UUID();
|
||||
WHILE ins_count > 0 DO
|
||||
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||
ins_count,'Going to test MBR for MySQL');
|
||||
SET ins_count = ins_count - 1;
|
||||
END WHILE;
|
||||
SELECT MAX(id) FROM test.regular_tbl INTO del_count;
|
||||
WHILE del_count > 0 DO
|
||||
DELETE FROM test.regular_tbl WHERE id = del_count;
|
||||
SET del_count = del_count - 2;
|
||||
END WHILE;
|
||||
END|
|
||||
CREATE PROCEDURE test.proc_bykey()
|
||||
BEGIN
|
||||
DECLARE ins_count INT DEFAULT 1000;
|
||||
DECLARE del_count INT;
|
||||
DECLARE cur_user VARCHAR(255);
|
||||
DECLARE local_uuid VARCHAR(255);
|
||||
DECLARE local_time TIMESTAMP;
|
||||
SET local_time= NOW();
|
||||
SET cur_user= CURRENT_USER();
|
||||
SET local_uuid= UUID();
|
||||
WHILE ins_count > 0 DO
|
||||
INSERT INTO test.bykey_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||
ins_count,'Going to test MBR for MySQL');
|
||||
SET ins_count = ins_count - 1;
|
||||
END WHILE;
|
||||
SELECT MAX(id) FROM test.bykey_tbl INTO del_count;
|
||||
WHILE del_count > 0 DO
|
||||
DELETE FROM test.bykey_tbl WHERE id = del_count;
|
||||
SET del_count = del_count - 2;
|
||||
END WHILE;
|
||||
END|
|
||||
CREATE PROCEDURE test.proc_byrange()
|
||||
BEGIN
|
||||
DECLARE ins_count INT DEFAULT 1000;
|
||||
DECLARE del_count INT;
|
||||
DECLARE cur_user VARCHAR(255);
|
||||
DECLARE local_uuid VARCHAR(255);
|
||||
DECLARE local_time TIMESTAMP;
|
||||
SET local_time= NOW();
|
||||
SET cur_user = CURRENT_USER();
|
||||
SET local_uuid=UUID();
|
||||
WHILE ins_count > 0 DO
|
||||
INSERT INTO test.byrange_tbl VALUES (NULL, NOW(), USER(), UUID(),
|
||||
ins_count,'Going to test MBR for MySQL');
|
||||
SET ins_count = ins_count - 1;
|
||||
END WHILE;
|
||||
SELECT MAX(id) FROM test.byrange_tbl INTO del_count;
|
||||
WHILE del_count > 0 DO
|
||||
DELETE FROM test.byrange_tbl WHERE id = del_count;
|
||||
SET del_count = del_count - 2;
|
||||
END WHILE;
|
||||
END|
|
||||
CALL test.proc_norm();
|
||||
SELECT count(*) as "Master regular" FROM test.regular_tbl;
|
||||
Master regular 500
|
||||
CALL test.proc_bykey();
|
||||
SELECT count(*) as "Master bykey" FROM test.bykey_tbl;
|
||||
Master bykey 811
|
||||
CALL test.proc_byrange();
|
||||
SELECT count(*) as "Master byrange" FROM test.byrange_tbl;
|
||||
Master byrange 996
|
||||
show create table test.byrange_tbl;
|
||||
Table byrange_tbl
|
||||
Create Table CREATE TABLE `byrange_tbl` (
|
||||
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
|
||||
`dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`user` char(255) DEFAULT NULL,
|
||||
`uuidf` longblob,
|
||||
`fkid` mediumint(9) DEFAULT NULL,
|
||||
`filler` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (30) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (40) ENGINE = MyISAM, PARTITION pa5 VALUES LESS THAN (50) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (60) ENGINE = MyISAM, PARTITION pa7 VALUES LESS THAN (70) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (80) ENGINE = MyISAM, PARTITION pa9 VALUES LESS THAN (90) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
show slave status;
|
||||
Slave_IO_State Waiting for master to send event
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port 12000
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 776796
|
||||
Relay_Log_File slave-relay-bin.000003
|
||||
Relay_Log_Pos 776942
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 776796
|
||||
Relay_Log_Space 777097
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master 0
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
SELECT count(*) "Slave norm" FROM test.regular_tbl;
|
||||
Slave norm 500
|
||||
SELECT count(*) "Slave bykey" FROM test.bykey_tbl;
|
||||
Slave bykey 811
|
||||
SELECT count(*) "Slave byrange" FROM test.byrange_tbl;
|
||||
Slave byrange 996
|
Reference in New Issue
Block a user