2778 Sven Sandberg 2008-08-19 [merge]
merged 5.1-bugteam -> 6.0-bugteam
everything automerged, no conflicts
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:
mysql-test/r/group_min_max.result
mysql-test/t/csv.test
mysql-test/t/group_min_max.test
sql/sql_plugin.cc
sql/sql_select.cc
2777 Tatiana A. Nurnberg 2008-08-19 [merge]
auto-merged
added:
mysql-test/std_data/parts/t1_will_crash#P#p1_first_1024.MYD
mysql-test/std_data/parts/t1_will_crash#P#p2.MYD
mysql-test/std_data/parts/t1_will_crash#P#p2.MYI
mysql-test/std_data/parts/t1_will_crash#P#p3.MYI
mysql-test/std_data/parts/t1_will_crash#P#p4.MYI
mysql-test/std_data/parts/t1_will_crash#P#p6.MYD
mysql-test/std_data/parts/t1_will_crash#P#p6_2.MYD
mysql-test/std_data/parts/t1_will_crash#P#p6_3.MYD
mysql-test/suite/parts/r/partition_repair_myisam.result
mysql-test/suite/parts/t/partition_repair_myisam.test
renamed:
mysql-test/suite/parts/r/partition_repair_myisam.result => mysql-test/suite/parts/r/partition_recover_myisam.result
mysql-test/suite/parts/t/partition_repair_myisam-master.opt => mysql-test/suite/parts/t/partition_recover_myisam-master.opt
mysql-test/suite/parts/t/partition_repair_myisam.test => mysql-test/suite/parts/t/partition_recover_myisam.test
modified:
BUILD/check-cpu
mysql-test/lib/mtr_report.pl
mysys/mf_pack.c
netware/BUILD/compile-linux-tools
netware/BUILD/nwbootstrap
netware/Makefile.am
netware/mysql_install_db.c
sql/ha_partition.cc
sql/sql_show.cc
mysql-test/suite/parts/t/partition_recover_myisam.test
=== modified file 'mysql-test/r/group_min_max.result'
--- a/mysql-test/r/group_min_max.result 2008-08-15 21:54:51 +0000
+++ b/mysql-test/r/group_min_max.result 2008-08-19 15:58:48 +0000
@@ -2372,28 +2372,3 @@ a MIN(b) MAX(b) AVG(b)
2 1 3 2.0000
1 1 3 2.0000
DROP TABLE t1;
-create table t1 (a int, b int, primary key (a,b), key `index` (a,b)) engine=MyISAM;
-insert into t1 (a,b) values (0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),(0,7),
-(0,8),(0,9),(0,10),(0,11);
-insert into t1 (a,b) select a, max(b)+1 from t1 where a = 0 group by a;
-select * from t1;
-a b
-0 0
-0 1
-0 2
-0 3
-0 4
-0 5
-0 6
-0 7
-0 8
-0 9
-0 10
-0 11
-0 12
-explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range PRIMARY,index PRIMARY 4 NULL 6 83.33 Using where; Using index for group-by; Using temporary
-Warnings:
-Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,(max(`test`.`t1`.`b`) + 1) AS `max(b)+1` from `test`.`t1` where (`test`.`t1`.`a` = 0) group by `test`.`t1`.`a`
-drop table t1;
=== 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/csv.test'
--- a/mysql-test/t/csv.test 2008-08-15 06:53:54 +0000
+++ b/mysql-test/t/csv.test 2008-08-19 13:16:20 +0000
@@ -1795,6 +1795,7 @@ lock tables t1 read;
connect (con1,localhost,root,,);
--connection con1
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV
+--replace_result $MYSQLTEST_VARDIR . master-data/ '' 13 2
# EE_FILENOTFOUND 29
--error 29
select * from t1;
=== modified file 'mysql-test/t/group_min_max.test'
--- a/mysql-test/t/group_min_max.test 2008-08-15 19:30:17 +0000
+++ b/mysql-test/t/group_min_max.test 2008-08-19 12:21:18 +0000
@@ -942,15 +942,3 @@ SELECT a, MIN(b), MAX(b), AVG(b) FROM t1
SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
DROP TABLE t1;
-
-#
-# Bug#38195: Incorrect handling of aggregate functions when loose index scan is
-# used causes server crash.
-#
-create table t1 (a int, b int, primary key (a,b), key `index` (a,b)) engine=MyISAM;
-insert into t1 (a,b) values (0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),(0,7),
-(0,8),(0,9),(0,10),(0,11);
-insert into t1 (a,b) select a, max(b)+1 from t1 where a = 0 group by a;
-select * from t1;
-explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
-drop table t1;
=== 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);
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2008-08-15 19:58:03 +0000
+++ b/sql/sql_select.cc 2008-08-19 15:58:48 +0000
@@ -2414,8 +2414,7 @@ JOIN::exec()
if (!items1)
{
items1= items0 + all_fields.elements;
- if (sort_and_group || curr_tmp_table->group ||
- tmp_table_param.precomputed_group_by)
+ if (sort_and_group || curr_tmp_table->group)
{
if (change_to_use_tmp_fields(thd, items1,
tmp_fields_list1, tmp_all_fields1,
@@ -11644,8 +11643,6 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA
ENGINE_COLUMNDEF *recinfo;
uint total_uneven_bit_length= 0;
bool force_copy_fields= param->force_copy_fields;
- /* Treat sum functions as normal ones when loose index scan is used. */
- save_sum_fields|= param->precomputed_group_by;
DBUG_ENTER("create_tmp_table");
DBUG_PRINT("enter",
("distinct: %d save_sum_fields: %d rows_limit: %lu group: %d",
| Thread |
|---|
| • bzr push into mysql-6.0 branch (sven:2777 to 2778) Bug#35807 Bug#36638Bug#38195 | Sven Sandberg | 19 Aug |