mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	"strict mode: inserts autogenerated auto_increment value bigger than max" Strict mode should fail if autoincrement value is out of range include/my_base.h: Add new handler error codes sql/ha_berkeley.cc: handle error in update_auto_increment() sql/ha_heap.cc: handle error in update_auto_increment() sql/ha_innodb.cc: handle error in update_auto_increment() sql/ha_myisam.cc: handle error in update_auto_increment() sql/ha_myisammrg.cc: handle error in update_auto_increment() sql/ha_ndbcluster.cc: handle error in update_auto_increment() sql/handler.cc: return error from handler::update_auto_increment() sql/handler.h: change return type of handler::update_auto_increment() to int sql/share/errmsg.txt: new error message for auto-increment mysql-test/include/strict_autoinc.inc: New BitKeeper file ``mysql-test/include/strict_autoinc.inc'' mysql-test/r/strict_autoinc_1myisam.result: New BitKeeper file ``mysql-test/r/strict_autoinc_1myisam.result'' mysql-test/r/strict_autoinc_2innodb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_2innodb.result'' mysql-test/r/strict_autoinc_3heap.result: New BitKeeper file ``mysql-test/r/strict_autoinc_3heap.result'' mysql-test/r/strict_autoinc_4bdb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_4bdb.result'' mysql-test/r/strict_autoinc_5ndb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_5ndb.result'' mysql-test/t/strict_autoinc_1myisam.test: New BitKeeper file ``mysql-test/t/strict_autoinc_1myisam.test'' mysql-test/t/strict_autoinc_2innodb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_2innodb.test'' mysql-test/t/strict_autoinc_3heap.test: New BitKeeper file ``mysql-test/t/strict_autoinc_3heap.test'' mysql-test/t/strict_autoinc_4bdb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_4bdb.test'' mysql-test/t/strict_autoinc_5ndb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_5ndb.test''
		
			
				
	
	
		
			29 lines
		
	
	
		
			556 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			556 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
#
 | 
						|
# Test for strict-mode autoincrement
 | 
						|
#
 | 
						|
 | 
						|
set @org_mode=@@sql_mode;
 | 
						|
eval create table t1
 | 
						|
(
 | 
						|
  `a` tinyint(4) NOT NULL auto_increment,
 | 
						|
  primary key (`a`)
 | 
						|
) engine = $type ;
 | 
						|
set @@sql_mode='strict_all_tables';
 | 
						|
--error ER_WARN_DATA_OUT_OF_RANGE
 | 
						|
insert into t1 values(1000);
 | 
						|
select count(*) from t1;
 | 
						|
 | 
						|
set auto_increment_increment=1000;
 | 
						|
set auto_increment_offset=700;
 | 
						|
--error ER_WARN_DATA_OUT_OF_RANGE
 | 
						|
insert into t1 values(null);
 | 
						|
select count(*) from t1;
 | 
						|
 | 
						|
set @@sql_mode=@org_mode;
 | 
						|
insert into t1 values(null);
 | 
						|
select * from t1;
 | 
						|
 | 
						|
drop table t1;
 | 
						|
 | 
						|
# End of test
 |