mirror of
https://github.com/MariaDB/server.git
synced 2025-11-16 20:23:18 +03:00
Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0
This commit is contained in:
@@ -1066,6 +1066,52 @@ LENGTH(bug)
|
||||
100
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
SET NAMES utf8;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t1 VALUES('uu');
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 VALUES('uU');
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 VALUES('uu');
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 VALUES('uuABC');
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 VALUES('UuABC');
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 VALUES('uuABC');
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
alter table t1 add b int;
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1);
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',2);
|
||||
delete from t1 where b=1;
|
||||
INSERT INTO t1 VALUES('UUABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1);
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3);
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',4);
|
||||
delete from t1 where b=3;
|
||||
INSERT INTO t1 VALUES('uUABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3);
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
|
||||
SELECT id FROM t1;
|
||||
|
||||
@@ -596,6 +596,21 @@ GROUP_CONCAT(a ORDER BY a)
|
||||
,x
|
||||
,z
|
||||
DROP TABLE t1;
|
||||
create table t1(f1 int);
|
||||
insert into t1 values(1),(2),(3);
|
||||
select f1, group_concat(f1+1) from t1 group by f1 with rollup;
|
||||
f1 group_concat(f1+1)
|
||||
1 2
|
||||
2 3
|
||||
3 4
|
||||
NULL 2,3,4
|
||||
select count(distinct (f1+1)) from t1 group by f1 with rollup;
|
||||
count(distinct (f1+1))
|
||||
1
|
||||
1
|
||||
1
|
||||
3
|
||||
drop table t1;
|
||||
set names latin1;
|
||||
create table t1 (a char, b char);
|
||||
insert into t1 values ('a', 'a'), ('a', 'b'), ('b', 'a'), ('b', 'b');
|
||||
|
||||
@@ -12,7 +12,7 @@ explain extended select count(a) as b from t1 where a=0 having b >=0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Note 1003 select count(`test`.`t1`.`a`) AS `b` from `test`.`t1` where (`test`.`t1`.`a` = 0) having (count(`test`.`t1`.`a`) >= 0)
|
||||
Note 1003 select count(`test`.`t1`.`a`) AS `b` from `test`.`t1` where 0 having (count(`test`.`t1`.`a`) >= 0)
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
raw_id int(10) NOT NULL default '0',
|
||||
|
||||
@@ -3371,3 +3371,22 @@ NULL a NULL
|
||||
drop table t1,t2;
|
||||
select * from (select * left join t on f1=f2) tt;
|
||||
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 'on f1=f2) tt' at line 1
|
||||
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
|
||||
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
|
||||
INSERT INTO t1 VALUES
|
||||
(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10);
|
||||
INSERT INTO t2 VALUES
|
||||
(10, 10, 'aaa'), (20, 10, 'bbb'), (30, 10, 'ccc'), (40, 20, 'ddd'),
|
||||
(50, 10, 'eee'), (60, 20, 'fff'), (70, 20, 'ggg'), (80, 30, 'hhh');
|
||||
SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
|
||||
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
|
||||
sku sppr name sku pr
|
||||
20 10 bbb 10 10
|
||||
20 10 bbb 20 10
|
||||
EXPLAIN
|
||||
SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
|
||||
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
@@ -547,7 +547,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 Using index
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`numreponse` AS `numreponse` from `test`.`t1` where ((`test`.`t1`.`numreponse` = (select max(`test`.`t1`.`numreponse`) AS `MAX(numreponse)` from `test`.`t1` where (`test`.`t1`.`numeropost` = _latin1'1'))) and (`test`.`t1`.`numeropost` = _latin1'1'))
|
||||
Note 1003 select `test`.`t1`.`numreponse` AS `numreponse` from `test`.`t1` where ((`test`.`t1`.`numeropost` = _latin1'1'))
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a int(1));
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
@@ -15,7 +15,7 @@ explain extended select * from t1 where UNIQ=0x38afba1d73e6a18a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const UNIQ UNIQ 8 const 1
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`ID` AS `ID`,`test`.`t1`.`UNIQ` AS `UNIQ` from `test`.`t1` where (`test`.`t1`.`UNIQ` = 4084688022709641610)
|
||||
Note 1003 select `test`.`t1`.`ID` AS `ID`,`test`.`t1`.`UNIQ` AS `UNIQ` from `test`.`t1` where 1
|
||||
drop table t1;
|
||||
select x'hello';
|
||||
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
|
||||
|
||||
@@ -878,6 +878,40 @@ SELECT LENGTH(bug) FROM t2;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#17705: Corruption of compressed index when index length changes between
|
||||
# 254 and 256
|
||||
#
|
||||
|
||||
SET NAMES utf8;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t1 VALUES('uu');
|
||||
check table t1;
|
||||
INSERT INTO t1 VALUES('uU');
|
||||
check table t1;
|
||||
INSERT INTO t1 VALUES('uu');
|
||||
check table t1;
|
||||
INSERT INTO t1 VALUES('uuABC');
|
||||
check table t1;
|
||||
INSERT INTO t1 VALUES('UuABC');
|
||||
check table t1;
|
||||
INSERT INTO t1 VALUES('uuABC');
|
||||
check table t1;
|
||||
alter table t1 add b int;
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb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bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3);
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',4);
|
||||
delete from t1 where b=3;
|
||||
INSERT INTO t1 VALUES('uUABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3);
|
||||
check table t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
||||
@@ -389,6 +389,14 @@ SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY id;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
|
||||
#
|
||||
create table t1(f1 int);
|
||||
insert into t1 values(1),(2),(3);
|
||||
select f1, group_concat(f1+1) from t1 group by f1 with rollup;
|
||||
select count(distinct (f1+1)) from t1 group by f1 with rollup;
|
||||
drop table t1;
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
||||
@@ -2848,3 +2848,26 @@ drop table t1,t2;
|
||||
#
|
||||
--error 1064
|
||||
select * from (select * left join t on f1=f2) tt;
|
||||
|
||||
#
|
||||
# Bug #16504: re-evaluation of Item_equal object after reading const table
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
|
||||
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10);
|
||||
|
||||
INSERT INTO t2 VALUES
|
||||
(10, 10, 'aaa'), (20, 10, 'bbb'), (30, 10, 'ccc'), (40, 20, 'ddd'),
|
||||
(50, 10, 'eee'), (60, 20, 'fff'), (70, 20, 'ggg'), (80, 30, 'hhh');
|
||||
|
||||
SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
|
||||
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
|
||||
EXPLAIN
|
||||
SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
|
||||
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
|
||||
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
Reference in New Issue
Block a user