Commit f75314e6 authored by Rich Prohaska's avatar Rich Prohaska

refs #5727 refine update and upsert key tests

git-svn-id: file:///svn/mysql/tests/mysql-test@51073 c7de825b-a66e-492c-adef-691d508d4ae1
parent 060e2ae7
......@@ -14,10 +14,6 @@ create table t (ida int not null, idb bigint not null, idc tinyint unsigned not
update t set x=x+1 where ida=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t;
create table t (ida int not null, idb bigint not null, idc tinyint unsigned not null, x bigint, primary key(ida), unique key (idb));
update t set x=x+1 where ida=1;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t;
create table t (id char(32), x bigint, primary key(id(1)));
update t set x=x+1 where id='hi';
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
......
......@@ -10,15 +10,15 @@ create table t (id int primary key, a int, b char(32), c varchar(32), d blob, cl
insert into t values (1,null,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t;
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(a));
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(c));
insert into t values (1,null,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t;
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(b, a));
insert into t values (1,null,null,null,null) on duplicate key update a=42;
create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(id, a));
insert into t values (1,2,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t;
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, unique key(c));
insert into t values (1,null,null,null,null) on duplicate key update a=42;
create table t (id int, a int, b char(32), c varchar(32), d blob, primary key(a, id));
insert into t values (1,2,null,null,null) on duplicate key update a=42;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
drop table t;
......@@ -30,13 +30,6 @@ error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where ida=1;
drop table t;
# must have no unique keys
create table t (ida int not null, idb bigint not null, idc tinyint unsigned not null, x bigint, primary key(ida), unique key (idb));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
error ER_UNSUPPORTED_EXTENSION;
update t set x=x+1 where ida=1;
drop table t;
# must have no pk prefixed
create table t (id char(32), x bigint, primary key(id(1)));
replace_regex /MariaDB/XYZ/ /MySQL/XYZ/;
......
......@@ -23,25 +23,24 @@ error ER_UNSUPPORTED_EXTENSION;
insert 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 primary key, a int, b char(32), c varchar(32), d blob, key(a));
# 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 into t values (1,null,null,null,null) on duplicate key update a=42;
drop table t;
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, key(b, a));
# 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 into t values (1,null,null,null,null) on duplicate key update a=42;
insert into t values (1,2,null,null,null) on duplicate key update a=42;
drop table t;
# must have no unique keys
create table t (id int primary key, a int, b char(32), c varchar(32), d blob, unique key(c));
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 into t values (1,null,null,null,null) on duplicate key update a=42;
insert into t values (1,2,null,null,null) on duplicate key update a=42;
drop table t;
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