~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
# Initialise
2
--disable_warnings
3
drop table if exists t1;
4
--enable_warnings
5
6
#
7
# varbinary as string and number
8
#
9
10
select 0x31+1,concat(0x31)+1,-0xf;
11
select x'31',X'ffff'+0;
12
13
#
14
# Test of hex constants in WHERE:
15
#
16
642.1.47 by Lee
add varbinary test
17
create table t1 (ID int not null auto_increment,UNIQ bigint not null,primary key (ID),unique (UNIQ) );
1 by brian
clean slate
18
insert into t1 set UNIQ=0x38afba1d73e6a18a;
19
insert into t1 set UNIQ=123; 
20
explain extended select * from t1 where UNIQ=0x38afba1d73e6a18a;
21
drop table t1;
22
23
#
24
# Test error conditions
25
#
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
26
--error ER_PARSE_ERROR
1 by brian
clean slate
27
select x'hello';
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
28
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
29
select 0xfg;
30
31
#
32
# Test likely error conditions
33
#
34
create table t1 select 1 as x, 2 as xx;
35
select x,xx from t1;
36
drop table t1;
37
38
# End of 4.1 tests
39
40
41
# Check that the fix does not affect table created with current version
42
create table t1(a varbinary(255));
43
insert into t1 values("aaa   ");
44
select length(a) from t1;
45
alter table t1 modify a varchar(255);
46
select length(a) from t1;
47
drop table t1;
48
49
50
#
51
# Bug#28127 (Some valid identifiers names are not parsed correctly)
52
#
53
54
--disable_warnings
55
drop table if exists table_28127_a;
56
drop table if exists table_28127_b;
57
--enable_warnings
58
59
create table table_28127_a(0b02 int);
942.3.1 by Vladimir Kolesnikov
test generalizations
60
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1 by brian
clean slate
61
show create table table_28127_a;
62
63
create table table_28127_b(0b2 int);
942.3.1 by Vladimir Kolesnikov
test generalizations
64
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1 by brian
clean slate
65
show create table table_28127_b;
66
67
drop table table_28127_a;
68
drop table table_28127_b;
69