1
drop table if exists t1;
2
select 0x41,0x41+0,0x41 | 0x7fffffffffffffff | 0,0xffffffffffffffff | 0 ;
3
0x41 0x41+0 0x41 | 0x7fffffffffffffff | 0 0xffffffffffffffff | 0
4
A 65 9223372036854775807 18446744073709551615
5
select 0x31+1,concat(0x31)+1,-0xf;
6
0x31+1 concat(0x31)+1 -0xf
8
select x'31',X'ffff'+0;
11
create table t1 (ID int(8) unsigned zerofill not null auto_increment,UNIQ bigint(21) unsigned zerofill not null,primary key (ID),unique (UNIQ) );
12
insert into t1 set UNIQ=0x38afba1d73e6a18a;
13
insert into t1 set UNIQ=123;
14
explain extended select * from t1 where UNIQ=0x38afba1d73e6a18a;
15
id select_type table type possible_keys key key_len ref rows filtered Extra
16
1 SIMPLE t1 const UNIQ UNIQ 8 const 1 100.00
18
Note 1003 select '00000001' AS `ID`,'004084688022709641610' AS `UNIQ` from `test`.`t1` where 1
21
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'x'hello'' at line 1
23
ERROR 42S22: Unknown column '0xfg' in 'field list'
24
create table t1 select 1 as x, 2 as xx;
31
t1 CREATE TABLE `t1` (
32
`a` varbinary(255) DEFAULT NULL,
33
`b` varchar(255) DEFAULT NULL
34
) ENGINE=MyISAM DEFAULT CHARSET=latin1
35
select length(a), length(b) from t1;
39
CHECK TABLE t1 FOR UPGRADE;
40
Table Op Msg_type Msg_text
41
test.t1 check error Table upgrade required. Please do "REPAIR TABLE `t1`" to fix it!
43
Table Op Msg_type Msg_text
44
test.t1 repair status OK
47
t1 CREATE TABLE `t1` (
48
`a` varbinary(255) DEFAULT NULL,
49
`b` varchar(255) DEFAULT NULL
50
) ENGINE=MyISAM DEFAULT CHARSET=latin1
51
select length(a), length(b) from t1;
55
insert into t1 values("ccc", "ddd");
56
select length(a), length(b) from t1;
61
select hex(a), hex(b) from t1;
66
select concat("'", a, "'"), concat("'", b, "'") from t1;
67
concat("'", a, "'") concat("'", b, "'")
72
create table t1(a varbinary(255));
73
insert into t1 values("aaa ");
74
select length(a) from t1;
77
alter table t1 modify a varchar(255);
78
select length(a) from t1;
82
drop table if exists table_28127_a;
83
drop table if exists table_28127_b;
84
create table table_28127_a(0b02 int);
85
show create table table_28127_a;
87
table_28127_a CREATE TABLE `table_28127_a` (
88
`0b02` int(11) DEFAULT NULL
89
) ENGINE=MyISAM DEFAULT CHARSET=latin1
90
create table table_28127_b(0b2 int);
91
show create table table_28127_b;
93
table_28127_b CREATE TABLE `table_28127_b` (
94
`0b2` int(11) DEFAULT NULL
95
) ENGINE=MyISAM DEFAULT CHARSET=latin1
96
drop table table_28127_a;
97
drop table table_28127_b;