Commit 4e0cace2 authored by unknown's avatar unknown

Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


mysql-test/extra/rpl_tests/rpl_deadlock.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
  Auto merged
mysql-test/r/key_cache.result:
  Auto merged
mysql-test/r/rpl_deadlock_innodb.result:
  Auto merged
mysql-test/r/rpl_sp.result:
  Auto merged
mysql-test/r/rpl_stm_max_relay_size.result:
  Auto merged
mysql-test/r/rpl_timezone.result:
  Auto merged
mysql-test/r/type_float.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/init_connect.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
mysql-test/r/mysqldump.result:
  Manual merge
mysql-test/r/rpl_drop_db.result:
  Manual merge
mysql-test/r/rpl_variables.result:
  Manual merge
mysql-test/t/rpl_drop_db.test:
  Manual merge
mysql-test/t/rpl_sp.test:
  Manual merge
mysql-test/t/rpl_timezone.test:
  Manual merge
mysql-test/t/rpl_variables.test:
  Manual merge
parents 37b4ad8c 8b8647ff
...@@ -91,7 +91,7 @@ show slave status; ...@@ -91,7 +91,7 @@ show slave status;
# Now we repeat 2), but with BEGIN in the same relay log as # Now we repeat 2), but with BEGIN in the same relay log as
# COMMIT (to see if seeking into hot log is ok). # COMMIT (to see if seeking into hot log is ok).
set @my_max_relay_log_size= @@global.max_relay_log_size;
set global max_relay_log_size=0; set global max_relay_log_size=0;
# This is really copy-paste of 2) of above # This is really copy-paste of 2) of above
...@@ -114,5 +114,6 @@ show slave status; ...@@ -114,5 +114,6 @@ show slave status;
connection master; connection master;
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
sync_slave_with_master; sync_slave_with_master;
set global max_relay_log_size= @my_max_relay_log_size;
# End of 4.1 tests # End of 4.1 tests
...@@ -34,6 +34,7 @@ reset slave; ...@@ -34,6 +34,7 @@ reset slave;
--echo # Test 1 --echo # Test 1
--echo # --echo #
set @my_max_binlog_size= @@global.max_binlog_size;
set global max_binlog_size=8192; set global max_binlog_size=8192;
set global max_relay_log_size=8192-1; # mapped to 4096 set global max_relay_log_size=8192-1; # mapped to 4096
select @@global.max_relay_log_size; select @@global.max_relay_log_size;
...@@ -130,6 +131,10 @@ flush logs; ...@@ -130,6 +131,10 @@ flush logs;
-- replace_column 3 <Binlog_Ignore_DB> -- replace_column 3 <Binlog_Ignore_DB>
show master status; show master status;
# Restore max_binlog_size
connection slave;
set global max_binlog_size= @my_max_binlog_size;
--echo # --echo #
--echo # End of 4.1 tests --echo # End of 4.1 tests
--echo # --echo #
...@@ -132,7 +132,7 @@ x ...@@ -132,7 +132,7 @@ x
17 17
19 19
drop trigger trg1; drop trigger trg1;
set global init_connect=default; set global init_connect="set @a='a\\0c'";
revoke all privileges, grant option from mysqltest1@localhost; revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost; drop user mysqltest1@localhost;
drop table t1, t2; drop table t1, t2;
...@@ -284,12 +284,15 @@ insert t1 values ('aaabbb'); ...@@ -284,12 +284,15 @@ insert t1 values ('aaabbb');
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
set @my_key_cache_block_size= @@global.key_cache_block_size;
set GLOBAL key_cache_block_size=2048; set GLOBAL key_cache_block_size=2048;
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
drop table t1; drop table t1;
set global key_cache_block_size= @my_key_cache_block_size;
CREATE TABLE t1(a int NOT NULL AUTO_INCREMENT PRIMARY KEY); CREATE TABLE t1(a int NOT NULL AUTO_INCREMENT PRIMARY KEY);
SET @my_key_cache_block_size= @@global.key_cache_block_size;
SET GLOBAL key_cache_block_size=1536; SET GLOBAL key_cache_block_size=1536;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
SELECT @@key_cache_block_size; SELECT @@key_cache_block_size;
...@@ -331,6 +334,7 @@ CHECK TABLE t1; ...@@ -331,6 +334,7 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
DROP TABLE t1,t2; DROP TABLE t1,t2;
set global key_cache_block_size= @my_key_cache_block_size;
set @@global.key_buffer_size=0; set @@global.key_buffer_size=0;
Warnings: Warnings:
Warning 1438 Cannot drop default keycache Warning 1438 Cannot drop default keycache
......
...@@ -90,3 +90,4 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -90,3 +90,4 @@ id select_type table type possible_keys key key_len ref rows Extra
select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
c c
28 28
drop table t1;
...@@ -8,4 +8,5 @@ create database d2; ...@@ -8,4 +8,5 @@ create database d2;
ERROR 42000: Access denied for user 'sample'@'localhost' to database 'd2' ERROR 42000: Access denied for user 'sample'@'localhost' to database 'd2'
create database D1; create database D1;
ERROR 42000: Access denied for user 'sample'@'localhost' to database 'D1' ERROR 42000: Access denied for user 'sample'@'localhost' to database 'D1'
drop user 'sample'@'localhost';
drop database if exists d1; drop database if exists d1;
...@@ -3088,7 +3088,7 @@ drop user mysqltest_1@localhost; ...@@ -3088,7 +3088,7 @@ drop user mysqltest_1@localhost;
# #
create database mysqldump_myDB; create database mysqldump_myDB;
use mysqldump_myDB; use mysqldump_myDB;
create user myDB_User; create user myDB_User@localhost;
grant create, create view, select, insert on mysqldump_myDB.* to myDB_User@localhost; grant create, create view, select, insert on mysqldump_myDB.* to myDB_User@localhost;
create table t1 (c1 int); create table t1 (c1 int);
insert into t1 values (3); insert into t1 values (3);
...@@ -3101,7 +3101,7 @@ drop view v1; ...@@ -3101,7 +3101,7 @@ drop view v1;
drop table t1; drop table t1;
drop table u1; drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost; revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
drop user myDB_User; drop user myDB_User@localhost;
drop database mysqldump_myDB; drop database mysqldump_myDB;
flush privileges; flush privileges;
# Bug #21424 continues from here. # Bug #21424 continues from here.
...@@ -3119,9 +3119,10 @@ drop view v1; ...@@ -3119,9 +3119,10 @@ drop view v1;
drop table t1; drop table t1;
drop table u1; drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost; revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
drop user myDB_User; drop user myDB_User@localhost;
drop database mysqldump_myDB; drop database mysqldump_myDB;
use test; use test;
# #
# BUG#13926: --order-by-primary fails if PKEY contains quote character # BUG#13926: --order-by-primary fails if PKEY contains quote character
# #
......
...@@ -126,6 +126,7 @@ Master_SSL_Cert ...@@ -126,6 +126,7 @@ Master_SSL_Cert
Master_SSL_Cipher Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
set @my_max_relay_log_size= @@global.max_relay_log_size;
set global max_relay_log_size=0; set global max_relay_log_size=0;
stop slave; stop slave;
change master to master_log_pos=536; change master to master_log_pos=536;
...@@ -178,3 +179,4 @@ Master_SSL_Cipher ...@@ -178,3 +179,4 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
set global max_relay_log_size= @my_max_relay_log_size;
...@@ -33,5 +33,7 @@ n ...@@ -33,5 +33,7 @@ n
1234 1234
DROP DATABASE mysqltest1; DROP DATABASE mysqltest1;
stop slave; stop slave;
drop database mysqltest1;
drop database mysqltest1;
use test; use test;
drop table t1; drop table t1;
...@@ -27,3 +27,4 @@ select_priv ...@@ -27,3 +27,4 @@ select_priv
Y Y
revoke select on *.* FROM 'user_foo'; revoke select on *.* FROM 'user_foo';
delete from mysql.user where user="user_foo"; delete from mysql.user where user="user_foo";
delete from mysql.user where user="user_foo";
...@@ -17,8 +17,11 @@ init_slave ...@@ -17,8 +17,11 @@ init_slave
show variables like 'max_connections'; show variables like 'max_connections';
Variable_name Value Variable_name Value
max_connections 100 max_connections 100
set @my_global_init_connect= @@global.init_connect;
set global init_connect="set @c=1"; set global init_connect="set @c=1";
show variables like 'init_connect'; show variables like 'init_connect';
Variable_name Value Variable_name Value
init_connect set @c=1 init_connect set @c=1
stop slave; stop slave;
set global init_connect= @my_global_init_connect;
set global max_connections= default;
...@@ -465,3 +465,5 @@ RETURN 0 ...@@ -465,3 +465,5 @@ RETURN 0
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP FUNCTION f1; DROP FUNCTION f1;
drop table t1; drop table t1;
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=0;
...@@ -14,6 +14,7 @@ reset slave; ...@@ -14,6 +14,7 @@ reset slave;
# #
# Test 1 # Test 1
# #
set @my_max_binlog_size= @@global.max_binlog_size;
set global max_binlog_size=8192; set global max_binlog_size=8192;
set global max_relay_log_size=8192-1; set global max_relay_log_size=8192-1;
select @@global.max_relay_log_size; select @@global.max_relay_log_size;
...@@ -266,6 +267,7 @@ File master-bin.000002 ...@@ -266,6 +267,7 @@ File master-bin.000002
Position 102 Position 102
Binlog_Do_DB <Binlog_Ignore_DB> Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Ignore_DB Binlog_Ignore_DB
set global max_binlog_size= @my_max_binlog_size;
# #
# End of 4.1 tests # End of 4.1 tests
# #
...@@ -4,6 +4,7 @@ reset master; ...@@ -4,6 +4,7 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
set @my_time_zone= @@global.time_zone;
set timestamp=100000000; set timestamp=100000000;
create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n));
create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n)); create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n));
...@@ -103,3 +104,4 @@ t n ...@@ -103,3 +104,4 @@ t n
2003-12-31 23:00:00 16 2003-12-31 23:00:00 16
2005-01-01 08:00:00 17 2005-01-01 08:00:00 17
drop table t1, t2; drop table t1, t2;
set global time_zone= @my_time_zone;
...@@ -4,6 +4,7 @@ reset master; ...@@ -4,6 +4,7 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
set @my_slave_net_timeout =@@global.slave_net_timeout;
set global slave_net_timeout=100; set global slave_net_timeout=100;
set global sql_slave_skip_counter=100; set global sql_slave_skip_counter=100;
show variables like 'slave_compressed_protocol'; show variables like 'slave_compressed_protocol';
......
...@@ -264,7 +264,7 @@ a decimal(21,2) NO 0.00 ...@@ -264,7 +264,7 @@ a decimal(21,2) NO 0.00
drop table t1,t2,t3; drop table t1,t2,t3;
select 1e-308, 1.00000001e-300, 100000000e-300; select 1e-308, 1.00000001e-300, 100000000e-300;
1e-308 1.00000001e-300 100000000e-300 1e-308 1.00000001e-300 100000000e-300
0 1.00000001e-300 1e-292 1e-308 1.00000001e-300 1e-292
select 10e307; select 10e307;
10e307 10e307
1e+308 1e+308
......
...@@ -546,13 +546,13 @@ CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tu AS SELECT * FROM mysqltest1.t1; ...@@ -546,13 +546,13 @@ CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tu AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tus AS SELECT * FROM mysqltest1.t1; CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tus AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_td AS SELECT * FROM mysqltest1.t1; CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_td AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tds AS SELECT * FROM mysqltest1.t1; CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tds AS SELECT * FROM mysqltest1.t1;
GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly; GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly@localhost;
GRANT SELECT ON mysqltest1.v_ts TO readonly; GRANT SELECT ON mysqltest1.v_ts TO readonly@localhost;
GRANT INSERT ON mysqltest1.v_ti TO readonly; GRANT INSERT ON mysqltest1.v_ti TO readonly@localhost;
GRANT UPDATE ON mysqltest1.v_tu TO readonly; GRANT UPDATE ON mysqltest1.v_tu TO readonly@localhost;
GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly; GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly@localhost;
GRANT DELETE ON mysqltest1.v_td TO readonly; GRANT DELETE ON mysqltest1.v_td TO readonly@localhost;
GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly; GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly@localhost;
SELECT * FROM mysqltest1.v_t1; SELECT * FROM mysqltest1.v_t1;
ERROR HY000: View 'mysqltest1.v_t1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them ERROR HY000: View 'mysqltest1.v_t1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
INSERT INTO mysqltest1.v_t1 VALUES(4); INSERT INTO mysqltest1.v_t1 VALUES(4);
......
...@@ -232,7 +232,9 @@ connection con0; ...@@ -232,7 +232,9 @@ connection con0;
disconnect con1; disconnect con1;
drop trigger trg1; drop trigger trg1;
set global init_connect=default; # Set init connect back to the value provided in init_connect-master.opt
# doesn't matter as server will be restarted
set global init_connect="set @a='a\\0c'";
revoke all privileges, grant option from mysqltest1@localhost; revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost; drop user mysqltest1@localhost;
......
...@@ -164,16 +164,19 @@ create table t1 (mytext text, FULLTEXT (mytext)); ...@@ -164,16 +164,19 @@ create table t1 (mytext text, FULLTEXT (mytext));
insert t1 values ('aaabbb'); insert t1 values ('aaabbb');
check table t1; check table t1;
set @my_key_cache_block_size= @@global.key_cache_block_size;
set GLOBAL key_cache_block_size=2048; set GLOBAL key_cache_block_size=2048;
check table t1; check table t1;
drop table t1; drop table t1;
# Restore the changed variable value
set global key_cache_block_size= @my_key_cache_block_size;
# #
# Bug #19079: corrupted index when key_cache_block_size is not multiple of # Bug #19079: corrupted index when key_cache_block_size is not multiple of
# myisam_block_size # myisam_block_size
CREATE TABLE t1(a int NOT NULL AUTO_INCREMENT PRIMARY KEY); CREATE TABLE t1(a int NOT NULL AUTO_INCREMENT PRIMARY KEY);
SET @my_key_cache_block_size= @@global.key_cache_block_size;
SET GLOBAL key_cache_block_size=1536; SET GLOBAL key_cache_block_size=1536;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
SELECT @@key_cache_block_size; SELECT @@key_cache_block_size;
...@@ -206,6 +209,8 @@ SELECT COUNT(*) FROM t1; ...@@ -206,6 +209,8 @@ SELECT COUNT(*) FROM t1;
SELECT @@key_cache_block_size; SELECT @@key_cache_block_size;
CHECK TABLE t1; CHECK TABLE t1;
DROP TABLE t1,t2; DROP TABLE t1,t2;
# Restore changed variables
set global key_cache_block_size= @my_key_cache_block_size;
# #
# Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO # Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
......
...@@ -69,5 +69,5 @@ explain select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; ...@@ -69,5 +69,5 @@ explain select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
explain select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; explain select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
drop table t1;
# End of 4.1 tests # End of 4.1 tests
...@@ -21,6 +21,7 @@ create database D1; ...@@ -21,6 +21,7 @@ create database D1;
disconnect sample; disconnect sample;
connection master; connection master;
drop user 'sample'@'localhost';
drop database if exists d1; drop database if exists d1;
disconnect master; disconnect master;
connection default; connection default;
......
...@@ -1343,7 +1343,7 @@ connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); ...@@ -1343,7 +1343,7 @@ connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root; connection root;
create database mysqldump_myDB; create database mysqldump_myDB;
use mysqldump_myDB; use mysqldump_myDB;
create user myDB_User; create user myDB_User@localhost;
grant create, create view, select, insert on mysqldump_myDB.* to myDB_User@localhost; grant create, create view, select, insert on mysqldump_myDB.* to myDB_User@localhost;
create table t1 (c1 int); create table t1 (c1 int);
insert into t1 values (3); insert into t1 values (3);
...@@ -1366,7 +1366,7 @@ drop view v1; ...@@ -1366,7 +1366,7 @@ drop view v1;
drop table t1; drop table t1;
drop table u1; drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost; revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
drop user myDB_User; drop user myDB_User@localhost;
drop database mysqldump_myDB; drop database mysqldump_myDB;
flush privileges; flush privileges;
...@@ -1391,7 +1391,7 @@ drop view v1; ...@@ -1391,7 +1391,7 @@ drop view v1;
drop table t1; drop table t1;
drop table u1; drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost; revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
drop user myDB_User; drop user myDB_User@localhost;
drop database mysqldump_myDB; drop database mysqldump_myDB;
use test; use test;
......
...@@ -54,9 +54,13 @@ sync_slave_with_master; ...@@ -54,9 +54,13 @@ sync_slave_with_master;
#cleanup #cleanup
connection slave; connection slave;
stop slave; stop slave;
#system rm -rf $MYSQLTEST_VARDIR/master-data/mysqltest1; drop database mysqltest1;
connection master; connection master;
# Remove the "extra" file created above
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest1/f1.txt
drop database mysqltest1;
use test; use test;
drop table t1; drop table t1;
...@@ -45,3 +45,7 @@ revoke select on *.* FROM 'user_foo'; ...@@ -45,3 +45,7 @@ revoke select on *.* FROM 'user_foo';
connection master; connection master;
delete from mysql.user where user="user_foo"; delete from mysql.user where user="user_foo";
sync_slave_with_master; sync_slave_with_master;
# Since changes to mysql.* are ignored, the revoke need to
# be done on slave as well
delete from mysql.user where user="user_foo";
...@@ -17,6 +17,8 @@ show variables like 'max_connections'; ...@@ -17,6 +17,8 @@ show variables like 'max_connections';
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
# Save variable value
set @my_global_init_connect= @@global.init_connect;
set global init_connect="set @c=1"; set global init_connect="set @c=1";
show variables like 'init_connect'; show variables like 'init_connect';
connection master; connection master;
...@@ -25,4 +27,8 @@ connection slave; ...@@ -25,4 +27,8 @@ connection slave;
sync_with_master; sync_with_master;
stop slave; stop slave;
# Restore changed global variable
set global init_connect= @my_global_init_connect;
set global max_connections= default;
# End of 4.1 tests # End of 4.1 tests
...@@ -519,6 +519,10 @@ connection master; ...@@ -519,6 +519,10 @@ connection master;
drop table t1; drop table t1;
sync_slave_with_master; sync_slave_with_master;
# Restore log_bin_trust_function_creators to original value
set global log_bin_trust_function_creators=0;
connection master;
set global log_bin_trust_function_creators=0;
--echo End of 5.0 tests --echo End of 5.0 tests
--echo End of 5.1 tests --echo End of 5.1 tests
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
source include/master-slave.inc; source include/master-slave.inc;
# Save original timezone
set @my_time_zone= @@global.time_zone;
# Some preparations # Some preparations
let $VERSION=`select version()`; let $VERSION=`select version()`;
set timestamp=100000000; # for fixed output of mysqlbinlog set timestamp=100000000; # for fixed output of mysqlbinlog
...@@ -133,3 +136,7 @@ connection master; ...@@ -133,3 +136,7 @@ connection master;
drop table t1, t2; drop table t1, t2;
sync_slave_with_master; sync_slave_with_master;
# Restore original timezone
connection master;
set global time_zone= @my_time_zone;
source include/master-slave.inc; source include/master-slave.inc;
# Init for rstore of variable values
set @my_slave_net_timeout =@@global.slave_net_timeout;
set global slave_net_timeout=100; set global slave_net_timeout=100;
set global sql_slave_skip_counter=100; set global sql_slave_skip_counter=100;
......
...@@ -733,13 +733,13 @@ CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tu AS SELECT * FROM mysqltest1.t1; ...@@ -733,13 +733,13 @@ CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tu AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tus AS SELECT * FROM mysqltest1.t1; CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tus AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_td AS SELECT * FROM mysqltest1.t1; CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_td AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tds AS SELECT * FROM mysqltest1.t1; CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tds AS SELECT * FROM mysqltest1.t1;
GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly; GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly@localhost;
GRANT SELECT ON mysqltest1.v_ts TO readonly; GRANT SELECT ON mysqltest1.v_ts TO readonly@localhost;
GRANT INSERT ON mysqltest1.v_ti TO readonly; GRANT INSERT ON mysqltest1.v_ti TO readonly@localhost;
GRANT UPDATE ON mysqltest1.v_tu TO readonly; GRANT UPDATE ON mysqltest1.v_tu TO readonly@localhost;
GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly; GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly@localhost;
GRANT DELETE ON mysqltest1.v_td TO readonly; GRANT DELETE ON mysqltest1.v_td TO readonly@localhost;
GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly; GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly@localhost;
CONNECT (n1,localhost,readonly,,); CONNECT (n1,localhost,readonly,,);
CONNECTION n1; CONNECTION n1;
...@@ -797,7 +797,7 @@ DROP VIEW mysqltest1.v_ti; ...@@ -797,7 +797,7 @@ DROP VIEW mysqltest1.v_ti;
DROP VIEW mysqltest1.v_ts; DROP VIEW mysqltest1.v_ts;
DROP VIEW mysqltest1.v_t1; DROP VIEW mysqltest1.v_t1;
DROP TABLE mysqltest1.t1; DROP TABLE mysqltest1.t1;
DROP USER readonly@localhost; DROP USER readonly@localhost;
DROP DATABASE mysqltest1; DROP DATABASE mysqltest1;
# #
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define MAX_DBL_EXP 308 #define MAX_DBL_EXP 308
#define MAX_RESULT_FOR_MAX_EXP 1.7976931348623157 #define MAX_RESULT_FOR_MAX_EXP 1.7976931348623157
#define MIN_RESULT_FOR_MIN_EXP 2.225073858507202
static double scaler10[] = { static double scaler10[] = {
1.0, 1e10, 1e20, 1e30, 1e40, 1e50, 1e60, 1e70, 1e80, 1e90 1.0, 1e10, 1e20, 1e30, 1e40, 1e50, 1e60, 1e70, 1e80, 1e90
}; };
...@@ -161,26 +160,15 @@ double my_strtod(const char *str, char **end_ptr, int *error) ...@@ -161,26 +160,15 @@ double my_strtod(const char *str, char **end_ptr, int *error)
order= exp + (neg_exp ? -1 : 1) * (ndigits - 1); order= exp + (neg_exp ? -1 : 1) * (ndigits - 1);
if (order < 0) if (order < 0)
order= -order; order= -order;
if (order >= MAX_DBL_EXP && result) if (order >= MAX_DBL_EXP && !neg_exp && result)
{ {
double c; double c;
/* Compute modulus of C (see comment above) */ /* Compute modulus of C (see comment above) */
c= result / scaler * 10.0; c= result / scaler * 10.0;
if (neg_exp) if (order > MAX_DBL_EXP || c > MAX_RESULT_FOR_MAX_EXP)
{ {
if (order > MAX_DBL_EXP || c < MIN_RESULT_FOR_MIN_EXP) overflow= 1;
{ goto done;
result= 0.0;
goto done;
}
}
else
{
if (order > MAX_DBL_EXP || c > MAX_RESULT_FOR_MAX_EXP)
{
overflow= 1;
goto done;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment