mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge work:/my/mysql-4.0 into mashka.mysql.fi:/home/my/mysql-4.0
BitKeeper/etc/ignore: auto-union configure.in: Auto merged
This commit is contained in:
@ -1,93 +1,95 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (a char (20) not null, b int not null auto_increment, index (a,b),index(b));
|
||||
create table t1 (a char (20) not null, b int not null auto_increment, index (a,b));
|
||||
insert into t1 (a) values ('<27>'),('ac'),('ae'),('ad'),('<27>c'),('aeb');
|
||||
insert into t1 (a) values ('<27>c'),('uc'),('ue'),('ud'),('<27>'),('ueb'),('uf');
|
||||
insert into t1 (a) values ('<27>'),('oc'),('<27>a'),('oe'),('od'),('<27>c'),('oeb');
|
||||
insert into t1 (a) values ('s'),('ss'),('<27>'),('<27>b'),('ssa'),('ssc'),('<27>a');
|
||||
insert into t1 (a) values ('e<>'),('u<>'),('<27>o'),('<27><>'),('<27><>a'),('aeae');
|
||||
insert into t1 (a) values ('q'),('a'),('u'),('o'),('<27>'),('<27>');
|
||||
insert into t1 (a) values ('q'),('a'),('u'),('o'),('<27>'),('<27>'),('a');
|
||||
select a,b from t1 order by a,b;
|
||||
a b
|
||||
a 35
|
||||
ac 2
|
||||
ad 4
|
||||
a 1
|
||||
a 2
|
||||
ac 1
|
||||
ad 1
|
||||
<EFBFBD> 1
|
||||
ae 3
|
||||
<EFBFBD><EFBFBD> 31
|
||||
aeae 33
|
||||
<EFBFBD><EFBFBD>a 32
|
||||
aeb 6
|
||||
<EFBFBD>c 5
|
||||
<EFBFBD> 38
|
||||
<EFBFBD> 39
|
||||
e<EFBFBD> 28
|
||||
o 37
|
||||
oc 15
|
||||
od 18
|
||||
<EFBFBD> 14
|
||||
oe 17
|
||||
<EFBFBD>a 16
|
||||
oeb 20
|
||||
<EFBFBD>c 19
|
||||
<EFBFBD>o 30
|
||||
q 34
|
||||
s 21
|
||||
ss 22
|
||||
<EFBFBD> 23
|
||||
ssa 25
|
||||
<EFBFBD>a 27
|
||||
<EFBFBD>b 24
|
||||
ssc 26
|
||||
u 36
|
||||
uc 8
|
||||
ud 10
|
||||
ue 9
|
||||
<EFBFBD> 11
|
||||
ueb 12
|
||||
<EFBFBD>c 7
|
||||
uf 13
|
||||
u<EFBFBD> 29
|
||||
ae 2
|
||||
<EFBFBD><EFBFBD> 1
|
||||
aeae 2
|
||||
<EFBFBD><EFBFBD>a 1
|
||||
aeb 1
|
||||
<EFBFBD>c 1
|
||||
<EFBFBD> 1
|
||||
<EFBFBD> 2
|
||||
e<EFBFBD> 1
|
||||
o 1
|
||||
oc 1
|
||||
od 1
|
||||
<EFBFBD> 1
|
||||
oe 2
|
||||
<EFBFBD>a 1
|
||||
oeb 1
|
||||
<EFBFBD>c 1
|
||||
<EFBFBD>o 1
|
||||
q 1
|
||||
s 1
|
||||
ss 1
|
||||
<EFBFBD> 2
|
||||
ssa 1
|
||||
<EFBFBD>a 2
|
||||
<EFBFBD>b 1
|
||||
ssc 1
|
||||
u 1
|
||||
uc 1
|
||||
ud 1
|
||||
ue 1
|
||||
<EFBFBD> 2
|
||||
ueb 1
|
||||
<EFBFBD>c 1
|
||||
uf 1
|
||||
u<EFBFBD> 1
|
||||
select a,b from t1 order by upper(a),b;
|
||||
a b
|
||||
a 35
|
||||
ac 2
|
||||
ad 4
|
||||
a 1
|
||||
a 2
|
||||
ac 1
|
||||
ad 1
|
||||
<EFBFBD> 1
|
||||
ae 3
|
||||
<EFBFBD><EFBFBD> 31
|
||||
aeae 33
|
||||
<EFBFBD><EFBFBD>a 32
|
||||
aeb 6
|
||||
<EFBFBD>c 5
|
||||
<EFBFBD> 38
|
||||
<EFBFBD> 39
|
||||
e<EFBFBD> 28
|
||||
o 37
|
||||
oc 15
|
||||
od 18
|
||||
<EFBFBD> 14
|
||||
oe 17
|
||||
<EFBFBD>a 16
|
||||
oeb 20
|
||||
<EFBFBD>c 19
|
||||
<EFBFBD>o 30
|
||||
q 34
|
||||
s 21
|
||||
ss 22
|
||||
<EFBFBD> 23
|
||||
ssa 25
|
||||
<EFBFBD>a 27
|
||||
<EFBFBD>b 24
|
||||
ssc 26
|
||||
u 36
|
||||
uc 8
|
||||
ud 10
|
||||
ue 9
|
||||
<EFBFBD> 11
|
||||
ueb 12
|
||||
<EFBFBD>c 7
|
||||
uf 13
|
||||
u<EFBFBD> 29
|
||||
ae 2
|
||||
<EFBFBD><EFBFBD> 1
|
||||
aeae 2
|
||||
<EFBFBD><EFBFBD>a 1
|
||||
aeb 1
|
||||
<EFBFBD>c 1
|
||||
<EFBFBD> 1
|
||||
<EFBFBD> 2
|
||||
e<EFBFBD> 1
|
||||
o 1
|
||||
oc 1
|
||||
od 1
|
||||
<EFBFBD> 1
|
||||
oe 2
|
||||
<EFBFBD>a 1
|
||||
oeb 1
|
||||
<EFBFBD>c 1
|
||||
<EFBFBD>o 1
|
||||
q 1
|
||||
s 1
|
||||
ss 1
|
||||
<EFBFBD> 2
|
||||
ssa 1
|
||||
<EFBFBD>a 2
|
||||
<EFBFBD>b 1
|
||||
ssc 1
|
||||
u 1
|
||||
uc 1
|
||||
ud 1
|
||||
ue 1
|
||||
<EFBFBD> 2
|
||||
ueb 1
|
||||
<EFBFBD>c 1
|
||||
uf 1
|
||||
u<EFBFBD> 1
|
||||
select a from t1 order by a desc;
|
||||
a
|
||||
u<EFBFBD>
|
||||
@ -129,44 +131,46 @@ ae
|
||||
ad
|
||||
ac
|
||||
a
|
||||
a
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select * from t1 where a like "<22>%";
|
||||
a b
|
||||
<EFBFBD> 14
|
||||
<EFBFBD>a 16
|
||||
<EFBFBD>c 19
|
||||
<EFBFBD>o 30
|
||||
<EFBFBD> 1
|
||||
<EFBFBD>a 1
|
||||
<EFBFBD>c 1
|
||||
<EFBFBD>o 1
|
||||
select * from t1 where a like binary "%<25>%";
|
||||
a b
|
||||
<EFBFBD> 39
|
||||
<EFBFBD> 2
|
||||
select * from t1 where a like "%<25>%";
|
||||
a b
|
||||
a 35
|
||||
ac 2
|
||||
ad 4
|
||||
ae 3
|
||||
aeae 33
|
||||
<EFBFBD><EFBFBD>a 32
|
||||
aeb 6
|
||||
<EFBFBD>a 16
|
||||
ssa 25
|
||||
<EFBFBD>a 27
|
||||
a 1
|
||||
a 2
|
||||
ac 1
|
||||
ad 1
|
||||
ae 2
|
||||
aeae 2
|
||||
<EFBFBD><EFBFBD>a 1
|
||||
aeb 1
|
||||
<EFBFBD>a 1
|
||||
ssa 1
|
||||
<EFBFBD>a 2
|
||||
select * from t1 where a like "%U%";
|
||||
a b
|
||||
u 36
|
||||
uc 8
|
||||
ud 10
|
||||
ue 9
|
||||
ueb 12
|
||||
uf 13
|
||||
u<EFBFBD> 29
|
||||
u 1
|
||||
uc 1
|
||||
ud 1
|
||||
ue 1
|
||||
ueb 1
|
||||
uf 1
|
||||
u<EFBFBD> 1
|
||||
select * from t1 where a like "%ss%";
|
||||
a b
|
||||
ss 22
|
||||
ssa 25
|
||||
ssc 26
|
||||
ss 1
|
||||
ssa 1
|
||||
ssc 1
|
||||
drop table t1;
|
||||
select strcmp('<27>','ae'),strcmp('ae','<27>'),strcmp('aeq','<27>q'),strcmp('<27>q','aeq');
|
||||
strcmp('<27>','ae') strcmp('ae','<27>') strcmp('aeq','<27>q') strcmp('<27>q','aeq')
|
||||
|
@ -24,3 +24,18 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
|
||||
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
|
||||
delete from t1 where a=27;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
bool char(0) default NULL,
|
||||
not_null varchar(20) binary NOT NULL default '',
|
||||
misc integer not null,
|
||||
PRIMARY KEY (not_null)
|
||||
) TYPE=MyISAM;
|
||||
INSERT INTO t1 VALUES (NULL,'a',4), (NULL,'b',5), (NULL,'c',6), (NULL,'d',7);
|
||||
select * from t1 where misc > 5 and bool is null;
|
||||
bool not_null misc
|
||||
NULL c 6
|
||||
NULL d 7
|
||||
delete from t1 where misc > 5 and bool is null;
|
||||
select * from t1 where misc > 5 and bool is null;
|
||||
bool not_null misc
|
||||
drop table t1;
|
||||
|
@ -1,4 +1,3 @@
|
||||
use test;
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
CREATE TABLE t1 (
|
||||
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
|
||||
|
@ -78,3 +78,9 @@ EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ref expedition expedition 8 const 1 Using where
|
||||
drop table t1;
|
||||
create table t1 (a datetime not null, b datetime not null);
|
||||
insert into t1 values (now(), now());
|
||||
insert into t1 values (now(), now());
|
||||
select * from t1 where a is null or b is null;
|
||||
a b
|
||||
drop table t1;
|
||||
|
@ -2,13 +2,13 @@
|
||||
# Test latin_de character set
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (a char (20) not null, b int not null auto_increment, index (a,b),index(b));
|
||||
create table t1 (a char (20) not null, b int not null auto_increment, index (a,b));
|
||||
insert into t1 (a) values ('<27>'),('ac'),('ae'),('ad'),('<27>c'),('aeb');
|
||||
insert into t1 (a) values ('<27>c'),('uc'),('ue'),('ud'),('<27>'),('ueb'),('uf');
|
||||
insert into t1 (a) values ('<27>'),('oc'),('<27>a'),('oe'),('od'),('<27>c'),('oeb');
|
||||
insert into t1 (a) values ('s'),('ss'),('<27>'),('<27>b'),('ssa'),('ssc'),('<27>a');
|
||||
insert into t1 (a) values ('e<>'),('u<>'),('<27>o'),('<27><>'),('<27><>a'),('aeae');
|
||||
insert into t1 (a) values ('q'),('a'),('u'),('o'),('<27>'),('<27>');
|
||||
insert into t1 (a) values ('q'),('a'),('u'),('o'),('<27>'),('<27>'),('a');
|
||||
select a,b from t1 order by a,b;
|
||||
select a,b from t1 order by upper(a),b;
|
||||
select a from t1 order by a desc;
|
||||
|
@ -35,3 +35,23 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
|
||||
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
|
||||
delete from t1 where a=27;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# CHAR(0) bug - not actually DELETE bug, but anyway...
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
bool char(0) default NULL,
|
||||
not_null varchar(20) binary NOT NULL default '',
|
||||
misc integer not null,
|
||||
PRIMARY KEY (not_null)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
INSERT INTO t1 VALUES (NULL,'a',4), (NULL,'b',5), (NULL,'c',6), (NULL,'d',7);
|
||||
|
||||
select * from t1 where misc > 5 and bool is null;
|
||||
delete from t1 where misc > 5 and bool is null;
|
||||
select * from t1 where misc > 5 and bool is null;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
# Simple select test
|
||||
#
|
||||
|
||||
use test;
|
||||
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
|
@ -59,3 +59,8 @@ INSERT INTO t1 (numfacture,expedition) VALUES ('1212','0001-00-00 00:00:00');
|
||||
SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
|
||||
EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
|
||||
drop table t1;
|
||||
create table t1 (a datetime not null, b datetime not null);
|
||||
insert into t1 values (now(), now());
|
||||
insert into t1 values (now(), now());
|
||||
select * from t1 where a is null or b is null;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user