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--source include/have_innodb.inc
28
29--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
30SET global innodb_autoinc_lock_mode = 1;
31
32#========================================================
33--echo '--innodb_autoinc_lock_mode is 1 (consecutive)--'
34#========================================================
35
36
37# innodb_autoinc_lock_mode is 1 in opt file
38SELECT @@global.innodb_autoinc_lock_mode;
39
40--disable_warnings
41DROP TABLE IF EXISTS t1;
42--enable_warnings
43
44CREATE TABLE t1(
45a INT AUTO_INCREMENT PRIMARY KEY,
46b CHAR
47) ENGINE=INNODB, AUTO_INCREMENT=100;
48
49INSERT INTO t1 (a,b) VALUES (5,'a'), (NULL,'b'), (1,'c'), (NULL,'d');
50INSERT INTO t1 (a,b) VALUES (NULL,'e');
51--echo 'the new auto incremented value should be 104'
52SELECT * FROM t1;
53
54DROP TABLE t1;
55
56###############################################################
57# End of functionality Testing for innodb_autoinc_lock_mode   #
58###############################################################
59
60