mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into mysql.com:/opt/local/work/mysql-5.0-runtime
This commit is contained in:
@ -1,3 +1,6 @@
|
||||
show variables like 'collation_server';
|
||||
Variable_name Value
|
||||
collation_server ucs2_unicode_ci
|
||||
show variables like "%character_set_ser%";
|
||||
Variable_name Value
|
||||
character_set_server ucs2
|
||||
|
@ -1558,6 +1558,8 @@ id
|
||||
3
|
||||
4
|
||||
5
|
||||
DROP TABLE federated.t1;
|
||||
DROP TABLE federated.t1;
|
||||
DROP TABLE IF EXISTS federated.bug_17377_table;
|
||||
CREATE TABLE federated.bug_17377_table (
|
||||
`fld_cid` bigint(20) NOT NULL auto_increment,
|
||||
@ -1601,6 +1603,92 @@ fld_cid fld_name fld_parentid fld_delt
|
||||
5 Torkel 0 0
|
||||
DROP TABLE federated.t1;
|
||||
DROP TABLE federated.bug_17377_table;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int);
|
||||
create table federated.t2 (id int, c1 varchar(20), c2 varchar(20));
|
||||
create table federated.t1 (i1 int, i2 int, i3 int) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
|
||||
create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:9308/federated/t2';
|
||||
insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
|
||||
insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
|
||||
select * from federated.t1 order by i1;
|
||||
i1 i2 i3
|
||||
1 5 10
|
||||
2 2 2
|
||||
3 7 12
|
||||
4 5 2
|
||||
9 10 15
|
||||
select * from federated.t2;
|
||||
id c1 c2
|
||||
9 abc def
|
||||
5 opq lmn
|
||||
2 test t t test
|
||||
update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
i1 i2 i3
|
||||
1 5 10
|
||||
2 15 2
|
||||
3 7 12
|
||||
4 5 2
|
||||
9 15 15
|
||||
select * from federated.t2 order by id;
|
||||
id c1 c2
|
||||
2 test t ppc
|
||||
5 opq lmn
|
||||
9 abc ppc
|
||||
delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
i1 i2 i3
|
||||
2 15 2
|
||||
3 7 12
|
||||
9 15 15
|
||||
select * from federated.t2 order by id;
|
||||
id c1 c2
|
||||
2 test t ppc
|
||||
9 abc ppc
|
||||
drop table federated.t1, federated.t2;
|
||||
drop table federated.t1, federated.t2;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int, primary key (i1));
|
||||
create table federated.t2 (id int, c1 varchar(20), c2 varchar(20), primary key (id));
|
||||
create table federated.t1 (i1 int auto_increment not null, i2 int, i3 int, primary key (i1)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
|
||||
create table federated.t2 (id int auto_increment not null, c1 varchar(20), c2 varchar(20), primary key(id)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:9308/federated/t2';
|
||||
insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
|
||||
insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
|
||||
select * from federated.t1 order by i1;
|
||||
i1 i2 i3
|
||||
1 5 10
|
||||
2 2 2
|
||||
3 7 12
|
||||
4 5 2
|
||||
9 10 15
|
||||
select * from federated.t2 order by id;
|
||||
id c1 c2
|
||||
2 test t t test
|
||||
5 opq lmn
|
||||
9 abc def
|
||||
update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
i1 i2 i3
|
||||
1 5 10
|
||||
2 15 2
|
||||
3 7 12
|
||||
4 5 2
|
||||
9 15 15
|
||||
select * from federated.t2 order by id;
|
||||
id c1 c2
|
||||
2 test t ppc
|
||||
5 opq lmn
|
||||
9 abc ppc
|
||||
delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
i1 i2 i3
|
||||
2 15 2
|
||||
3 7 12
|
||||
9 15 15
|
||||
select * from federated.t2 order by id;
|
||||
id c1 c2
|
||||
2 test t ppc
|
||||
9 abc ppc
|
||||
drop table federated.t1, federated.t2;
|
||||
drop table federated.t1, federated.t2;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
|
@ -694,3 +694,13 @@ alter table t1 add primary key pti(pt);
|
||||
ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
|
||||
alter table t1 add primary key pti(pt(20));
|
||||
drop table t1;
|
||||
create table t1 (g GEOMETRY);
|
||||
select * from t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 g g 255 4294967295 0 Y 144 0 63
|
||||
g
|
||||
select asbinary(g) from t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def asbinary(g) 252 8192 0 Y 128 0 63
|
||||
asbinary(g)
|
||||
drop table t1;
|
||||
|
@ -369,11 +369,11 @@ show keys from v4;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
select * from information_schema.views where TABLE_NAME like "v%";
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
|
||||
NULL test v0 select `schemata`.`SCHEMA_NAME` AS `c` from `information_schema`.`schemata` NONE NO root@localhost DEFINER
|
||||
NULL test v1 select `tables`.`TABLE_NAME` AS `c` from `information_schema`.`tables` where (`tables`.`TABLE_NAME` = _utf8'v1') NONE NO root@localhost DEFINER
|
||||
NULL test v2 select `columns`.`COLUMN_NAME` AS `c` from `information_schema`.`columns` where (`columns`.`TABLE_NAME` = _utf8'v2') NONE NO root@localhost DEFINER
|
||||
NULL test v3 select `character_sets`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`character_sets` where (`character_sets`.`CHARACTER_SET_NAME` like _utf8'latin1%') NONE NO root@localhost DEFINER
|
||||
NULL test v4 select `collations`.`COLLATION_NAME` AS `c` from `information_schema`.`collations` where (`collations`.`COLLATION_NAME` like _utf8'latin1%') NONE NO root@localhost DEFINER
|
||||
NULL test v0 /* ALGORITHM=UNDEFINED */ select `schemata`.`SCHEMA_NAME` AS `c` from `information_schema`.`schemata` NONE NO root@localhost DEFINER
|
||||
NULL test v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_NAME` AS `c` from `information_schema`.`tables` where (`tables`.`TABLE_NAME` = _utf8'v1') NONE NO root@localhost DEFINER
|
||||
NULL test v2 /* ALGORITHM=UNDEFINED */ select `columns`.`COLUMN_NAME` AS `c` from `information_schema`.`columns` where (`columns`.`TABLE_NAME` = _utf8'v2') NONE NO root@localhost DEFINER
|
||||
NULL test v3 /* ALGORITHM=UNDEFINED */ select `character_sets`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`character_sets` where (`character_sets`.`CHARACTER_SET_NAME` like _utf8'latin1%') NONE NO root@localhost DEFINER
|
||||
NULL test v4 /* ALGORITHM=UNDEFINED */ select `collations`.`COLLATION_NAME` AS `c` from `information_schema`.`collations` where (`collations`.`COLLATION_NAME` like _utf8'latin1%') NONE NO root@localhost DEFINER
|
||||
drop view v0, v1, v2, v3, v4;
|
||||
create table t1 (a int);
|
||||
grant select,update,insert on t1 to mysqltest_1@localhost;
|
||||
@ -464,9 +464,9 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION;
|
||||
create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION;
|
||||
select * from information_schema.views;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
|
||||
NULL test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER
|
||||
NULL test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER
|
||||
NULL test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER
|
||||
NULL test v1 /* ALGORITHM=UNDEFINED */ select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER
|
||||
NULL test v2 /* ALGORITHM=UNDEFINED */ select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER
|
||||
NULL test v3 /* ALGORITHM=UNDEFINED */ select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER
|
||||
grant select (a) on test.t1 to joe@localhost with grant option;
|
||||
select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
@ -1121,7 +1121,7 @@ select * from information_schema.views
|
||||
where table_name='v1' or table_name='v2';
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
|
||||
NULL test v1 NONE YES root@localhost DEFINER
|
||||
NULL test v2 select 1 AS `1` NONE NO mysqltest_1@localhost DEFINER
|
||||
NULL test v2 /* ALGORITHM=UNDEFINED */ select 1 AS `1` NONE NO mysqltest_1@localhost DEFINER
|
||||
drop view v1, v2;
|
||||
drop table t1;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
@ -420,3 +420,34 @@ ERROR HY000: There is no 'mysqltest_1'@'localhost' registered
|
||||
---> connection: root
|
||||
DROP USER mysqltest_2@localhost;
|
||||
DROP DATABASE mysqltest;
|
||||
GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
|
||||
user19857@localhost;
|
||||
SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
|
||||
Host User Password
|
||||
localhost user19857 *82DC221D557298F6CE9961037DB1C90604792F5C
|
||||
|
||||
---> connection: mysqltest_2_con
|
||||
use test;
|
||||
CREATE PROCEDURE sp19857() DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE a INT;
|
||||
SET a=1;
|
||||
SELECT a;
|
||||
END //
|
||||
SHOW CREATE PROCEDURE test.sp19857;
|
||||
Procedure sql_mode Create Procedure
|
||||
sp19857 CREATE DEFINER=`user19857`@`localhost` PROCEDURE `sp19857`()
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE a INT;
|
||||
SET a=1;
|
||||
SELECT a;
|
||||
END
|
||||
DROP PROCEDURE IF EXISTS test.sp19857;
|
||||
|
||||
---> connection: root
|
||||
SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
|
||||
Host User Password
|
||||
localhost user19857 *82DC221D557298F6CE9961037DB1C90604792F5C
|
||||
DROP USER user19857@localhost;
|
||||
|
@ -421,6 +421,28 @@ set tmp_table_size=100;
|
||||
set tx_isolation="READ-COMMITTED";
|
||||
set wait_timeout=100;
|
||||
set log_warnings=1;
|
||||
select @@session.insert_id;
|
||||
@@session.insert_id
|
||||
1
|
||||
set @save_insert_id=@@session.insert_id;
|
||||
set session insert_id=20;
|
||||
select @@session.insert_id;
|
||||
@@session.insert_id
|
||||
20
|
||||
set session last_insert_id=100;
|
||||
select @@session.insert_id;
|
||||
@@session.insert_id
|
||||
20
|
||||
select @@session.last_insert_id;
|
||||
@@session.last_insert_id
|
||||
100
|
||||
select @@session.insert_id;
|
||||
@@session.insert_id
|
||||
20
|
||||
set @@session.insert_id=@save_insert_id;
|
||||
select @@session.insert_id;
|
||||
@@session.insert_id
|
||||
1
|
||||
create table t1 (a int not null auto_increment, primary key(a));
|
||||
create table t2 (a int not null auto_increment, primary key(a));
|
||||
insert into t1 values(null),(null),(null);
|
||||
|
@ -1 +1 @@
|
||||
--default-character-set=ucs2 --default-collation=ucs2_unicode_ci
|
||||
--default-collation=ucs2_unicode_ci --default-character-set=ucs2
|
||||
|
@ -1,3 +1,8 @@
|
||||
#
|
||||
# MySQL Bug#15276: MySQL ignores collation-server
|
||||
#
|
||||
show variables like 'collation_server';
|
||||
|
||||
#
|
||||
# Bug#18004 Connecting crashes server when default charset is UCS2
|
||||
#
|
||||
|
@ -1254,6 +1254,10 @@ SELECT LAST_INSERT_ID();
|
||||
INSERT INTO federated.t1 VALUES ();
|
||||
SELECT LAST_INSERT_ID();
|
||||
SELECT * FROM federated.t1;
|
||||
DROP TABLE federated.t1;
|
||||
|
||||
connection slave;
|
||||
DROP TABLE federated.t1;
|
||||
|
||||
#
|
||||
# Bug#17377 Federated Engine returns wrong Data, always the rows
|
||||
@ -1309,5 +1313,54 @@ DROP TABLE federated.t1;
|
||||
connection slave;
|
||||
DROP TABLE federated.bug_17377_table;
|
||||
|
||||
#
|
||||
# BUG 19773 Crash when using multi-table updates, deletes
|
||||
# with federated tables
|
||||
#
|
||||
connection slave;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int);
|
||||
create table federated.t2 (id int, c1 varchar(20), c2 varchar(20));
|
||||
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.t1 (i1 int, i2 int, i3 int) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
|
||||
eval create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2';
|
||||
insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
|
||||
insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
|
||||
select * from federated.t1 order by i1;
|
||||
select * from federated.t2;
|
||||
update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
select * from federated.t2 order by id;
|
||||
delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
select * from federated.t2 order by id;
|
||||
drop table federated.t1, federated.t2;
|
||||
connection slave;
|
||||
drop table federated.t1, federated.t2;
|
||||
|
||||
# Test multi updates and deletes with keys
|
||||
connection slave;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int, primary key (i1));
|
||||
create table federated.t2 (id int, c1 varchar(20), c2 varchar(20), primary key (id));
|
||||
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.t1 (i1 int auto_increment not null, i2 int, i3 int, primary key (i1)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
|
||||
eval create table federated.t2 (id int auto_increment not null, c1 varchar(20), c2 varchar(20), primary key(id)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2';
|
||||
insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
|
||||
insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
|
||||
select * from federated.t1 order by i1;
|
||||
select * from federated.t2 order by id;
|
||||
update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
select * from federated.t2 order by id;
|
||||
delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
|
||||
select * from federated.t1 order by i1;
|
||||
select * from federated.t2 order by id;
|
||||
drop table federated.t1, federated.t2;
|
||||
|
||||
connection slave;
|
||||
drop table federated.t1, federated.t2;
|
||||
|
||||
source include/federated_cleanup.inc;
|
||||
|
@ -409,3 +409,10 @@ create table t1(pt GEOMETRY);
|
||||
alter table t1 add primary key pti(pt);
|
||||
alter table t1 add primary key pti(pt(20));
|
||||
drop table t1;
|
||||
|
||||
--enable_metadata
|
||||
create table t1 (g GEOMETRY);
|
||||
select * from t1;
|
||||
select asbinary(g) from t1;
|
||||
--disable_metadata
|
||||
drop table t1;
|
||||
|
@ -610,7 +610,7 @@ drop database db1;
|
||||
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
|
||||
#
|
||||
|
||||
--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-extra-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
|
||||
--exec $MYSQL_MY_PRINT_DEFAULTS --config-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
|
||||
|
||||
|
||||
#
|
||||
|
@ -744,4 +744,50 @@ DROP USER mysqltest_2@localhost;
|
||||
DROP DATABASE mysqltest;
|
||||
|
||||
|
||||
#
|
||||
# Bug#19857 - When a user with CREATE ROUTINE priv creates a routine,
|
||||
# it results in NULL p/w
|
||||
#
|
||||
|
||||
# Can't test with embedded server that doesn't support grants
|
||||
|
||||
GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
|
||||
user19857@localhost;
|
||||
SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
|
||||
|
||||
--connect (mysqltest_2_con,localhost,user19857,meow,test)
|
||||
--echo
|
||||
--echo ---> connection: mysqltest_2_con
|
||||
--connection mysqltest_2_con
|
||||
|
||||
use test;
|
||||
|
||||
DELIMITER //;
|
||||
CREATE PROCEDURE sp19857() DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE a INT;
|
||||
SET a=1;
|
||||
SELECT a;
|
||||
END //
|
||||
DELIMITER ;//
|
||||
|
||||
SHOW CREATE PROCEDURE test.sp19857;
|
||||
|
||||
--disconnect mysqltest_2_con
|
||||
--connect (mysqltest_2_con,localhost,user19857,meow,test)
|
||||
--connection mysqltest_2_con
|
||||
|
||||
DROP PROCEDURE IF EXISTS test.sp19857;
|
||||
|
||||
--echo
|
||||
--echo ---> connection: root
|
||||
--connection con1root
|
||||
|
||||
--disconnect mysqltest_2_con
|
||||
|
||||
SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
|
||||
|
||||
DROP USER user19857@localhost;
|
||||
|
||||
# End of 5.0 bugs.
|
||||
|
@ -301,6 +301,22 @@ set tx_isolation="READ-COMMITTED";
|
||||
set wait_timeout=100;
|
||||
set log_warnings=1;
|
||||
|
||||
#
|
||||
# Bugs: #20392: INSERT_ID session variable has weird value
|
||||
#
|
||||
select @@session.insert_id;
|
||||
set @save_insert_id=@@session.insert_id;
|
||||
set session insert_id=20;
|
||||
select @@session.insert_id;
|
||||
|
||||
set session last_insert_id=100;
|
||||
select @@session.insert_id;
|
||||
select @@session.last_insert_id;
|
||||
select @@session.insert_id;
|
||||
|
||||
set @@session.insert_id=@save_insert_id;
|
||||
select @@session.insert_id;
|
||||
|
||||
#
|
||||
# key buffer
|
||||
#
|
||||
|
Reference in New Issue
Block a user