mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
This commit is contained in:
@ -61,6 +61,7 @@ dist-hook:
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
|
||||
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
|
||||
|
||||
@ -89,6 +90,7 @@ install-data-local:
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
|
||||
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
|
||||
|
||||
|
@ -79,7 +79,7 @@ Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`id` int(20) NOT NULL,
|
||||
`name` varchar(32) NOT NULL default ''
|
||||
) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:9308/federated/t1'
|
||||
) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'
|
||||
INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
|
||||
INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
|
||||
SELECT * FROM federated.t2;
|
||||
|
File diff suppressed because one or more lines are too long
22
mysql-test/r/rpl_dual_pos_advance.result
Normal file
22
mysql-test/r/rpl_dual_pos_advance.result
Normal file
@ -0,0 +1,22 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
reset master;
|
||||
change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
|
||||
start slave;
|
||||
create table t1 (n int);
|
||||
create table t4 (n int);
|
||||
create table t5 (n int);
|
||||
create table t6 (n int);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
t4
|
||||
t5
|
||||
t6
|
||||
stop slave;
|
||||
reset slave;
|
||||
drop table t1,t4,t5,t6;
|
@ -264,6 +264,14 @@ master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1)
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
create procedure foo()
|
||||
not deterministic
|
||||
reads sql data
|
||||
select * from t1;
|
||||
call foo();
|
||||
a
|
||||
1
|
||||
drop procedure foo;
|
||||
drop function fn1;
|
||||
drop database mysqltest1;
|
||||
drop user "zedjzlcsjhd"@127.0.0.1;
|
||||
|
@ -834,3 +834,41 @@ ERROR HY000: Not allowed to set autocommit from a stored function or trigger
|
||||
create trigger bug12712
|
||||
before insert on t1 for each row set session autocommit = 0;
|
||||
ERROR HY000: Not allowed to set autocommit from a stored function or trigger
|
||||
drop procedure if exists bug13510_1|
|
||||
drop procedure if exists bug13510_2|
|
||||
drop procedure if exists bug13510_3|
|
||||
drop procedure if exists bug13510_4|
|
||||
create procedure bug13510_1()
|
||||
begin
|
||||
declare password varchar(10);
|
||||
set password = 'foo1';
|
||||
select password;
|
||||
end|
|
||||
ERROR 42000: Variable 'password' must be quoted with `...`, or renamed
|
||||
create procedure bug13510_2()
|
||||
begin
|
||||
declare names varchar(10);
|
||||
set names = 'foo2';
|
||||
select names;
|
||||
end|
|
||||
ERROR 42000: Variable 'names' must be quoted with `...`, or renamed
|
||||
create procedure bug13510_3()
|
||||
begin
|
||||
declare password varchar(10);
|
||||
set `password` = 'foo3';
|
||||
select password;
|
||||
end|
|
||||
create procedure bug13510_4()
|
||||
begin
|
||||
declare names varchar(10);
|
||||
set `names` = 'foo4';
|
||||
select names;
|
||||
end|
|
||||
call bug13510_3()|
|
||||
password
|
||||
foo3
|
||||
call bug13510_4()|
|
||||
names
|
||||
foo4
|
||||
drop procedure bug13510_3|
|
||||
drop procedure bug13510_4|
|
||||
|
@ -2987,3 +2987,4 @@ select * from (select max(fld) from t1) as foo;
|
||||
max(fld)
|
||||
1
|
||||
drop table t1;
|
||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
|
@ -75,7 +75,8 @@ eval CREATE TABLE federated.t2 (
|
||||
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
|
||||
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
|
||||
|
||||
SHOW CREATE TABLE federated.t2;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval SHOW CREATE TABLE federated.t2;
|
||||
|
||||
INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
|
||||
INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
|
||||
|
@ -907,3 +907,24 @@ DROP PROCEDURE bug9056_proc1;
|
||||
DROP PROCEDURE bug9056_proc2;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG# 13052 - mysqldump timestamp reloads broken
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (`d` timestamp, unique (`d`));
|
||||
set time_zone='+00:00';
|
||||
insert into t1 values ('2003-10-25 22:00:00'),('2003-10-25 23:00:00');
|
||||
# results should show two different time values
|
||||
select * from t1;
|
||||
set time_zone='Europe/Moscow';
|
||||
# results should show two same time values, despite unique
|
||||
select * from t1;
|
||||
set global time_zone='Europe/Moscow';
|
||||
--exec $MYSQL_DUMP --skip-comments --databases test
|
||||
--exec $MYSQL_DUMP --skip-tz-utc --skip-comments --databases test
|
||||
drop table t1;
|
||||
set global time_zone=default;
|
||||
set time_zone=default;
|
||||
|
1
mysql-test/t/rpl_dual_pos_advance-master.opt
Normal file
1
mysql-test/t/rpl_dual_pos_advance-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--loose-to-force-a-restart
|
108
mysql-test/t/rpl_dual_pos_advance.test
Normal file
108
mysql-test/t/rpl_dual_pos_advance.test
Normal file
@ -0,0 +1,108 @@
|
||||
# This test checks that in a dual-head setup
|
||||
# A->B->A, where A has --log-slave-updates (why would it?
|
||||
# assume that there is a C as slave of A),
|
||||
# then the Exec_master_log_pos of SHOW SLAVE STATUS does
|
||||
# not stay too low on B(BUG#13023 due to events ignored because
|
||||
# of their server id).
|
||||
# It also will test BUG#13861.
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
|
||||
# set up "dual head"
|
||||
|
||||
connection slave;
|
||||
reset master;
|
||||
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root";
|
||||
|
||||
start slave;
|
||||
|
||||
# now we test it
|
||||
|
||||
connection slave;
|
||||
|
||||
create table t1 (n int);
|
||||
|
||||
save_master_pos;
|
||||
connection master;
|
||||
sync_with_master;
|
||||
|
||||
# Now test BUG#13861. This will be enabled when Guilhem fixes this
|
||||
# bug.
|
||||
|
||||
# stop slave
|
||||
|
||||
# create table t2 (n int); # create one ignored event
|
||||
|
||||
# save_master_pos;
|
||||
# connection slave;
|
||||
# sync_with_master;
|
||||
|
||||
# connection slave;
|
||||
|
||||
# show tables;
|
||||
|
||||
# save_master_pos;
|
||||
|
||||
# create table t3 (n int);
|
||||
|
||||
# connection master;
|
||||
|
||||
# bug is that START SLAVE UNTIL may stop too late, we test that by
|
||||
# asking it to stop before creation of t3.
|
||||
|
||||
# start slave until master_log_file="slave-bin.000001",master_log_pos=195;
|
||||
|
||||
# wait until it's started (the position below is the start of "CREATE
|
||||
# TABLE t2") (otherwise wait_for_slave_to_stop may return at once)
|
||||
|
||||
# select master_pos_wait("slave-bin.000001",137);
|
||||
|
||||
# wait_for_slave_to_stop;
|
||||
|
||||
# then BUG#13861 causes t3 to show up below (because stopped too
|
||||
# late).
|
||||
|
||||
# show tables;
|
||||
|
||||
# start slave;
|
||||
|
||||
# BUG#13023 is that Exec_master_log_pos may stay too low "forever":
|
||||
|
||||
connection master;
|
||||
|
||||
create table t4 (n int); # create 3 ignored events
|
||||
create table t5 (n int);
|
||||
create table t6 (n int);
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
||||
connection slave;
|
||||
|
||||
save_master_pos;
|
||||
|
||||
connection master;
|
||||
|
||||
# then BUG#13023 caused hang below ("master" looks behind, while it's
|
||||
# not in terms of updates done).
|
||||
|
||||
sync_with_master;
|
||||
|
||||
show tables;
|
||||
|
||||
# cleanup
|
||||
|
||||
stop slave;
|
||||
reset slave;
|
||||
drop table t1,t4,t5,t6; # add t2 and t3 later
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
||||
# End of 4.1 tests
|
@ -258,6 +258,23 @@ sync_slave_with_master;
|
||||
select * from t1;
|
||||
|
||||
|
||||
#
|
||||
# Test for bug #13969 "Routines which are replicated from master can't be
|
||||
# executed on slave".
|
||||
#
|
||||
connection master;
|
||||
create procedure foo()
|
||||
not deterministic
|
||||
reads sql data
|
||||
select * from t1;
|
||||
sync_slave_with_master;
|
||||
# This should not fail
|
||||
call foo();
|
||||
connection master;
|
||||
drop procedure foo;
|
||||
sync_slave_with_master;
|
||||
|
||||
|
||||
# Clean up
|
||||
connection master;
|
||||
drop function fn1;
|
||||
|
@ -1212,6 +1212,59 @@ call bug9367();
|
||||
drop procedure bug9367;
|
||||
drop table t1;
|
||||
--enable_parsing
|
||||
|
||||
#
|
||||
# BUG#13510: Setting password local variable changes current password
|
||||
#
|
||||
delimiter |;
|
||||
--disable_warnings
|
||||
drop procedure if exists bug13510_1|
|
||||
drop procedure if exists bug13510_2|
|
||||
drop procedure if exists bug13510_3|
|
||||
drop procedure if exists bug13510_4|
|
||||
--enable_warnings
|
||||
|
||||
--error ER_SP_BAD_VAR_SHADOW
|
||||
create procedure bug13510_1()
|
||||
begin
|
||||
declare password varchar(10);
|
||||
|
||||
set password = 'foo1';
|
||||
select password;
|
||||
end|
|
||||
|
||||
--error ER_SP_BAD_VAR_SHADOW
|
||||
create procedure bug13510_2()
|
||||
begin
|
||||
declare names varchar(10);
|
||||
|
||||
set names = 'foo2';
|
||||
select names;
|
||||
end|
|
||||
|
||||
create procedure bug13510_3()
|
||||
begin
|
||||
declare password varchar(10);
|
||||
|
||||
set `password` = 'foo3';
|
||||
select password;
|
||||
end|
|
||||
|
||||
create procedure bug13510_4()
|
||||
begin
|
||||
declare names varchar(10);
|
||||
|
||||
set `names` = 'foo4';
|
||||
select names;
|
||||
end|
|
||||
|
||||
call bug13510_3()|
|
||||
call bug13510_4()|
|
||||
|
||||
drop procedure bug13510_3|
|
||||
drop procedure bug13510_4|
|
||||
delimiter ;|
|
||||
|
||||
#
|
||||
# BUG#NNNN: New bug synopsis
|
||||
#
|
||||
|
@ -1962,4 +1962,9 @@ insert into t1 values ('1');
|
||||
select * from (select max(fld) from t1) as foo;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG #10308: purge log with subselect
|
||||
#
|
||||
|
||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
|
||||
|
Reference in New Issue
Block a user