This is a 10.3 specific part of MDEV-13049.
It disables automatic sorting for
"SELECT .. FROM INFORMATION_SCHEMA.{SCHEMATA|TABLES}"
and adjusts the affected tests accordingly.
on CREATE TABLE .. SELECT I_S.PART
This assert was triggered if an InnoDB table was created using
CREATE TABLE ... AS SELECT where the query used an I_S table, and
a view existed in the database. It would also be triggered for
any statement changing an InnoDB table (e.g. INSERT, UPDATE, DELETE)
which had a subquery referencing an I_S table.
The assert was triggered if open_normal_and_derived_tables() failed
and a statement transaction had been started. This will usually not
happen as tables are opened before a statement transaction is started.
However, e.g. CREATE TABLE ... AS SELECT starts a transaction in order
to insert tuples into the new table. And if the subquery references
an I_S table, all current tables and views can be opened in order to
fill the I_S table on the fly. If a view is discovered, open will fail
as it is instructed to open tables only (OPEN_TABLE_ONLY). This would
cause the assert to be triggered.
The assert was added in the patch for Bug#52044 and was therefore
not in any released versions of the server.
This patch fixes the problem by adjusting the assert to take into
consideration the possibility of tables being opened as part of
an I_S query. This is similar to what is already done for
close_tables_for_reopen().
Test case added to information_schema_inno.test.
referenced_key_name field can be uninitialized in the case when
referenced table is dropped.
Added codition which allows to handle this situation.
mysql-test/r/information_schema_inno.result:
test result
mysql-test/t/information_schema_inno.test:
test result
sql/sql_show.cc:
referenced_key_name field can be uninitialized in the case when
referenced table is dropped.
Added codition which allows to handle this situation.
added new field 'REFERENCED_TABLE_NAME' to 'referential_constraints' table
field 'UNIQUE_CONSTRAINT_NAME' contains the name of the referenced index
mysql-test/r/information_schema_inno.result:
result fix
mysql-test/t/information_schema_inno.test:
test fix
sql/sql_show.cc:
added new field 'REFERENCED_TABLE_NAME' to 'referential_constraints' table
field 'UNIQUE_CONSTRAINT_NAME' contains the name of the referenced index
sql/table.h:
added 'referenced_key_name' member to 'st_foreign_key_info' struct
storage/innobase/handler/ha_innodb.cc:
added the filling of referenced key name
Unencode internal db & table name
mysql-test/r/information_schema_inno.result:
test result
mysql-test/t/information_schema_inno.test:
test case
storage/innobase/handler/ha_innodb.cc:
Unencode internal db & table name
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
BitKeeper/etc/ignore:
added libmysqld/sql_cursor.h
mysql-test/r/information_schema.result:
Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middlecd
mysql-test/r/information_schema_inno.result:
Remove used tables at start
mysql-test/r/multi_statement.result:
Remove used tables at start
mysql-test/r/temp_table.result:
Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle
mysql-test/r/type_bit.result:
More tests
mysql-test/t/information_schema.test:
Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle
mysql-test/t/information_schema_inno.test:
Remove used tables at start
mysql-test/t/multi_statement.test:
Remove used tables at start
mysql-test/t/temp_table.test:
Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle
mysql-test/t/type_bit.test:
More tests
mysql-test/valgrind.supp:
Removed some valgrind warnings that isn't errors
sql/ha_federated.cc:
Fixed errors discovered by valgrind:
- Socket was not initialized
- share->scheme was deleted while there was still pointer into it from the hash
sql/item_func.h:
Remove access to table object from cleanup() as the table object may have been dropped earlier (In case of temporary tables or of close_thread_tables() is run before cleanup())
This fixed a bug with access to already freed memory
sql/sql_base.cc:
Reset variables used by fulltext
sql/sql_select.cc:
Fixed various problems with bit fields when used in internal temporary tables.
Calculate space needed for bit fields correctly (previously we allocated more space than needed for rows in heap/myisam tables)
config/ac-macros/character_sets.m4:
Added latin1_spanish_ci
dbug/dbug_analyze.c:
Remove compiler warnings
include/my_handler.h:
Reorder structure arguments to be more optimal
innobase/dict/dict0load.c:
Fixed wrong define tag (for MySQL 5.0)
innobase/fil/fil0fil.c:
Fixed compiler warning
innobase/os/os0file.c:
Fixed compiler warning
myisam/ft_boolean_search.c:
Fixed compiler warning
myisam/ft_static.c:
Update to use new HA_KEYSEG structure
myisam/mi_open.c:
Simple optimization
myisammrg/myrg_static.c:
Removed compiler warning
mysql-test/r/grant.result:
Update results after merge
mysql-test/r/index_merge.result:
Update results after merge
mysql-test/r/information_schema_inno.result:
Add missing drop table
mysql-test/r/lowercase_table.result:
safety fix
mysql-test/r/multi_update.result:
safety fix
mysql-test/r/ps_1general.result:
safety fix
mysql-test/r/ps_2myisam.result:
Update results after merge
(set is not anymore of binary type)
mysql-test/r/ps_3innodb.result:
Update results after merge
mysql-test/r/ps_4heap.result:
Update results after merge
mysql-test/r/ps_5merge.result:
Update results after merge
mysql-test/r/ps_6bdb.result:
Update results after merge
mysql-test/r/show_check.result:
Update results after merge
mysql-test/r/subselect.result:
Update results after merge
(added missing quotes)
mysql-test/r/timezone2.result:
Update results after merge
mysql-test/r/view.result:
Update results after merge
(note that INSERT IGNORE will work again after next merge from 4.1)
mysql-test/t/derived.test:
Removed empty line
mysql-test/t/grant.test:
Update results after merge
mysql-test/t/information_schema_inno.test:
added missing drop table
mysql-test/t/lowercase_table.test:
safety fix
mysql-test/t/multi_update.test:
safety fix
mysql-test/t/ps_1general.test:
safety fix
mysql-test/t/view.test:
update error codes after merge
ndb/src/mgmsrv/main.cpp:
after merge fix
ndb/tools/ndb_test_platform.cpp:
removed compiler warnings
regex/main.c:
remove compiler warnings
sql/field.cc:
Remove compiler warning
sql/gen_lex_hash.cc:
Added DBUG support
sql/ha_myisam.cc:
Removed warning from valgrind
sql/ha_ndbcluster.cc:
Remove compiler warning
sql/item_cmpfunc.cc:
Better to use val_int() instead of val_real() as we don't want Item_func_nop_all to return different value than the original ref element
sql/mysqld.cc:
Remove compiler warning
sql/sql_acl.cc:
More debugging
sql/sql_lex.cc:
Remove unnecessary 'else'
sql/sql_parse.cc:
After merge fixes
Simplify reset of thd->server_status for SQLCOM_CALL
sql/sql_prepare.cc:
After merge fixes
Removed possible core dump in mysql_stmt_fetch()
sql/sql_update.cc:
After merge fixes (together with Sanja)
strings/ctype-czech.c:
Remove compiler warning
strings/ctype-ucs2.c:
Remove compiler warning
strings/ctype-win1250ch.c:
Remove compiler warning
strings/xml.c:
Remove compiler warning
tests/client_test.c:
Fix test to work with 5.0
vio/test-sslserver.c:
Portability fix
'information_schema' test is splitted because of innodb
mysql-test/r/information_schema.result:
Test is splitted because of innodb
mysql-test/t/information_schema.test:
Test is splitted because of innodb
sql/sql_show.cc:
Fixed bug related to lower case table names on Power Mac
sql/table.h:
Fixed bug related to lower case table names on Power Mac
tests/client_test.c:
Don't check field length for blob filed