1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix for bug#9383: INFORMATION_SCHEMA.COLUMNS, JOIN, Crash, prepared statement

restore original 'lex->query_tables' table list after
   processing of information schema table
   remove unnecessary operations
This commit is contained in:
gluh@eagle.intranet.mysql.r18.ru
2005-04-05 16:09:56 +05:00
parent 9dd3e180b9
commit 6c8624f6d5
4 changed files with 44 additions and 5 deletions

View File

@@ -524,3 +524,21 @@ execute stmt using @a, @b, @c;
a b c a b c
deallocate prepare stmt;
drop table t1,t2;
SET @aux= "SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS A,
INFORMATION_SCHEMA.COLUMNS B
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
AND A.TABLE_NAME = B.TABLE_NAME
AND A.COLUMN_NAME = B.COLUMN_NAME AND
A.TABLE_NAME = 'user'";
prepare my_stmt from @aux;
execute my_stmt;
COUNT(*)
37
execute my_stmt;
COUNT(*)
37
execute my_stmt;
COUNT(*)
37
deallocate prepare my_stmt;

View File

@@ -540,3 +540,24 @@ deallocate prepare stmt;
drop table t1,t2;
#
# Bug#9383: INFORMATION_SCHEMA.COLUMNS, JOIN, Crash, prepared statement
#
eval SET @aux= "SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS A,
INFORMATION_SCHEMA.COLUMNS B
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
AND A.TABLE_NAME = B.TABLE_NAME
AND A.COLUMN_NAME = B.COLUMN_NAME AND
A.TABLE_NAME = 'user'";
let $exec_loop_count= 3;
eval prepare my_stmt from @aux;
while ($exec_loop_count)
{
eval execute my_stmt;
dec $exec_loop_count;
}
deallocate prepare my_stmt;