mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-28 17:15:19 +03:00 
			
		
		
		
	 eb65479127
			
		
	
	eb65479127
	
	
	
		
			
			Fixes the following bugs: Bug #30706: SQL thread on slave is allowed to block client queries when slave load is high Add (innodb|innobase|srv)_replication_delay MySQL config parameter. Bug #30888: Innodb table + stored procedure + row deletion = server crash While adding code for the low level read of the AUTOINC value from the index, the case for MEDIUM ints which are 3 bytes was missed triggering an assertion. Bug #30907: Regression: "--innodb_autoinc_lock_mode=0" (off) not same as older releases We don't rely on *first_value to be 0 when checking whether get_auto_increment() has been invoked for the first time in a multi-row INSERT. We instead use trx_t::n_autoinc_rows. Initialize trx::n_autoinc_rows inside ha_innobase::start_stmt() too. Bug #31444: "InnoDB: Error: MySQL is freeing a thd" in innodb_mysql.test ha_innobase::external_lock(): Update prebuilt->mysql_has_locked and trx->n_mysql_tables_in_use only after row_lock_table_for_mysql() returns DB_SUCCESS. A timeout on LOCK TABLES would lead to an inconsistent state, which would cause trx_free() to print a warning. Bug #31494: innodb + 5.1 + read committed crash, assertion Set an error code when a deadlock occurs in semi-consistent read.
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # This test runs with old-style locking, as:
 | |
| # --innodb-autoinc-lock-mode=0
 | |
| 
 | |
| -- source include/have_innodb.inc
 | |
| 
 | |
| --disable_warnings
 | |
| drop table if exists t1;
 | |
| --enable_warnings
 | |
| 
 | |
| 
 | |
| #
 | |
| # Search on unique key
 | |
| #
 | |
| 
 | |
| CREATE TABLE t1 (
 | |
|   id int(11) NOT NULL auto_increment,
 | |
|   ggid varchar(32) binary DEFAULT '' NOT NULL,
 | |
|   email varchar(64) DEFAULT '' NOT NULL,
 | |
|   passwd varchar(32) binary DEFAULT '' NOT NULL,
 | |
|   PRIMARY KEY (id),
 | |
|   UNIQUE ggid (ggid)
 | |
| ) ENGINE=innodb;
 | |
| 
 | |
| insert into t1 (ggid,passwd) values ('test1','xxx');
 | |
| insert into t1 (ggid,passwd) values ('test2','yyy');
 | |
| -- error ER_DUP_ENTRY
 | |
| insert into t1 (ggid,passwd) values ('test2','this will fail');
 | |
| -- error ER_DUP_ENTRY
 | |
| insert into t1 (ggid,id) values ('this will fail',1);
 | |
| 
 | |
| select * from t1 where ggid='test1';
 | |
| select * from t1 where passwd='xxx';
 | |
| select * from t1 where id=2;
 | |
| 
 | |
| replace into t1 (ggid,id) values ('this will work',1);
 | |
| replace into t1 (ggid,passwd) values ('test2','this will work');
 | |
| -- error ER_DUP_ENTRY
 | |
| update t1 set id=100,ggid='test2' where id=1;
 | |
| select * from t1;
 | |
| select * from t1 where id=1;
 | |
| select * from t1 where id=999;
 | |
| drop table t1;
 | |
| 
 | |
| --echo End of tests
 |