~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
drop table if exists t1;
2
select 0x31+1,concat(0x31)+1,-0xf;
3
0x31+1	concat(0x31)+1	-0xf
4
50	2	-15
5
select x'31',X'ffff'+0;
6
x'31'	X'ffff'+0
7
1	65535
642.1.48 by Lee
enable type_decimal test, correct comment in varbinary test
8
create table t1 (ID int not null auto_increment,UNIQ bigint not null,primary key (ID),unique (UNIQ) );
1 by brian
clean slate
9
insert into t1 set UNIQ=0x38afba1d73e6a18a;
10
insert into t1 set UNIQ=123;
11
explain extended select * from t1 where UNIQ=0x38afba1d73e6a18a;
12
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
642.1.48 by Lee
enable type_decimal test, correct comment in varbinary test
13
1	SIMPLE	t1	const	UNIQ	UNIQ	8	const	1	100.00	Using index
1 by brian
clean slate
14
Warnings:
642.1.48 by Lee
enable type_decimal test, correct comment in varbinary test
15
Note	1003	select '1' AS `ID`,'4084688022709641610' AS `UNIQ` from `test`.`t1` where 1
1 by brian
clean slate
16
drop table t1;
17
select x'hello';
642.1.48 by Lee
enable type_decimal test, correct comment in varbinary test
18
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'x'hello'' at line 1
1 by brian
clean slate
19
select 0xfg;
20
ERROR 42S22: Unknown column '0xfg' in 'field list'
21
create table t1 select 1 as x, 2 as xx;
22
select x,xx from t1;
23
x	xx
24
1	2
25
drop table t1;
642.1.49 by Lee
enable type_enum, union, variables-big and type_enum tests
26
show create table t1;
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.
27
ERROR 42S02: Table 'test.t1' doesn't exist
642.1.49 by Lee
enable type_enum, union, variables-big and type_enum tests
28
drop table t1;
1 by brian
clean slate
29
create table t1(a varbinary(255));
30
insert into t1 values("aaa   ");
31
select length(a) from t1;
32
length(a)
33
6
34
alter table t1 modify a varchar(255);
35
select length(a) from t1;
36
length(a)
37
6
38
drop table t1;
39
drop table if exists table_28127_a;
40
drop table if exists table_28127_b;
41
create table table_28127_a(0b02 int);
42
show create table table_28127_a;
43
Table	Create Table
44
table_28127_a	CREATE TABLE `table_28127_a` (
873.2.35 by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements.
45
  `0b02` int DEFAULT NULL
642.1.48 by Lee
enable type_decimal test, correct comment in varbinary test
46
) ENGINE=InnoDB
1 by brian
clean slate
47
create table table_28127_b(0b2 int);
48
show create table table_28127_b;
49
Table	Create Table
50
table_28127_b	CREATE TABLE `table_28127_b` (
873.2.35 by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements.
51
  `0b2` int DEFAULT NULL
642.1.48 by Lee
enable type_decimal test, correct comment in varbinary test
52
) ENGINE=InnoDB
1 by brian
clean slate
53
drop table table_28127_a;
54
drop table table_28127_b;