mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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 mysql-test/r/ps.result: Fix for bug#9383: INFORMATION_SCHEMA.COLUMNS, JOIN, Crash, prepared statement mysql-test/t/ps.test: Fix for bug#9383: INFORMATION_SCHEMA.COLUMNS, JOIN, Crash, prepared statement sql/sql_lex.h: Fix for bug#9383: INFORMATION_SCHEMA.COLUMNS, JOIN, Crash, prepared statement sql/sql_show.cc: Fix for bug#9383: INFORMATION_SCHEMA.COLUMNS, JOIN, Crash, prepared statement
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user