mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 18:36:12 +01:00 
			
		
		
		
	 745a9f92ec
			
		
	
	
	745a9f92ec
	
	
	
		
			
			mysql-test/r/mysqld--help-notwin.result: consequence of introducing opt_autocommit and its default mysql-test/suite/sys_vars/r/autocommit_func4.result: Before this fix, this test would have shown @@global.autocommit == 0 in spite of --autocommit=on. mysql-test/suite/sys_vars/r/autocommit_func5.result: result unchanged by the fix sql/mysqld.cc: atoi(argument) was reliable for =0|1 parameters. Now that boolean options must support =on/off/true/false, atoi(argument) is wrong (being always 0 for those strings). Instead, let the internal logic of my_getopt (in particular get_bool_argument()) set a boolean opt_autocommit properly, and use that to set global_system_variables.option_bits.
		
			
				
	
	
		
			46 lines
		
	
	
	
		
			822 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
	
		
			822 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| CREATE TABLE t1
 | |
| (
 | |
| id INT NOT NULL auto_increment,
 | |
| PRIMARY KEY (id),
 | |
| name varchar(30)
 | |
| ) ENGINE = INNODB;
 | |
| SELECT @@global.autocommit;
 | |
| @@global.autocommit
 | |
| 1
 | |
| SELECT @@autocommit;
 | |
| @@autocommit
 | |
| 1
 | |
| INSERT into t1(name) values('Record_1');
 | |
| INSERT into t1(name) values('Record_2');
 | |
| SELECT * from t1;
 | |
| id	name
 | |
| 1	Record_1
 | |
| 2	Record_2
 | |
| ROLLBACK;
 | |
| SELECT * from t1;
 | |
| id	name
 | |
| 1	Record_1
 | |
| 2	Record_2
 | |
| set @@global.autocommit = 1-@@global.autocommit;
 | |
| set @@autocommit = 1-@@autocommit;
 | |
| SELECT @@global.autocommit;
 | |
| @@global.autocommit
 | |
| 0
 | |
| SELECT @@autocommit;
 | |
| @@autocommit
 | |
| 0
 | |
| INSERT into t1(name) values('Record_1');
 | |
| INSERT into t1(name) values('Record_2');
 | |
| SELECT * from t1;
 | |
| id	name
 | |
| 1	Record_1
 | |
| 2	Record_2
 | |
| 3	Record_1
 | |
| 4	Record_2
 | |
| ROLLBACK;
 | |
| SELECT * from t1;
 | |
| id	name
 | |
| 1	Record_1
 | |
| 2	Record_2
 | |
| DROP TABLE t1;
 | |
| set @@global.autocommit = 1-@@global.autocommit;
 |