~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/innodb_autoinc_lock_mode_func.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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:Test Cases of Dynamic System Variable innodb_autoextend_increment#
 
15
#             that checks the behavior of this variable                       #
 
16
#                                                                             #
 
17
# Reference: http://dev.mysql.com/doc/refman/5.1/en/                          #
 
18
#  server-system-variables.html                                               #
 
19
#                                                                             #
 
20
###############################################################################
 
21
 
 
22
--echo '#--------------------FN_DYNVARS_039_01-------------------------#'
 
23
################################################################
 
24
# Begin the functionality Testing of innodb_autoinc_lock_mode  #
 
25
################################################################
 
26
--source include/have_innodb.inc
 
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
###############################################################
 
54
# End of functionality Testing for innodb_autoinc_lock_mode   #
 
55
###############################################################
 
56