| 1 |
################# mysql-test\t\innodb_autoinc_lock_mode_func.test ############ |
| 2 |
# # |
| 3 |
# Variable Name: innodb_autoinc_lock_mode # |
| 4 |
# Scope: GLOBAL # |
| 5 |
# Access Type: Readonly # |
| 6 |
# Data Type: Numeric # |
| 7 |
# Default Value: 1 # |
| 8 |
# Range: 0,1,2 # |
| 9 |
# # |
| 10 |
# # |
| 11 |
# Creation Date: 2008-03-08 # |
| 12 |
# Author: Rizwan Maredia # |
| 13 |
# # |
| 14 |
# Description: # |
| 15 |
# Test Cases of Dynamic System Variable innodb_autoextend_increment that # |
| 16 |
# checks the behavior of this variable # |
| 17 |
# # |
| 18 |
# Reference: # |
| 19 |
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # |
| 20 |
# # |
| 21 |
############################################################################### |
| 22 |
|
| 23 |
--echo '#--------------------FN_DYNVARS_039_01-------------------------#' |
| 24 |
################################################################ |
| 25 |
# Begin the functionality Testing of innodb_autoinc_lock_mode # |
| 26 |
################################################################ |
| 27 |
|
| 28 |
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 29 |
SET global innodb_autoinc_lock_mode = 1; |
| 30 |
|
| 31 |
#======================================================== |
| 32 |
--echo '--innodb_autoinc_lock_mode is 1 (consecutive)--' |
| 33 |
#======================================================== |
| 34 |
|
| 35 |
|
| 36 |
# innodb_autoinc_lock_mode is 1 in opt file |
| 37 |
SELECT @@global.innodb_autoinc_lock_mode; |
| 38 |
|
| 39 |
--disable_warnings |
| 40 |
DROP TABLE IF EXISTS t1; |
| 41 |
--enable_warnings |
| 42 |
|
| 43 |
CREATE TABLE t1( |
| 44 |
a INT AUTO_INCREMENT PRIMARY KEY, |
| 45 |
b CHAR |
| 46 |
) ENGINE=INNODB, AUTO_INCREMENT=100; |
| 47 |
|
| 48 |
INSERT INTO t1 (a,b) VALUES (5,'a'), (NULL,'b'), (1,'c'), (NULL,'d'); |
| 49 |
INSERT INTO t1 (a,b) VALUES (NULL,'e'); |
| 50 |
--echo 'the new auto incremented value should be 104' |
| 51 |
SELECT * FROM t1; |
| 52 |
|
| 53 |
DROP TABLE t1; |
| 54 |
|
| 55 |
############################################################### |
| 56 |
# End of functionality Testing for innodb_autoinc_lock_mode # |
| 57 |
############################################################### |
| 58 |
|