#At file:///home/kgeorge/mysql/bzr/test-6.0-bugteam/
2785 Georgi Kodinov 2008-08-20 [merge]
auto-merge
added:
mysql-test/suite/rpl/r/rpl_plugin_load.result
mysql-test/suite/rpl/t/rpl_plugin_load-master.opt
mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt
mysql-test/suite/rpl/t/rpl_plugin_load.test
modified:
include/my_sys.h
mysql-test/r/federated.result
mysql-test/r/subselect3.result
mysql-test/t/federated.test
mysql-test/t/subselect3.test
mysys/my_static.c
sql/sql_class.cc
sql/sql_plugin.cc
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h 2008-07-24 11:33:35 +0000
+++ b/include/my_sys.h 2008-08-20 02:56:50 +0000
@@ -256,7 +256,7 @@ extern int NEAR my_umask, /* Default cr
NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
NEAR my_dont_interrupt; /* call remember_intr when set */
extern my_bool NEAR mysys_uses_curses, my_use_symdir;
-extern ulong sf_malloc_cur_memory, sf_malloc_max_memory;
+extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
extern ulong my_default_record_cache_size;
extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
=== modified file 'mysql-test/r/federated.result'
--- a/mysql-test/r/federated.result 2008-08-15 19:58:03 +0000
+++ b/mysql-test/r/federated.result 2008-08-20 10:12:11 +0000
@@ -781,7 +781,6 @@ id col1 col2 col3 col4
SELECT * FROM federated.t1 WHERE col2 LIKE 's%';
id col1 col2 col3 col4
6 6 six six Sixsix 6666 6
-7 7 seven Sevenseven 77777 7777
SELECT * FROM federated.t1 WHERE col2 LIKE 'si%';
id col1 col2 col3 col4
6 6 six six Sixsix 6666 6
=== modified file 'mysql-test/r/subselect3.result'
--- a/mysql-test/r/subselect3.result 2008-05-22 18:40:15 +0000
+++ b/mysql-test/r/subselect3.result 2008-08-20 01:52:25 +0000
@@ -1,4 +1,4 @@
-drop table if exists t0, t1, t2, t3, t4;
+drop table if exists t0, t1, t2, t3, t4, t5;
create table t1 (oref int, grp int, ie int) ;
insert into t1 (oref, grp, ie) values
(1, 1, 1),
@@ -789,3 +789,29 @@ a b
1 0.123
drop table t1;
End of 5.0 tests
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+a int(11) default null,
+b int(11) default null,
+key (a)
+);
+insert into t1 select A.a+10*(B.a+10*C.a),A.a+10*(B.a+10*C.a) from t0 A, t0 B, t0 C;
+create table t2 (a int(11) default null);
+insert into t2 values (0),(1);
+create table t3 (a int(11) default null);
+insert into t3 values (0),(1);
+create table t4 (a int(11) default null);
+insert into t4 values (0),(1);
+create table t5 (a int(11) default null);
+insert into t5 values (0),(1),(0),(1);
+select * from t2, t3
+where
+t2.a < 10 and
+t3.a+1 = 2 and
+t3.a in (select t1.b from t1
+where t1.a+1=t1.a+1 and
+t1.a < (select t4.a+10
+from t4, t5 limit 2));
+ERROR 21000: Subquery returns more than 1 row
+drop table t0, t1, t2, t3, t4, t5;
=== added file 'mysql-test/suite/rpl/r/rpl_plugin_load.result'
--- a/mysql-test/suite/rpl/r/rpl_plugin_load.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_plugin_load.result 2008-08-19 15:35:56 +0000
@@ -0,0 +1,36 @@
+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;
+Verify that example engine is not installed.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+Get binlog position before install plugin.
+Install example engine.
+INSTALL PLUGIN example SONAME 'ha_example.so';
+Get binlog position after install plugin.
+Compute the difference of the binlog positions.
+Should be zero as install plugin should not be replicated.
+Delta
+0
+Verify that example engine is installed.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+EXAMPLE YES Example storage engine NO NO NO
+connection slave: Verify that example engine is not installed.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+connection master: Uninstall example engine.
+Get binlog position before uninstall plugin.
+UNINSTALL PLUGIN example;
+Get binlog position after uninstall plugin.
+Compute the difference of the binlog positions.
+Should be zero as uninstall plugin should not be replicated.
+Delta
+0
+Verify that example engine is not installed.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+End of test
=== added file 'mysql-test/suite/rpl/t/rpl_plugin_load-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_plugin_load-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_plugin_load-master.opt 2008-08-19 15:35:56 +0000
@@ -0,0 +1 @@
+$EXAMPLE_PLUGIN_OPT
=== added file 'mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt 2008-08-19 15:35:56 +0000
@@ -0,0 +1 @@
+$EXAMPLE_PLUGIN_OPT
=== added file 'mysql-test/suite/rpl/t/rpl_plugin_load.test'
--- a/mysql-test/suite/rpl/t/rpl_plugin_load.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_plugin_load.test 2008-08-19 15:35:56 +0000
@@ -0,0 +1,60 @@
+#
+# Bug#35807 - INSTALL PLUGIN replicates row-based, but not stmt-based
+#
+# The test verifies that INSTALL PLUGIN and UNINSTALL PLUGIN
+# work with replication.
+#
+# The test tries to install and uninstall a plugin on master,
+# and verifies that it does not affect the slave,
+# and that it does not add anything to the binlog.
+
+--source include/not_embedded.inc
+--source include/have_log_bin.inc
+# Dynamic loading of Example does not work on Windows currently.
+--source include/not_windows.inc
+--source include/have_example_plugin.inc
+
+# Initialize replication.
+--source include/master-slave.inc
+--echo Verify that example engine is not installed.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+--echo Get binlog position before install plugin.
+let $before_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo Install example engine.
+INSTALL PLUGIN example SONAME 'ha_example.so';
+--echo Get binlog position after install plugin.
+let $after_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo Compute the difference of the binlog positions.
+--echo Should be zero as install plugin should not be replicated.
+--disable_query_log
+eval SELECT $after_pos - $before_pos AS Delta;
+--enable_query_log
+--echo Verify that example engine is installed.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+# Wait for slave to catch up with master.
+sync_slave_with_master;
+#
+ --echo connection slave: Verify that example engine is not installed.
+ connection slave;
+ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+#
+--echo connection master: Uninstall example engine.
+connection master;
+--echo Get binlog position before uninstall plugin.
+let $before_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
+UNINSTALL PLUGIN example;
+--echo Get binlog position after uninstall plugin.
+let $after_pos = query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo Compute the difference of the binlog positions.
+--echo Should be zero as uninstall plugin should not be replicated.
+--disable_query_log
+eval SELECT $after_pos - $before_pos AS Delta;
+--enable_query_log
+--echo Verify that example engine is not installed.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE';
+# Wait for slave to catch up with master.
+sync_slave_with_master;
+#
+# Cleanup
+--source include/master-slave-end.inc
+--echo End of test
=== modified file 'mysql-test/t/federated.test'
--- a/mysql-test/t/federated.test 2008-08-15 19:58:03 +0000
+++ b/mysql-test/t/federated.test 2008-08-20 01:52:25 +0000
@@ -520,6 +520,7 @@ SELECT * FROM federated.t1 WHERE id < 3
SELECT * FROM federated.t1 WHERE id < 3 OR id > 7;
SELECT * FROM federated.t1 WHERE col2 = 'three Three';
SELECT * FROM federated.t1 WHERE col2 > 'one';
+--sorted_result
SELECT * FROM federated.t1 WHERE col2 LIKE 's%';
SELECT * FROM federated.t1 WHERE col2 LIKE 'si%';
SELECT * FROM federated.t1 WHERE col2 LIKE 'se%';
@@ -1882,6 +1883,7 @@ connection default;
create server 's1' foreign data wrapper 'mysql' options (port 3306);
drop server 's1';
+
--echo End of 5.1 tests
=== modified file 'mysql-test/t/subselect3.test'
--- a/mysql-test/t/subselect3.test 2008-05-22 18:40:15 +0000
+++ b/mysql-test/t/subselect3.test 2008-08-20 01:52:25 +0000
@@ -1,5 +1,5 @@
--disable_warnings
-drop table if exists t0, t1, t2, t3, t4;
+drop table if exists t0, t1, t2, t3, t4, t5;
--enable_warnings
#
@@ -631,3 +631,42 @@ select * from t1;
drop table t1;
--echo End of 5.0 tests
+
+#
+# BUG#36135 "void Diagnostics_area::set_eof_status(THD*): Assertion `!is_set()' failed."
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1 (
+ a int(11) default null,
+ b int(11) default null,
+ key (a)
+);
+# produce numbers 0..999
+insert into t1 select A.a+10*(B.a+10*C.a),A.a+10*(B.a+10*C.a) from t0 A, t0 B, t0 C;
+
+create table t2 (a int(11) default null);
+insert into t2 values (0),(1);
+
+create table t3 (a int(11) default null);
+insert into t3 values (0),(1);
+
+create table t4 (a int(11) default null);
+insert into t4 values (0),(1);
+
+create table t5 (a int(11) default null);
+insert into t5 values (0),(1),(0),(1);
+
+# this must not fail assertion
+--error 1242
+select * from t2, t3
+where
+ t2.a < 10 and
+ t3.a+1 = 2 and
+ t3.a in (select t1.b from t1
+ where t1.a+1=t1.a+1 and
+ t1.a < (select t4.a+10
+ from t4, t5 limit 2));
+
+drop table t0, t1, t2, t3, t4, t5;
=== modified file 'mysys/my_static.c'
--- a/mysys/my_static.c 2008-06-17 20:04:19 +0000
+++ b/mysys/my_static.c 2008-08-19 14:10:19 +0000
@@ -70,8 +70,8 @@ uint sf_malloc_prehunc=0, /* If you hav
sf_malloc_endhunc=0, /* dump when malloc-message.... */
/* set theese to 64 or 128 */
sf_malloc_quick=0; /* set if no calls to sanity */
-ulong sf_malloc_cur_memory= 0L; /* Current memory usage */
-ulong sf_malloc_max_memory= 0L; /* Maximum memory usage */
+size_t sf_malloc_cur_memory= 0L; /* Current memory usage */
+size_t sf_malloc_max_memory= 0L; /* Maximum memory usage */
uint sf_malloc_count= 0; /* Number of times NEW() was called */
uchar *sf_min_adress= (uchar*) ~(unsigned long) 0L,
*sf_max_adress= (uchar*) 0L;
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2008-07-25 17:21:55 +0000
+++ b/sql/sql_class.cc 2008-08-20 01:52:25 +0000
@@ -1653,6 +1653,12 @@ bool select_send::send_eof()
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
+ /*
+ Don't send EOF if we're in error condition (which implies we've already
+ sent or are sending an error)
+ */
+ if (thd->is_error())
+ return TRUE;
::my_eof(thd);
is_result_set_started= 0;
return FALSE;
=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc 2008-07-17 19:55:18 +0000
+++ b/sql/sql_plugin.cc 2008-08-19 15:58:48 +0000
@@ -1669,11 +1669,18 @@ bool mysql_install_plugin(THD *thd, cons
goto deinit;
}
+ /*
+ We do not replicate the INSTALL PLUGIN statement. Disable binlogging
+ of the insert into the plugin table, so that it is not replicated in
+ row based mode.
+ */
+ tmp_disable_binlog(thd);
table->use_all_columns();
restore_record(table, s->default_values);
table->field[0]->store(name->str, name->length, system_charset_info);
table->field[1]->store(dl->str, dl->length, files_charset_info);
error= table->file->ha_write_row(table->record[0]);
+ reenable_binlog(thd);
if (error)
{
table->file->print_error(error, MYF(0));
@@ -1739,7 +1746,15 @@ bool mysql_uninstall_plugin(THD *thd, co
HA_READ_KEY_EXACT))
{
int error;
- if ((error= table->file->ha_delete_row(table->record[0])))
+ /*
+ We do not replicate the UNINSTALL PLUGIN statement. Disable binlogging
+ of the delete from the plugin table, so that it is not replicated in
+ row based mode.
+ */
+ tmp_disable_binlog(thd);
+ error= table->file->ha_delete_row(table->record[0]);
+ reenable_binlog(thd);
+ if (error)
{
table->file->print_error(error, MYF(0));
DBUG_RETURN(TRUE);
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (kgeorge:2785) | Georgi Kodinov | 20 Aug |