1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge host.loc:/home/uchum/work/mysql-5.0

into  host.loc:/home/uchum/work/5.0-opt


sql/sql_delete.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
This commit is contained in:
unknown
2008-03-27 15:52:55 +04:00
35 changed files with 291 additions and 55 deletions

View File

@ -164,4 +164,13 @@ drop table t1, t2;
set session low_priority_updates=default;
#
# Bug #33334 mysqltest_embedded crashes when disconnecting before reap
#
connect (con1,localhost,root,,);
send select benchmark(200, (select sin(1))) > 1000;
disconnect con1;
connection default;
# End of 5.0 tests

View File

@ -916,5 +916,15 @@ DROP VIEW v1;
DROP TABLE t1;
SET SQL_MODE=DEFAULT;
#
# Bug #34512: CAST( AVG( double ) AS DECIMAL ) returns wrong results
#
CREATE TABLE t1(a DOUBLE);
INSERT INTO t1 VALUES (10), (20);
SELECT AVG(a), CAST(AVG(a) AS DECIMAL) FROM t1;
DROP TABLE t1;
###
--echo End of 5.0 tests

View File

@ -1108,8 +1108,6 @@ select * from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_TABLE` = NULL;
select * from `information_schema`.`VIEWS` where `TABLE_SCHEMA` = NULL;
select * from `information_schema`.`VIEWS` where `TABLE_NAME` = NULL;
--echo End of 5.0 tests.
#
# Bug#30079 A check for "hidden" I_S tables is flawed
#
@ -1118,3 +1116,28 @@ show fields from information_schema.table_names;
--error 1109
show keys from information_schema.table_names;
#
# Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY
#
USE information_schema;
SET max_heap_table_size = 16384;
CREATE TABLE test.t1( a INT );
# What we need to create here is a bit of a corner case:
# We need a star query with information_schema tables, where the first
# branch of the star join produces zero rows, so that reading of the
# second branch never happens. At the same time we have to make sure
# that data for at least the last table is swapped from MEMORY/HEAP to
# MyISAM. This and only this triggers the bug.
SELECT *
FROM tables ta
JOIN collations co ON ( co.collation_name = ta.table_catalog )
JOIN character_sets cs ON ( cs.character_set_name = ta.table_catalog );
DROP TABLE test.t1;
SET max_heap_table_size = DEFAULT;
USE test;
--echo End of 5.0 tests.

View File

@ -598,4 +598,36 @@ show procedure code proc_33618_c;
drop procedure proc_33618_h;
drop procedure proc_33618_c;
#
# Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
# instructions)
#
--disable_warnings
drop procedure if exists p_20906_a;
drop procedure if exists p_20906_b;
--enable_warnings
create procedure p_20906_a() SET @a=@a+1, @b=@b+1;
show procedure code p_20906_a;
set @a=1;
set @b=1;
call p_20906_a();
select @a, @b;
create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1;
show procedure code p_20906_b;
set @a=1;
set @b=1;
set @c=1;
call p_20906_b();
select @a, @b, @c;
drop procedure p_20906_a;
drop procedure p_20906_b;
--echo End of 5.0 tests.

View File

@ -586,6 +586,23 @@ SELECT a FROM t1 WHERE a NOT IN (65,66);
SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
DROP TABLE t1;
DROP TABLE t1, t2;
#
# Bug #34763: item_subselect.cc:1235:Item_in_subselect::row_value_transformer:
# Assertion failed, unexpected error message:
# ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
# reference in item list)
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES(1);
CREATE TABLE t2 (placeholder CHAR(11));
INSERT INTO t2 VALUES("placeholder");
SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a;
SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a;
DROP TABLE t1, t2;
--echo End of 5.0 tests

View File

@ -3537,6 +3537,29 @@ DROP TABLE t1;
###########################################################################
--echo # -----------------------------------------------------------------
--echo # -- Bug#35193: VIEW query is rewritten without "FROM DUAL",
--echo # -- causing syntax error
--echo # -----------------------------------------------------------------
--echo
CREATE VIEW v1 AS SELECT 1 FROM DUAL WHERE 1;
--echo
SELECT * FROM v1;
SHOW CREATE TABLE v1;
--echo
DROP VIEW v1;
--echo
--echo # -- End of test case for Bug#35193.
--echo
###########################################################################
--echo # -----------------------------------------------------------------
--echo # -- End of 5.0 tests.
--echo # -----------------------------------------------------------------