a non-correlated single-row subquery over information schema.
The function get_all_tables filling all information schema
tables reset lex->sql_command to SQLCOM_SHOW_FIELDS. After
this the function could evaluate partial conditions related to
some columns. If these conditions contained a subquery over
information schema it led to a wrong evaluation and a wrong
result set.
This bug was already fixed in 5.1.
This patch follows the way how it was done in 5.1 where
the value of lex->sql_command is set to SQLCOM_SHOW_FIELDS
in get_all_tables only for the calls of the function
open_normal_and_derived_tables and is restored after these
calls.
subqueries on information schema that use MIN/MAX aggregation.
Execution of some correlated subqueries may set the value
of null_row to 1 for tables used in the subquery.
If the the subquery is on information schema it causes
rejection of any row for the following executions of
the subquery in the case when an optimization filtering
by some condition is applied.
The fix restores the value of the null_row flag for
each execution of a subquery on information schema.
Bug#14387 SHOW COLUMNS doesn't work on temporary tables.
Bug#15224 SHOW INDEX from temporary table doesn't work.
Restore thd->temporary_tables to be able to process
temporary tables(only for 'show index' & 'show columns').
This should be changed when processing of temporary tables for
I_S tables will be done.
Fixed problems in test suite where some test failed
Fixed access to not initialized memory in federated
Fixed access to not initialized memory when using BIT fields in internal temporary tables
Information_schema DB
Bug#9846 Inappropriate error displayed while
dropping table from 'INFORMATION_SCHEMA'
Bug#10734 Grant of privileges other than 'select' and
'create view' should fail on schema
Bug#10708 SP's can use INFORMATION_SCHEMA as ROUTINE_SCHEMA
cumulative fix for bugs above(after review, 2nd version)
added privilege check for information schema db & tables
Database name was set incorrectly for any show command
that used sunqueries in its where condition.
information_schema.test, information_schema.result:
Added a test case for bug #12636.
Added a comment line for a test case used for bug #12301.
information_schema.result:
Fixed some test cases results (bug #12301).
sql_show.cc:
Fixed bug #12301.
The bug was due to a missing value setting for the NUMERIC_SCALE column
in the get_schema_column_record() function (sql_show.cc).
result set".
To enable full access to contents of I_S tables from stored functions
or statements that use them, we manipulate with thread's open tables
state and ensure that we won't cause deadlock when we open tables by
ignoring flushes and name-locks.
Building of contents of I_S.TABLES no longer requires locking of tables
since we use use handler::info() method with HA_STATUS_AUTO flag instead
of handler::update_auto_increment() for obtaining information about
auto-increment values. But this also means that handlers have to implement
support for HA_STATUS_AUTO flag (particularly InnoDB needs it).
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.
"Triggers have the wrong namespace"
"Triggers: duplicate names allowed"
"Triggers: CREATE TRIGGER does not accept fully qualified names"
"SHOW TRIGGERS"