Commit 013e8e65 authored by Rich Prohaska's avatar Rich Prohaska

#175 make the mod_enum test more portable

parent f730f9fb
...@@ -7,6 +7,7 @@ col1 col2 ...@@ -7,6 +7,7 @@ col1 col2
1 value1 1 value1
2 value1 2 value1
3 value3 3 value3
set tokudb_disable_hot_alter=0;
set tokudb_disable_slow_alter=1; set tokudb_disable_slow_alter=1;
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value3'); ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value3');
SELECT * FROM test_enum; SELECT * FROM test_enum;
...@@ -22,6 +23,7 @@ col1 col2 ...@@ -22,6 +23,7 @@ col1 col2
1 value1 1 value1
2 value1 2 value1
3 value3 3 value3
set tokudb_disable_hot_alter=0;
set tokudb_disable_slow_alter=1; set tokudb_disable_slow_alter=1;
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value3'); ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value3');
ERROR 42000: Table 'test_enum' uses an extension that doesn't exist in this MySQL version ERROR 42000: Table 'test_enum' uses an extension that doesn't exist in this MySQL version
...@@ -41,6 +43,7 @@ col1 col2 ...@@ -41,6 +43,7 @@ col1 col2
1 value1 1 value1
2 value1 2 value1
3 value3 3 value3
set tokudb_disable_hot_alter=0;
set tokudb_disable_slow_alter=1; set tokudb_disable_slow_alter=1;
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4'); ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4');
ERROR 42000: Table 'test_enum' uses an extension that doesn't exist in this MySQL version ERROR 42000: Table 'test_enum' uses an extension that doesn't exist in this MySQL version
......
...@@ -12,6 +12,7 @@ CREATE TABLE test_enum (col1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, col2 ENUM( ...@@ -12,6 +12,7 @@ CREATE TABLE test_enum (col1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, col2 ENUM(
INSERT INTO test_enum (col2) VALUES ('value1'),('value1'),('value3'); INSERT INTO test_enum (col2) VALUES ('value1'),('value1'),('value3');
SELECT * FROM test_enum; SELECT * FROM test_enum;
set tokudb_disable_hot_alter=0;
set tokudb_disable_slow_alter=1; set tokudb_disable_slow_alter=1;
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value3'); ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value3');
SELECT * FROM test_enum; SELECT * FROM test_enum;
...@@ -23,6 +24,7 @@ CREATE TABLE test_enum (col1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, col2 ENUM( ...@@ -23,6 +24,7 @@ CREATE TABLE test_enum (col1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, col2 ENUM(
INSERT INTO test_enum (col2) VALUES ('value1'),('value1'),('value3'); INSERT INTO test_enum (col2) VALUES ('value1'),('value1'),('value3');
SELECT * FROM test_enum; SELECT * FROM test_enum;
set tokudb_disable_hot_alter=0;
set tokudb_disable_slow_alter=1; set tokudb_disable_slow_alter=1;
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value3'); ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value3');
...@@ -39,6 +41,7 @@ CREATE TABLE test_enum (col1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, col2 ENUM( ...@@ -39,6 +41,7 @@ CREATE TABLE test_enum (col1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, col2 ENUM(
INSERT INTO test_enum (col2) VALUES ('value1'),('value1'),('value3'); INSERT INTO test_enum (col2) VALUES ('value1'),('value1'),('value3');
SELECT * FROM test_enum; SELECT * FROM test_enum;
set tokudb_disable_hot_alter=0;
set tokudb_disable_slow_alter=1; set tokudb_disable_slow_alter=1;
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4'); ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4');
......
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