Commit 2bcaed34 authored by unknown's avatar unknown
Browse files

Better handling of ensuring that setup_tables() are not called twice

This fixed a bug in prepared statements when used with outher joins
Fixed a bug in SUM(DISTINCT) when used with prepared statements.
Some safety fixes in test scripts to ensure that previous test failures shouldn't affect other tests


mysql-test/r/mysqldump.result:
  Safety fix if a previous test would fail
mysql-test/r/show_check.result:
  Safety fix if a previous test would fail
mysql-test/r/sp.result:
  Fix for --ps-protocol
mysql-test/r/synchronization.result:
  Safety fix if a previous test would fail
mysql-test/r/system_mysql_db.result:
  Safety fix if a previous test would fail
mysql-test/t/mysqldump.test:
  Safety fix if a previous test would fail
mysql-test/t/select.test:
  Safety fix if a previous test would fail
mysql-test/t/show_check.test:
  Safety fix if a previous test would fail
mysql-test/t/sp.test:
  fix for --ps-protocol
mysql-test/t/strict.test:
  Fix for --ps-protocol
mysql-test/t/synchronization.test:
  Safety fix if a previous test would fail
mysql-test/t/system_mysql_db.test:
  Safety fix if a previous test would fail
sql/item_sum.cc:
  Fix bug in SUM(DISTINCT...) when using with prepared statements
sql/item_sum.h:
  Fix bug in SUM(DISTINCT...) when using with prepared statements
sql/mysql_priv.h:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_base.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_insert.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_parse.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_prepare.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_select.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_union.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_update.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/table.h:
  Better handling of ensuring that setup_tables() are not called twice
parent 79e05c83
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
DROP TABLE IF EXISTS t1, `"t"1`;
DROP TABLE IF EXISTS t1, `"t"1`, t1aa,t2aa;
drop database if exists mysqldump_test_db;
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
+1 −0
Original line number Diff line number Diff line
drop table if exists t1,t2;
drop table if exists t1aa,t2aa;
drop database if exists mysqltest;
delete from mysql.user where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
delete from mysql.db where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
+2 −5
Original line number Diff line number Diff line
@@ -1639,12 +1639,9 @@ yz,yz
drop procedure bug3368|
drop table t3|
drop table if exists t3|
create table t3 (f1 int, f2 int);
insert into t3 values (1,1);
--disable_warnings|
create table t3 (f1 int, f2 int)|
insert into t3 values (1,1)|
drop procedure if exists bug4579_1|
Warnings:
Note	1305	PROCEDURE bug4579_1 does not exist
create procedure bug4579_1 ()
begin
declare sf1 int;
+1 −0
Original line number Diff line number Diff line
drop table if exists t1;
CREATE TABLE t1 (x1 int);
 ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
+1 −0
Original line number Diff line number Diff line
drop table if exists t1,t1aa,t2aa;
show tables;
Tables_in_db
columns_priv
Loading