Commit a5db78f7 authored by marko's avatar marko

branches/zip: Add some tests for innodb_strict_mode.

ha_innodb.cc: Declare strict_mode as PLUGIN_VAR_OPCMDARG, because we
do want to be able to disable innodb_strict_mode.  This is a non-functional
change, because PLUGIN_VAR_NOCMDARG seems to accept an argument as well.

innodb-zip.test: Do not store innodb_strict_mode.  It is a session variable.
Add a test case for innodb_strict_mode=off.
parent 1a360822
......@@ -304,8 +304,7 @@ static MYSQL_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG,
/* check_func */ NULL, /* update_func */ NULL,
/* default */ TRUE);
static MYSQL_THDVAR_BOOL(strict_mode,
PLUGIN_VAR_NOCMDARG,
static MYSQL_THDVAR_BOOL(strict_mode, PLUGIN_VAR_OPCMDARG,
"Use strict mode when evaluating create options.",
NULL, NULL, FALSE);
......
......@@ -174,6 +174,11 @@ set global innodb_file_format=``;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
set innodb_strict_mode = off;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
drop table t1;
set innodb_strict_mode = on;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
......@@ -376,7 +381,6 @@ test t9 Redundant
drop table t8, t9;
set global innodb_file_per_table=0;
set global innodb_file_format=Antelope;
set innodb_strict_mode=0;
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
set global innodb_file_format_check=`Antelope`;
......
......@@ -2,7 +2,6 @@
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
let $mode=`select @@innodb_strict_mode`;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
......@@ -152,6 +151,10 @@ set global innodb_file_format=``;
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
set innodb_strict_mode = off;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
drop table t1;
#set strict_mode
set innodb_strict_mode = on;
......@@ -294,7 +297,6 @@ drop table t8, t9;
eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format=$format;
eval set innodb_strict_mode=$mode;
#
# Testing of tablespace tagging
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment