1
by brian
clean slate |
1 |
# This test uses chmod, can't be run with root permissions
|
2 |
-- source include/not_as_root.inc |
|
3 |
||
4 |
||
5 |
# Initialise
|
|
6 |
--disable_warnings |
|
7 |
drop table if exists t1; |
|
8 |
--enable_warnings |
|
9 |
||
10 |
#
|
|
11 |
# varbinary as string and number
|
|
12 |
#
|
|
13 |
||
14 |
select 0x31+1,concat(0x31)+1,-0xf; |
|
15 |
select x'31',X'ffff'+0; |
|
16 |
||
17 |
#
|
|
18 |
# Test of hex constants in WHERE:
|
|
19 |
#
|
|
20 |
||
642.1.47
by Lee
add varbinary test |
21 |
create table t1 (ID int not null auto_increment,UNIQ bigint not null,primary key (ID),unique (UNIQ) ); |
1
by brian
clean slate |
22 |
insert into t1 set UNIQ=0x38afba1d73e6a18a; |
23 |
insert into t1 set UNIQ=123; |
|
24 |
explain extended select * from t1 where UNIQ=0x38afba1d73e6a18a; |
|
25 |
drop table t1; |
|
26 |
||
27 |
#
|
|
28 |
# Test error conditions
|
|
29 |
#
|
|
30 |
--error 1064 |
|
31 |
select x'hello'; |
|
32 |
--error 1054 |
|
33 |
select 0xfg; |
|
34 |
||
35 |
#
|
|
36 |
# Test likely error conditions
|
|
37 |
#
|
|
38 |
create table t1 select 1 as x, 2 as xx; |
|
39 |
select x,xx from t1; |
|
40 |
drop table t1; |
|
41 |
||
42 |
# End of 4.1 tests
|
|
43 |
||
44 |
#
|
|
45 |
# Bug #19371 VARBINARY() have trailing zeros after upgrade from 4.1
|
|
46 |
#
|
|
47 |
||
642.1.49
by Lee
enable type_enum, union, variables-big and type_enum tests |
48 |
# MySQL file formats are not compatible with Drizzle
|
1
by brian
clean slate |
49 |
# Test with a saved table from 4.1
|
642.1.49
by Lee
enable type_enum, union, variables-big and type_enum tests |
50 |
copy_file std_data/bug19371.frm $MYSQLTEST_VARDIR/master-data/test/t1.frm; |
51 |
chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.frm; |
|
52 |
copy_file std_data/bug19371.MYD $MYSQLTEST_VARDIR/master-data/test/t1.MYD; |
|
53 |
chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.MYD; |
|
54 |
copy_file std_data/bug19371.MYI $MYSQLTEST_VARDIR/master-data/test/t1.MYI; |
|
55 |
chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.MYI; |
|
869.1.3
by Stewart Smith
move table proto parsing off into own function. Handle errors in reading and parsing table proto, returning correct error to user. fix tests. |
56 |
--error ER_NO_SUCH_TABLE |
642.1.49
by Lee
enable type_enum, union, variables-big and type_enum tests |
57 |
show create table t1; |
896.4.9
by Stewart Smith
No longer write the FRM. just use proto. |
58 |
--error ER_BAD_TABLE_ERROR |
642.1.49
by Lee
enable type_enum, union, variables-big and type_enum tests |
59 |
drop table t1; |
896.4.9
by Stewart Smith
No longer write the FRM. just use proto. |
60 |
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm |
61 |
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD |
|
62 |
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYI |
|
1
by brian
clean slate |
63 |
|
64 |
# Check that the fix does not affect table created with current version
|
|
65 |
create table t1(a varbinary(255)); |
|
66 |
insert into t1 values("aaa "); |
|
67 |
select length(a) from t1; |
|
68 |
alter table t1 modify a varchar(255); |
|
69 |
select length(a) from t1; |
|
70 |
drop table t1; |
|
71 |
||
72 |
||
73 |
#
|
|
74 |
# Bug#28127 (Some valid identifiers names are not parsed correctly)
|
|
75 |
#
|
|
76 |
||
77 |
--disable_warnings |
|
78 |
drop table if exists table_28127_a; |
|
79 |
drop table if exists table_28127_b; |
|
80 |
--enable_warnings |
|
81 |
||
82 |
create table table_28127_a(0b02 int); |
|
83 |
show create table table_28127_a; |
|
84 |
||
85 |
create table table_28127_b(0b2 int); |
|
86 |
show create table table_28127_b; |
|
87 |
||
88 |
drop table table_28127_a; |
|
89 |
drop table table_28127_b; |
|
90 |