diff options
Diffstat (limited to 'storage/tokudb/mysql-test/tokudb/t/fast_upsert_key.test')
-rw-r--r-- | storage/tokudb/mysql-test/tokudb/t/fast_upsert_key.test | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/storage/tokudb/mysql-test/tokudb/t/fast_upsert_key.test b/storage/tokudb/mysql-test/tokudb/t/fast_upsert_key.test new file mode 100644 index 00000000000..c11f2f49176 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb/t/fast_upsert_key.test @@ -0,0 +1,45 @@ +source include/have_tokudb.inc; + +set default_storage_engine='tokudb'; + +disable_warnings; +drop table if exists t; +enable_warnings; + +set tokudb_disable_slow_upsert=1; + +# must have primary key +create table t (a int, b char(32), c varchar(32), d blob); +replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; +error ER_UNSUPPORTED_EXTENSION; +insert noar into t values (1,null,null,null) on duplicate key update a=42; +drop table t; + +# must have no clustering keys +create table t (id int primary key, a int, b char(32), c varchar(32), d blob, clustering key(a)); +replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; +error ER_UNSUPPORTED_EXTENSION; +insert noar into t values (1,null,null,null,null) on duplicate key update a=42; +drop table t; + +# must have no secondary keys +create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(c)); +replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; +error ER_UNSUPPORTED_EXTENSION; +insert noar into t values (1,null,null,null,null) on duplicate key update a=42; +drop table t; + +# update field must not be part of any key +create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(id, a)); +replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; +error ER_UNSUPPORTED_EXTENSION; +insert noar into t values (1,2,null,null,null) on duplicate key update a=42; +drop table t; + +create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(a, id)); +replace_regex /MariaDB/XYZ/ /MySQL/XYZ/; +error ER_UNSUPPORTED_EXTENSION; +insert noar into t values (1,2,null,null,null) on duplicate key update a=42; +drop table t; + + |