mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
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,4 +1,5 @@
|
||||
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';
|
||||
|
@ -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,3 +1,4 @@
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (x1 int);
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
|
@ -1,3 +1,4 @@
|
||||
drop table if exists t1,t1aa,t2aa;
|
||||
show tables;
|
||||
Tables_in_db
|
||||
columns_priv
|
||||
|
@ -1,5 +1,5 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, `"t"1`;
|
||||
DROP TABLE IF EXISTS t1, `"t"1`, t1aa,t2aa;
|
||||
drop database if exists mysqldump_test_db;
|
||||
--enable_warnings
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
# The following may be left from older tests
|
||||
drop table if exists t1_1,t1_2,t9_1,t9_2;
|
||||
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
|
||||
drop view if exists v1;
|
||||
--enable_warnings
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
--disable_warnings
|
||||
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';
|
||||
|
@ -945,10 +945,12 @@ insert into t2 values (append("xxx", "yyy"), mul(4,3), e())|
|
||||
insert into t2 values (append("a", "b"), mul(2,mul(3,4)), fun(1.7, 4, 6))|
|
||||
|
||||
# These don't work yet.
|
||||
--disable_ps_protocol
|
||||
select * from t2 where s = append("a", "b")|
|
||||
select * from t2 where i = mul(4,3) or i = mul(mul(3,4),2)|
|
||||
select * from t2 where d = e()|
|
||||
select * from t2|
|
||||
--enable_ps_protocol
|
||||
delete from t2|
|
||||
|
||||
drop function e|
|
||||
@ -1263,8 +1265,10 @@ end|
|
||||
|
||||
call rc()|
|
||||
select row_count()|
|
||||
--disable_ps_protocol
|
||||
update t1 set data=42 where id = "b";
|
||||
select row_count()|
|
||||
--enable_ps_protocol
|
||||
delete from t1|
|
||||
select row_count()|
|
||||
delete from t1|
|
||||
@ -2022,8 +2026,8 @@ drop table t3|
|
||||
--disable_warnings
|
||||
drop table if exists t3|
|
||||
--enable_warnings
|
||||
create table t3 (f1 int, f2 int);
|
||||
insert into t3 values (1,1);
|
||||
create table t3 (f1 int, f2 int)|
|
||||
insert into t3 values (1,1)|
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists bug4579_1|
|
||||
|
@ -557,7 +557,7 @@ INSERT IGNORE INTO t1 (col1) values (1/0);
|
||||
INSERT IGNORE INTO t1 VALUES (+1.9E+309,-1.9E+309);
|
||||
INSERT IGNORE INTO t1 VALUES ('+2.0E+309','-2.0E+309');
|
||||
# stupid...
|
||||
--replace_result -0 0
|
||||
--replace_result -0 0 1.7976931348623e+308 1.79769313486232e+308
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -1,7 +1,12 @@
|
||||
#
|
||||
# Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
|
||||
# Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination
|
||||
# table
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
|
@ -2,6 +2,11 @@
|
||||
# This test must examine integrity of system database "mysql"
|
||||
#
|
||||
|
||||
# First delete some tables maybe left over from previous tests
|
||||
--disable_warnings
|
||||
drop table if exists t1,t1aa,t2aa;
|
||||
--enable_warnings
|
||||
|
||||
-- disable_query_log
|
||||
use mysql;
|
||||
-- enable_query_log
|
||||
|
Reference in New Issue
Block a user