mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb sql/ha_ndbcluster.cc: Auto merged
This commit is contained in:
@ -112,9 +112,9 @@ unique key(a)
|
||||
) engine=ndb;
|
||||
insert into t1 values(1, 'aAa');
|
||||
insert into t1 values(2, 'aaa');
|
||||
ERROR 23000: Duplicate entry '2' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
insert into t1 values(3, 'AAA');
|
||||
ERROR 23000: Duplicate entry '3' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select * from t1 order by p;
|
||||
p a
|
||||
1 aAa
|
||||
@ -138,9 +138,9 @@ unique key(a)
|
||||
) engine=ndb;
|
||||
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
|
||||
insert into t1 values(99,'b');
|
||||
ERROR 23000: Duplicate entry '99' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
insert into t1 values(99,'a ');
|
||||
ERROR 23000: Duplicate entry '99' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select a,length(a) from t1 order by a;
|
||||
a length(a)
|
||||
A 1
|
||||
|
@ -1782,6 +1782,28 @@ select * from t5 where b like '%jo%' order by a;
|
||||
a b
|
||||
1 jonas
|
||||
3 johan
|
||||
set engine_condition_pushdown = off;
|
||||
select auto from t1 where date_time like '1902-02-02 %' order by auto;
|
||||
auto
|
||||
2
|
||||
select auto from t1 where date_time not like '1902-02-02 %' order by auto;
|
||||
auto
|
||||
3
|
||||
4
|
||||
set engine_condition_pushdown = on;
|
||||
explain select auto from t1 where date_time like '1902-02-02 %';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
|
||||
select auto from t1 where date_time like '1902-02-02 %' order by auto;
|
||||
auto
|
||||
2
|
||||
explain select auto from t1 where date_time not like '1902-02-02 %';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
|
||||
select auto from t1 where date_time not like '1902-02-02 %' order by auto;
|
||||
auto
|
||||
3
|
||||
4
|
||||
drop table t1;
|
||||
create table t1 (a int, b varchar(3), primary key using hash(a))
|
||||
engine=ndb;
|
||||
|
@ -22,7 +22,7 @@ select * from t1 where b = 4 order by a;
|
||||
a b c
|
||||
3 4 6
|
||||
insert into t1 values(8, 2, 3);
|
||||
ERROR 23000: Duplicate entry '8' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select * from t1 order by a;
|
||||
a b c
|
||||
1 2 3
|
||||
@ -89,7 +89,7 @@ a b c
|
||||
1 1 1
|
||||
4 4 NULL
|
||||
insert into t1 values(5,1,1);
|
||||
ERROR 23000: Duplicate entry '5' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
drop table t1;
|
||||
CREATE TABLE t2 (
|
||||
a int unsigned NOT NULL PRIMARY KEY,
|
||||
@ -112,7 +112,7 @@ select * from t2 where b = 4 order by a;
|
||||
a b c
|
||||
3 4 6
|
||||
insert into t2 values(8, 2, 3);
|
||||
ERROR 23000: Duplicate entry '8' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select * from t2 order by a;
|
||||
a b c
|
||||
1 2 3
|
||||
@ -177,7 +177,7 @@ pk a
|
||||
3 NULL
|
||||
4 4
|
||||
insert into t1 values (5,0);
|
||||
ERROR 23000: Duplicate entry '5' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select * from t1 order by pk;
|
||||
pk a
|
||||
-1 NULL
|
||||
@ -210,7 +210,7 @@ pk a b c
|
||||
0 NULL 18 NULL
|
||||
1 3 19 abc
|
||||
insert into t2 values(2,3,19,'abc');
|
||||
ERROR 23000: Duplicate entry '2' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select * from t2 order by pk;
|
||||
pk a b c
|
||||
-1 1 17 NULL
|
||||
@ -630,7 +630,7 @@ create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
|
||||
engine=ndb charset=utf8;
|
||||
insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
|
||||
insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
|
||||
ERROR 23000: Duplicate entry '2' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select a, sha1(b) from t1;
|
||||
a sha1(b)
|
||||
1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d
|
||||
|
@ -69,3 +69,35 @@ t3
|
||||
t4
|
||||
drop table t1, t2, t3, t4;
|
||||
drop table t1, t3, t4;
|
||||
create table t1(c1 int key)ENGINE=MyISAM;
|
||||
insert into t1 values(1),(3),(5);
|
||||
select * from t1 order by c1;
|
||||
c1
|
||||
1
|
||||
3
|
||||
5
|
||||
create table t1(c1 int key)ENGINE=MyISAM;
|
||||
insert into t1 values(100),(344),(533);
|
||||
select * from t1 order by c1;
|
||||
c1
|
||||
100
|
||||
344
|
||||
533
|
||||
alter table t1 engine=ndb;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
Warnings:
|
||||
Warning 1050 Local table test.t1 shadows ndb table
|
||||
select * from t1 order by c1;
|
||||
c1
|
||||
100
|
||||
344
|
||||
533
|
||||
drop table t1;
|
||||
select * from t1 order by c1;
|
||||
c1
|
||||
1
|
||||
3
|
||||
5
|
||||
drop table t1;
|
||||
|
@ -18,7 +18,7 @@ pk1 b c
|
||||
2 2 2
|
||||
4 1 1
|
||||
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
|
||||
ERROR 23000: Duplicate entry '1' for key 1
|
||||
ERROR 23000: Duplicate entry '' for key 0
|
||||
select * from t1 order by pk1;
|
||||
pk1 b c
|
||||
0 0 0
|
||||
|
@ -1649,6 +1649,16 @@ set engine_condition_pushdown = on;
|
||||
explain select * from t5 where b like '%jo%';
|
||||
select * from t5 where b like '%jo%' order by a;
|
||||
|
||||
# bug#21056 ndb pushdown equal/setValue error on datetime
|
||||
set engine_condition_pushdown = off;
|
||||
select auto from t1 where date_time like '1902-02-02 %' order by auto;
|
||||
select auto from t1 where date_time not like '1902-02-02 %' order by auto;
|
||||
set engine_condition_pushdown = on;
|
||||
explain select auto from t1 where date_time like '1902-02-02 %';
|
||||
select auto from t1 where date_time like '1902-02-02 %' order by auto;
|
||||
explain select auto from t1 where date_time not like '1902-02-02 %';
|
||||
select auto from t1 where date_time not like '1902-02-02 %' order by auto;
|
||||
|
||||
# bug#17421 -1
|
||||
drop table t1;
|
||||
create table t1 (a int, b varchar(3), primary key using hash(a))
|
||||
|
@ -69,4 +69,26 @@ drop table t1, t2, t3, t4;
|
||||
connection server2;
|
||||
drop table t1, t3, t4;
|
||||
|
||||
# bug#21378
|
||||
connection server1;
|
||||
create table t1(c1 int key)ENGINE=MyISAM;
|
||||
insert into t1 values(1),(3),(5);
|
||||
select * from t1 order by c1;
|
||||
|
||||
connection server2;
|
||||
create table t1(c1 int key)ENGINE=MyISAM;
|
||||
insert into t1 values(100),(344),(533);
|
||||
select * from t1 order by c1;
|
||||
|
||||
connection server1;
|
||||
alter table t1 engine=ndb;
|
||||
|
||||
connection server2;
|
||||
show tables;
|
||||
select * from t1 order by c1;
|
||||
drop table t1;
|
||||
|
||||
connection server1;
|
||||
select * from t1 order by c1;
|
||||
drop table t1;
|
||||
# End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user