mark some file to been opensource for ce-farm
This commit is contained in:
269
tools/deploy/mysql_test/test_suite/storage/t/rowkey_is_char.test
Normal file
269
tools/deploy/mysql_test/test_suite/storage/t/rowkey_is_char.test
Normal file
@ -0,0 +1,269 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
# owner: xiaoyi.xy
|
||||
# owner group: SQL3
|
||||
# description: foobar
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
### single field
|
||||
#
|
||||
|
||||
create table t1(a varchar(50) primary key, b int default 0);
|
||||
|
||||
# empty table
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
let $i=10;
|
||||
disable_query_log;
|
||||
while($i > -10)
|
||||
{
|
||||
eval insert into t1(a) values('$i');
|
||||
dec $i;
|
||||
}
|
||||
enable_query_log;
|
||||
select * from t1;
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
## more fields
|
||||
#
|
||||
|
||||
|
||||
create table t1(a varchar(50) primary key, b int, c int);
|
||||
|
||||
# empty table
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
let $i=10;
|
||||
disable_query_log;
|
||||
while($i > -10)
|
||||
{
|
||||
eval insert into t1 values('$i','$i','$i');
|
||||
dec $i;
|
||||
}
|
||||
|
||||
enable_query_log;
|
||||
|
||||
select * from t1;
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 2;
|
||||
select * from t1 where a < 3;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
## pk: two fields
|
||||
#
|
||||
|
||||
create table t1(a int, b int, c int, primary key(a,b));
|
||||
|
||||
# empty table
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
select * from t1 where a > -1 and b > -1;
|
||||
select * from t1 where a = -1 and b = -1;
|
||||
select * from t1 where a < -1 and b < -1;
|
||||
select * from t1 where a > 0 and b > 0;
|
||||
select * from t1 where a = 0 and b = 0;
|
||||
select * from t1 where a < 0 and b < 0;
|
||||
select * from t1 where a > 1 and b > 1;
|
||||
select * from t1 where a = 1 and b = 1;
|
||||
select * from t1 where a < 1 and b < 1;
|
||||
|
||||
select * from t1 where a > -1 and b < -1;
|
||||
select * from t1 where a = -1 and b != -1;
|
||||
select * from t1 where a < -1 and b > -1;
|
||||
select * from t1 where a > 0 and b < 0;
|
||||
select * from t1 where a = 0 and b != 0;
|
||||
select * from t1 where a < 0 and b > 0;
|
||||
select * from t1 where a > 1 and b < 1;
|
||||
select * from t1 where a = 1 and b != 1;
|
||||
select * from t1 where a < 1 and b > 1;
|
||||
|
||||
let $i=10;
|
||||
disable_query_log;
|
||||
while($i > -10)
|
||||
{
|
||||
eval insert into t1 values('$i','$i','$i');
|
||||
dec $i;
|
||||
}
|
||||
enable_query_log;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
select * from t1 where a > -1 and b > -1;
|
||||
select * from t1 where a = -1 and b = -1;
|
||||
select * from t1 where a < -1 and b < -1;
|
||||
select * from t1 where a > 0 and b > 0;
|
||||
select * from t1 where a = 0 and b = 0;
|
||||
select * from t1 where a < 0 and b < 0;
|
||||
select * from t1 where a > 1 and b > 1;
|
||||
select * from t1 where a = 1 and b = 1;
|
||||
select * from t1 where a < 1 and b < 1;
|
||||
|
||||
select * from t1 where a > -1 and b < -1;
|
||||
select * from t1 where a = -1 and b != -1;
|
||||
select * from t1 where a < -1 and b > -1;
|
||||
select * from t1 where a > 0 and b < 0;
|
||||
select * from t1 where a = 0 and b != 0;
|
||||
select * from t1 where a < 0 and b > 0;
|
||||
select * from t1 where a > 1 and b < 1;
|
||||
select * from t1 where a = 1 and b != 1;
|
||||
select * from t1 where a < 1 and b > 1;
|
||||
|
||||
select * from t1;
|
||||
|
||||
#drop table t1;
|
||||
|
||||
|
||||
#
|
||||
## pk as all fields
|
||||
#
|
||||
|
||||
#create table t1(a int, b int, c int, primary key(a,b,c));
|
||||
|
||||
# empty table
|
||||
#select * from t1;
|
||||
|
||||
#select * from t1 where a > -1;
|
||||
#select * from t1 where a = -1;
|
||||
#select * from t1 where a < -1;
|
||||
#select * from t1 where a > 0;
|
||||
#select * from t1 where a = 0;
|
||||
#select * from t1 where a < 0;
|
||||
#select * from t1 where a > 1;
|
||||
#select * from t1 where a = 1;
|
||||
#select * from t1 where a < 1;
|
||||
|
||||
#select * from t1 where a > -1 and b > -1 and c > -1;
|
||||
#select * from t1 where a = -1 and b = -1 and c = -1;
|
||||
#select * from t1 where a < -1 and b < -1 and c < -1;
|
||||
#select * from t1 where a > 0 and b > 0 and c > 0;
|
||||
#select * from t1 where a = 0 and b = 0 and c = 0;
|
||||
#select * from t1 where a < 0 and b < 0 and c < 0;
|
||||
#select * from t1 where a > 1 and b > 1 and c > 1;
|
||||
#select * from t1 where a = 1 and b = 1 and c = 1;
|
||||
#select * from t1 where a < 1 and b < 1 and c < 1;
|
||||
|
||||
#select * from t1 where a > -1 and b < -1 and c > -1;
|
||||
#select * from t1 where a = -1 and b != -1 and c = -1;
|
||||
#select * from t1 where a < -1 and b > -1 and c < -1;
|
||||
#select * from t1 where a > 0 and b < 0 and c > 0;
|
||||
#select * from t1 where a = 0 and b != 0 and c = 0;
|
||||
#select * from t1 where a < 0 and b > 0 and c < 0;
|
||||
#select * from t1 where a > 1 and b < 1 and c > 1;
|
||||
#select * from t1 where a = 1 and b != 1 and c = 1;
|
||||
#select * from t1 where a < 1 and b > 1 and c < 1;
|
||||
|
||||
#let $i=10;
|
||||
#disable_query_log;
|
||||
#while($i > -10)
|
||||
#{
|
||||
# eval insert into t1 values('$i','$i','$i');
|
||||
# dec $i;
|
||||
#}
|
||||
#enable_query_log;
|
||||
|
||||
#select * from t1;
|
||||
|
||||
#select * from t1 where a > -1;
|
||||
#select * from t1 where a = -1;
|
||||
#select * from t1 where a < -1;
|
||||
#select * from t1 where a > 0;
|
||||
#select * from t1 where a = 0;
|
||||
#select * from t1 where a < 0;
|
||||
#select * from t1 where a > 1;
|
||||
#select * from t1 where a = 1;
|
||||
#select * from t1 where a < 1;
|
||||
|
||||
#select * from t1 where a > -1 and b > -1 and c > -1;
|
||||
#select * from t1 where a = -1 and b = -1 and c = -1;
|
||||
#select * from t1 where a < -1 and b < -1 and c < -1;
|
||||
#select * from t1 where a > 0 and b > 0 and c > 0;
|
||||
#select * from t1 where a = 0 and b = 0 and c = 0;
|
||||
#select * from t1 where a < 0 and b < 0 and c < 0;
|
||||
#select * from t1 where a > 1 and b > 1 and c > 1;
|
||||
#select * from t1 where a = 1 and b = 1 and c = 1;
|
||||
#select * from t1 where a < 1 and b < 1 and c < 1;
|
||||
|
||||
#select * from t1 where a > -1 and b < -1 and c > -1;
|
||||
#select * from t1 where a = -1 and b != -1 and c = -1;
|
||||
#select * from t1 where a < -1 and b > -1 and c < -1;
|
||||
#select * from t1 where a > 0 and b < 0 and c > 0;
|
||||
#select * from t1 where a = 0 and b != 0 and c = 0;
|
||||
#select * from t1 where a < 0 and b > 0 and c < 0;
|
||||
#select * from t1 where a > 1 and b < 1 and c > 1;
|
||||
#select * from t1 where a = 1 and b != 1 and c = 1;
|
||||
#select * from t1 where a < 1 and b > 1 and c < 1;
|
||||
|
||||
#drop table t1;
|
||||
|
||||
|
||||
271
tools/deploy/mysql_test/test_suite/storage/t/rowkey_is_int.test
Normal file
271
tools/deploy/mysql_test/test_suite/storage/t/rowkey_is_int.test
Normal file
@ -0,0 +1,271 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
# owner: xiaoyi.xy
|
||||
# owner group: SQL3
|
||||
# description: foobar
|
||||
# tags: datatype
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
### single field
|
||||
#
|
||||
|
||||
create table t1(a int primary key, b int);
|
||||
|
||||
# empty table
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
let $i=10;
|
||||
disable_query_log;
|
||||
while($i > -10)
|
||||
{
|
||||
eval insert into t1(a) values($i);
|
||||
dec $i;
|
||||
}
|
||||
enable_query_log;
|
||||
select * from t1;
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
## more fields
|
||||
#
|
||||
|
||||
|
||||
create table t1(a int primary key, b int, c int);
|
||||
|
||||
# empty table
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
let $i=10;
|
||||
disable_query_log;
|
||||
while($i > -10)
|
||||
{
|
||||
eval insert into t1 values($i,$i,$i);
|
||||
dec $i;
|
||||
}
|
||||
|
||||
enable_query_log;
|
||||
|
||||
select * from t1;
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 2;
|
||||
select * from t1 where a < 3;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
## pk: two fields
|
||||
#
|
||||
|
||||
create table t1(a int, b int, c int, primary key(a,b));
|
||||
|
||||
# empty table
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
select * from t1 where a > -1 and b > -1;
|
||||
select * from t1 where a = -1 and b = -1;
|
||||
select * from t1 where a < -1 and b < -1;
|
||||
select * from t1 where a > 0 and b > 0;
|
||||
select * from t1 where a = 0 and b = 0;
|
||||
select * from t1 where a < 0 and b < 0;
|
||||
select * from t1 where a > 1 and b > 1;
|
||||
select * from t1 where a = 1 and b = 1;
|
||||
select * from t1 where a < 1 and b < 1;
|
||||
|
||||
select * from t1 where a > -1 and b < -1;
|
||||
select * from t1 where a = -1 and b != -1;
|
||||
select * from t1 where a < -1 and b > -1;
|
||||
select * from t1 where a > 0 and b < 0;
|
||||
select * from t1 where a = 0 and b != 0;
|
||||
select * from t1 where a < 0 and b > 0;
|
||||
select * from t1 where a > 1 and b < 1;
|
||||
select * from t1 where a = 1 and b != 1;
|
||||
select * from t1 where a < 1 and b > 1;
|
||||
|
||||
let $i=10;
|
||||
disable_query_log;
|
||||
while($i > -10)
|
||||
{
|
||||
eval insert into t1 values($i,$i,$i);
|
||||
dec $i;
|
||||
}
|
||||
enable_query_log;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
select * from t1 where a > -1 and b > -1;
|
||||
select * from t1 where a = -1 and b = -1;
|
||||
select * from t1 where a < -1 and b < -1;
|
||||
select * from t1 where a > 0 and b > 0;
|
||||
select * from t1 where a = 0 and b = 0;
|
||||
select * from t1 where a < 0 and b < 0;
|
||||
select * from t1 where a > 1 and b > 1;
|
||||
select * from t1 where a = 1 and b = 1;
|
||||
select * from t1 where a < 1 and b < 1;
|
||||
|
||||
select * from t1 where a > -1 and b < -1;
|
||||
select * from t1 where a = -1 and b != -1;
|
||||
select * from t1 where a < -1 and b > -1;
|
||||
select * from t1 where a > 0 and b < 0;
|
||||
select * from t1 where a = 0 and b != 0;
|
||||
select * from t1 where a < 0 and b > 0;
|
||||
select * from t1 where a > 1 and b < 1;
|
||||
select * from t1 where a = 1 and b != 1;
|
||||
select * from t1 where a < 1 and b > 1;
|
||||
|
||||
select * from t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
## pk as all fields
|
||||
#
|
||||
|
||||
create table t1(a int, b int, c int, primary key(a,b,c),d int);
|
||||
|
||||
# empty table
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
select * from t1 where a > -1 and b > -1 and c > -1;
|
||||
select * from t1 where a = -1 and b = -1 and c = -1;
|
||||
select * from t1 where a < -1 and b < -1 and c < -1;
|
||||
select * from t1 where a > 0 and b > 0 and c > 0;
|
||||
select * from t1 where a = 0 and b = 0 and c = 0;
|
||||
select * from t1 where a < 0 and b < 0 and c < 0;
|
||||
select * from t1 where a > 1 and b > 1 and c > 1;
|
||||
select * from t1 where a = 1 and b = 1 and c = 1;
|
||||
select * from t1 where a < 1 and b < 1 and c < 1;
|
||||
|
||||
select * from t1 where a > -1 and b < -1 and c > -1;
|
||||
select * from t1 where a = -1 and b != -1 and c = -1;
|
||||
select * from t1 where a < -1 and b > -1 and c < -1;
|
||||
select * from t1 where a > 0 and b < 0 and c > 0;
|
||||
select * from t1 where a = 0 and b != 0 and c = 0;
|
||||
select * from t1 where a < 0 and b > 0 and c < 0;
|
||||
select * from t1 where a > 1 and b < 1 and c > 1;
|
||||
select * from t1 where a = 1 and b != 1 and c = 1;
|
||||
select * from t1 where a < 1 and b > 1 and c < 1;
|
||||
|
||||
let $i=10;
|
||||
disable_query_log;
|
||||
while($i > -10)
|
||||
{
|
||||
eval insert into t1(a,b,c) values($i,$i,$i);
|
||||
dec $i;
|
||||
}
|
||||
enable_query_log;
|
||||
|
||||
select * from t1;
|
||||
|
||||
select * from t1 where a > -1;
|
||||
select * from t1 where a = -1;
|
||||
select * from t1 where a < -1;
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a = 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a = 1;
|
||||
select * from t1 where a < 1;
|
||||
|
||||
select * from t1 where a > -1 and b > -1 and c > -1;
|
||||
select * from t1 where a = -1 and b = -1 and c = -1;
|
||||
select * from t1 where a < -1 and b < -1 and c < -1;
|
||||
select * from t1 where a > 0 and b > 0 and c > 0;
|
||||
select * from t1 where a = 0 and b = 0 and c = 0;
|
||||
select * from t1 where a < 0 and b < 0 and c < 0;
|
||||
select * from t1 where a > 1 and b > 1 and c > 1;
|
||||
select * from t1 where a = 1 and b = 1 and c = 1;
|
||||
select * from t1 where a < 1 and b < 1 and c < 1;
|
||||
|
||||
select * from t1 where a > -1 and b < -1 and c > -1;
|
||||
select * from t1 where a = -1 and b != -1 and c = -1;
|
||||
select * from t1 where a < -1 and b > -1 and c < -1;
|
||||
select * from t1 where a > 0 and b < 0 and c > 0;
|
||||
select * from t1 where a = 0 and b != 0 and c = 0;
|
||||
select * from t1 where a < 0 and b > 0 and c < 0;
|
||||
select * from t1 where a > 1 and b < 1 and c > 1;
|
||||
select * from t1 where a = 1 and b != 1 and c = 1;
|
||||
select * from t1 where a < 1 and b > 1 and c < 1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
||||
100
tools/deploy/mysql_test/test_suite/storage/t/rowkey_is_null.test
Normal file
100
tools/deploy/mysql_test/test_suite/storage/t/rowkey_is_null.test
Normal file
@ -0,0 +1,100 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
# owner: xiaoyi.xy
|
||||
# owner group: SQL3
|
||||
# description: foobar
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
## junyue
|
||||
## Fix bug: http://bugfree.corp.taobao.com/bug/201170
|
||||
## There shouldon't be NULL values within primary keys
|
||||
#
|
||||
|
||||
# single int
|
||||
create table t1(a int primary key, c int);
|
||||
insert into t1(a) values(-1);
|
||||
insert into t1(a) values(1);
|
||||
insert into t1(a) values(0);
|
||||
#--error 1062
|
||||
#insert into t1(a) values(NULL);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# combo int
|
||||
create table t1(a int, b int, c int primary key);
|
||||
insert into t1 values(NULL,NULL,1);
|
||||
insert into t1 values(NULL,1,2);
|
||||
insert into t1 values(1,NULL,3);
|
||||
insert into t1 values(1,1,4);
|
||||
insert into t1 values(NULL,NULL,5);
|
||||
insert into t1 values(NULL,1,6);
|
||||
insert into t1 values(1,NULL,7);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# single char
|
||||
create table t1(a varchar(20) ,b varchar(128) primary key);
|
||||
insert into t1 values(NULL,'abc');
|
||||
insert into t1 values('1','cde');
|
||||
insert into t1 values(NULL,'egf');
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# combo char
|
||||
--disable_parsing
|
||||
create table t1(a varchar(20), b varchar(20), primary key(a,b),c varchar(128));
|
||||
insert into t1(a,b) values(NULL,NULL);
|
||||
insert into t1(a,b) values(NULL,'1');
|
||||
|
||||
insert into t1(a,b) values('1',NULL);
|
||||
insert into t1(a,b) values('1','1');
|
||||
|
||||
--error 1062
|
||||
insert into t1(a,b) values(NULL,NULL);
|
||||
|
||||
--error 1062
|
||||
insert into t1(a,b) values(NULL,'1');
|
||||
|
||||
--error 1062
|
||||
insert into t1(a,b) values('1',NULL);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# single dt
|
||||
create table t1(a datetime primary key,b datetime(6));
|
||||
|
||||
insert into t1(a) values(NULL);
|
||||
insert into t1(a) values('2010-01-01 12:00:00');
|
||||
|
||||
--error 1062
|
||||
insert into t1(a) values(NULL);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# combo dt
|
||||
create table t1(a datetime(6), b datetime(6), primary key(a,b), c datetime(6));
|
||||
|
||||
insert into t1(a,b) values(NULL,NULL);
|
||||
|
||||
insert into t1(a,b) values(NULL,'2010-01-01 12:00:00');
|
||||
|
||||
insert into t1(a,b) values('2010-01-01 12:00:00',NULL);
|
||||
insert into t1(a,b) values('2010-01-01 12:00:00','2010-01-01 12:00:00');
|
||||
|
||||
--error 1062
|
||||
insert into t1(a,b) values(NULL,NULL);
|
||||
|
||||
--error 1062
|
||||
insert into t1(a,b) values(NULL,'2010-01-01 12:00:00');
|
||||
|
||||
--error 1062
|
||||
insert into t1(a,b) values('2010-01-01 12:00:00',NULL);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
--enable_parsing
|
||||
|
||||
Reference in New Issue
Block a user