mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#4203 Reorganize and fix the data dictionary tests of
testsuite funcs_1 1. Fix the following bugs Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration Solution: Test variants charset_collation_* adjusted to different builds Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table Solution: Excluding "PROFILING" table from queries Bug#33654 "slow log" is missing a line Solution: Unify the content of the fields TABLES.TABLE_ROWS and STATISTICS.CARDINALITY within result sets Bug#34532 Some funcs_1 tests do not clean up at end of testing Solution: DROP objects/reset global server variables modified during testing + let tests missing implementation end before loading of tables Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results Solution: Cut <engine>__datadict tests into smaller tests + generate new results. Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2) Generation of new results during post merge fix Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4 Generation of new results during post merge fix Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding Generation of new results during post merge fix + removal of platform-specific replace routine (no more needed) 2. Restructure the tests - Test not more than one INFORMATION_SCHEMA view per testscript - Separate tests of I_S view layout+functionality from content related to the all time existing databases "information_schema", "mysql" and "test" - Avoid storage engine related variants of tests which are not sensible to storage engines at all. 3. Reimplement or add some subtests + cleanup There is a some probability that even the reviewed changeset - does not fix all bugs from above or - contains new bugs which show up on some platforms <> Linux or on one of the various build types 4. The changeset contains fixes according to - one code review - minor bugs within testing code found after code review (accepted by reviewer) - problems found during tests with 5.0.56 in build environment mysql-test/suite/funcs_1/t/innodb_storedproc_02.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_03.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_06.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_07.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_08.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_10.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_02.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_03.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_06.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_07.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_08.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_10.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_02.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_03.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_06.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_07.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_08.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_10.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_02.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_03.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_06.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_07.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_08.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_10.inc: Change mode to -rw-rw-r-- BitKeeper/deleted/.del-innodb__load.test: Delete: mysql-test/suite/funcs_1/t/innodb__load.test BitKeeper/deleted/.del-innodb__load.result: Delete: mysql-test/suite/funcs_1/r/innodb__load.result BitKeeper/deleted/.del-myisam__load.test: Delete: mysql-test/suite/funcs_1/t/myisam__load.test BitKeeper/deleted/.del-memory__load.test: Delete: mysql-test/suite/funcs_1/t/memory__load.test BitKeeper/deleted/.del-memory__load.result: Delete: mysql-test/suite/funcs_1/r/memory__load.result BitKeeper/deleted/.del-myisam__load.result: Delete: mysql-test/suite/funcs_1/r/myisam__load.result BitKeeper/deleted/.del-create_database.inc: Delete: mysql-test/suite/funcs_1/include/create_database.inc BitKeeper/deleted/.del-create_user_lowest_priv.inc: Delete: mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc BitKeeper/deleted/.del-create_user_no_super.inc: Delete: mysql-test/suite/funcs_1/include/create_user_no_super.inc BitKeeper/deleted/.del-datadict_help_tables_build.result: Delete: mysql-test/suite/funcs_1/r/datadict_help_tables_build.result BitKeeper/deleted/.del-datadict_help_tables_build.test: Delete: mysql-test/suite/funcs_1/t/datadict_help_tables_build.test BitKeeper/deleted/.del-datadict_help_tables_dev.result: Delete: mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result BitKeeper/deleted/.del-datadict_help_tables_dev.test: Delete: mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test BitKeeper/deleted/.del-datadict_master.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_master.inc BitKeeper/deleted/.del-datadict_show_schema.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc BitKeeper/deleted/.del-datadict_show_table_design.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_show_table_design.inc BitKeeper/deleted/.del-datadict_tables.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables.inc BitKeeper/deleted/.del-datadict_tables_error.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc BitKeeper/deleted/.del-datadict_tables_error_1.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1.inc BitKeeper/deleted/.del-datadict_tables_error_1044.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1044.inc BitKeeper/deleted/.del-datadict_tables_error_1049.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1049.inc BitKeeper/deleted/.del-datadict_tables_error_1051.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1051.inc BitKeeper/deleted/.del-datadict_tables_error_1146.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1146.inc BitKeeper/deleted/.del-datadict_tables_error_1288.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1288.inc BitKeeper/deleted/.del-innodb__datadict.result: Delete: mysql-test/suite/funcs_1/r/innodb__datadict.result BitKeeper/deleted/.del-innodb__datadict.test: Delete: mysql-test/suite/funcs_1/t/innodb__datadict.test BitKeeper/deleted/.del-memory__datadict.test: Delete: mysql-test/suite/funcs_1/t/memory__datadict.test BitKeeper/deleted/.del-myisam__datadict.result: Delete: mysql-test/suite/funcs_1/r/myisam__datadict.result BitKeeper/deleted/.del-myisam__datadict.test: Delete: mysql-test/suite/funcs_1/t/myisam__datadict.test BitKeeper/deleted/.del-memory__datadict.result: Delete: mysql-test/suite/funcs_1/r/memory__datadict.result mysql-test/suite/funcs_1/README.txt: Cleanup in description mysql-test/suite/funcs_1/include/memory_tb1.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/memory_tb2.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/memory_tb3.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/memory_tb4.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/sp_tb.inc: Remove outdated comment mysql-test/suite/funcs_1/r/innodb_bitdata.result: Updated results mysql-test/suite/funcs_1/r/innodb_cursors.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_03.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_08.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_09.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_frkey.result: Updated results mysql-test/suite/funcs_1/r/innodb_views.result: Updated results mysql-test/suite/funcs_1/r/memory_bitdata.result: Updated results mysql-test/suite/funcs_1/r/memory_cursors.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_03.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_08.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_09.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/memory_views.result: Updated results mysql-test/suite/funcs_1/r/myisam_bitdata.result: Updated results mysql-test/suite/funcs_1/r/myisam_cursors.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_03.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_08.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_09.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/myisam_views.result: Updated results mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/t/innodb_bitdata.test: Cleanup mysql-test/suite/funcs_1/t/innodb_cursors.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_0102.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_03.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_08.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_09.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_frkey.test: Cleanup mysql-test/suite/funcs_1/t/innodb_views.test: Cleanup mysql-test/suite/funcs_1/t/memory_bitdata.test: Cleanup mysql-test/suite/funcs_1/t/memory_cursors.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_0102.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_03.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_08.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_09.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/memory_views.test: Cleanup mysql-test/suite/funcs_1/t/myisam_bitdata.test: Cleanup mysql-test/suite/funcs_1/t/myisam_cursors.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_0102.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_03.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_08.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_09.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/myisam_views.test: Cleanup mysql-test/suite/funcs_1/t/charset_collation_1.test: Check content of information_schema views character_sets, collations, collation_character_set_applicability Build variant 1 mysql-test/suite/funcs_1/t/charset_collation_2.test: Check content of information_schema views character_sets, collations, collation_character_set_applicability Build variant 2 mysql-test/suite/funcs_1/t/charset_collation_3.test: Check content of information_schema views character_sets, collations, collation_character_set_applicability Build variant 3 mysql-test/suite/funcs_1/t/is_basics_mixed.test: Test some basic properties which are independend of the storage engine used for the creation of tables. mysql-test/suite/funcs_1/t/is_character_sets.test: Tests related to functionality of information_schema.character_sets mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test: Tests related to functionality of information_schema.collation_character_set_applicability mysql-test/suite/funcs_1/t/is_collations.test: Tests related to functionality of information_schema.collations mysql-test/suite/funcs_1/t/is_column_privileges.test: Tests related to functionality of information_schema.column_privileges mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test: Check content of information_schema.column_privileges about databases mysql and test mysql-test/suite/funcs_1/t/is_columns.test: Tests related to functionality of information_schema.columns mysql-test/suite/funcs_1/t/is_columns_innodb.test: Check content of information_schema.columns when some tables are preloaded Variant for InnoDB mysql-test/suite/funcs_1/t/is_columns_is.test: Check content of information_schema.columns about schema information_schema mysql-test/suite/funcs_1/t/is_columns_memory.test: Check content of information_schema.columns when some tables are preloaded Variant for MEMORY mysql-test/suite/funcs_1/t/is_columns_myisam.test: Check content of information_schema.columns when some tables are preloaded Variant for MyISAM mysql-test/suite/funcs_1/t/is_columns_mysql.test: Check content of information_schema.columns about schema mysql mysql-test/suite/funcs_1/t/is_columns_ndb.test: Check content of information_schema.columns when some tables are preloaded Variant for NDB mysql-test/suite/funcs_1/t/is_key_column_usage.test: Tests related to functionality of information_schema.key_column_usage mysql-test/suite/funcs_1/t/is_routines.test: Tests related to functionality of information_schema.routines mysql-test/suite/funcs_1/t/is_schema_privileges.test: Tests related to functionality of information_schema.schema_privileges mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test: Check content of information_schema.schema_privileges about schemas information_schema, mysql and test mysql-test/suite/funcs_1/t/is_schemata.test: Tests related to functionality of information_schema.schemata mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test: Check content of information_schema.schemata about schemas information_schema, mysql and test mysql-test/suite/funcs_1/t/is_statistics.test: Tests related to functionality of information_schema.statistics mysql-test/suite/funcs_1/t/is_statistics_is.test: Check content of information_schema.statistics about schema information_schema mysql-test/suite/funcs_1/t/is_statistics_mysql.test: Check content of information_schema.statistics about schema mysql mysql-test/suite/funcs_1/t/is_table_constraints.test: Tests related to functionality of information_schema.table_constraints mysql-test/suite/funcs_1/t/is_table_constraints_is.test: Check content of information_schema.table_constraints about schema information_schema mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test: Check content of information_schema.table_constraints about schema mysql mysql-test/suite/funcs_1/t/is_table_privileges.test: Tests related to functionality of information_schema.table_privileges mysql-test/suite/funcs_1/datadict/basics_mixed1.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/basics_mixed2.inc: Auxiliary script mysql-test/suite/funcs_1/include/cleanup.inc: Auxiliary script mysql-test/suite/funcs_1/r/charset_collation_1.result: Expected result for new test mysql-test/suite/funcs_1/r/charset_collation_2.result: Expected result for new test mysql-test/suite/funcs_1/r/charset_collation_3.result: Expected result for new test mysql-test/suite/funcs_1/r/is_basics_mixed.result: Expected result for new test mysql-test/suite/funcs_1/r/is_character_sets.result: Expected result for new test mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result: Expected result for new test mysql-test/suite/funcs_1/r/is_collations.result: Expected result for new test mysql-test/suite/funcs_1/r/is_column_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_innodb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_memory.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_myisam.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_ndb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_key_column_usage.result: Expected result for new test mysql-test/suite/funcs_1/r/is_routines.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schema_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schemata.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result: Expected result for new test mysql-test/suite/funcs_1/r/is_statistics.result: Expected result for new test mysql-test/suite/funcs_1/r/is_statistics_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_statistics_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_constraints.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_constraints_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_innodb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_memory.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_myisam.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_ndb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_triggers.result: Expected result for new test mysql-test/suite/funcs_1/r/is_user_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_views.result: Expected result for new test mysql-test/suite/funcs_1/t/is_tables.test: Tests related to functionality of information_schema.tables mysql-test/suite/funcs_1/t/is_tables_innodb.test: Check content of information_schema.tables when some tables are preloaded Variant for InnoDB mysql-test/suite/funcs_1/t/is_tables_is.test: Check content of information_schema.tables about schema information_schema mysql-test/suite/funcs_1/t/is_tables_memory.test: Check content of information_schema.tables when some tables are preloaded Variant for MEMORY mysql-test/suite/funcs_1/t/is_tables_myisam.test: Check content of information_schema.tables when some tables are preloaded Variant for MyISAM mysql-test/suite/funcs_1/t/is_tables_mysql.test: Check content of information_schema.tables about schema mysql mysql-test/suite/funcs_1/t/is_tables_ndb.test: Check content of information_schema.tables when some tables are preloaded Variant for NDB mysql-test/suite/funcs_1/t/is_triggers.test: Tests related to functionality of information_schema.triggers mysql-test/suite/funcs_1/t/is_user_privileges.test: Tests related to functionality of information_schema.user_privileges mysql-test/suite/funcs_1/t/is_views.test: Tests related to functionality of information_schema.views mysql-test/suite/funcs_1/datadict/basics_mixed3.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/charset_collation.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/columns.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/datadict.pre: Auxiliary script mysql-test/suite/funcs_1/datadict/is_table_query.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/statistics.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/table_constraints.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/tables1.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/tables2.inc: Auxiliary script
This commit is contained in:
53
mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
Normal file
53
mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
Normal file
@ -0,0 +1,53 @@
|
||||
# suite/funcs_1/datadict/basics_mixed1.inc
|
||||
#
|
||||
# Auxiliary script to be sourced by suite/funcs_1/t/is_basics_mixed.test
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
|
||||
# 1 Attempt to create tables and views when residing in information_schema
|
||||
# 1.1 CREATE TABLE
|
||||
USE information_schema;
|
||||
let $message= root: create a table with a name of an IS table directly in IS;
|
||||
let $dd_part1= CREATE TABLE;
|
||||
let $dd_part2= ( c1 INT );
|
||||
--source suite/funcs_1/datadict/basics_mixed2.inc
|
||||
# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading
|
||||
--error ER_UNKNOWN_TABLE
|
||||
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
|
||||
#
|
||||
# 1.2 CREATE VIEW
|
||||
# 1.2.1 Hit on existing INFORMATION_SCHEMA table
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE VIEW tables AS SELECT 'garbage';
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE VIEW tables AS SELECT * FROM information_schema.tables;
|
||||
# 1.2.2 New view
|
||||
# ER_DBACCESS_DENIED_ERROR would be better.
|
||||
--error ER_UNKNOWN_TABLE
|
||||
CREATE VIEW v1 AS SELECT 'garbage';
|
||||
|
||||
# 2 Attempt to create tables and views when residing in information_schema
|
||||
# 1.1 CREATE TABLE
|
||||
USE test;
|
||||
let $message= root: create a table with a name of an IS table from other db;
|
||||
let $dd_part1= CREATE TABLE information_schema.;
|
||||
let $dd_part2= ( c1 INT );
|
||||
--source suite/funcs_1/datadict/basics_mixed2.inc
|
||||
# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading
|
||||
--error ER_UNKNOWN_TABLE
|
||||
CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
|
||||
#
|
||||
# Hit on existing INFORMATION_SCHEMA table
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE VIEW information_schema.tables AS SELECT 'garbage';
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE VIEW information_schema.tables AS
|
||||
SELECT * FROM information_schema.tables;
|
||||
# New table
|
||||
# ER_DBACCESS_DENIED_ERROR would be better.
|
||||
--error ER_UNKNOWN_TABLE
|
||||
CREATE VIEW information_schema.v1 AS SELECT 'garbage';
|
55
mysql-test/suite/funcs_1/datadict/basics_mixed2.inc
Normal file
55
mysql-test/suite/funcs_1/datadict/basics_mixed2.inc
Normal file
@ -0,0 +1,55 @@
|
||||
#### suite/funcs_1/datadict/basics_mixed2.inc
|
||||
#
|
||||
# Auxiliary script to be sourced by suite/funcs_1/datadict/is_basics_mixed1.inc
|
||||
#
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
#
|
||||
# Usage example(snip of script):
|
||||
# let $dd_part1= CREATE TABLE information_schema.;
|
||||
# let $dd_part2= ( c1 INT );
|
||||
# --source suite/funcs_1/datadict/basics_mixed2.inc
|
||||
#
|
||||
# We expect to get
|
||||
# ERROR 42000: Access denied for user 'root'@'localhost'
|
||||
# to database 'information_schema'
|
||||
# for every statement.
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
eval $dd_part1 triggers $dd_part2;
|
||||
|
42
mysql-test/suite/funcs_1/datadict/basics_mixed3.inc
Normal file
42
mysql-test/suite/funcs_1/datadict/basics_mixed3.inc
Normal file
@ -0,0 +1,42 @@
|
||||
#### suite/funcs_1/datadict/basics_mixed3.inc
|
||||
#
|
||||
# Auxiliary routine to be sourced by suite/funcs_1/t/is_basics_mixed.test
|
||||
#
|
||||
# Check if INFORMATION_SCHEMA tables contain a schema_name like 'db_data%'.
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
|
||||
# No column with the name of a database contained in:
|
||||
# character_sets collations collation_character_set_applicability
|
||||
# user_privileges
|
||||
SELECT DISTINCT table_schema FROM information_schema.columns
|
||||
WHERE table_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT table_schema FROM information_schema.column_privileges
|
||||
WHERE table_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT constraint_schema,table_schema
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT routine_schema FROM information_schema.routines
|
||||
WHERE routine_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT schema_name FROM information_schema.schemata
|
||||
WHERE schema_name LIKE 'db_data%';
|
||||
SELECT DISTINCT table_schema FROM information_schema.schema_privileges
|
||||
WHERE table_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
|
||||
WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT table_schema FROM information_schema.tables
|
||||
WHERE table_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT constraint_schema,table_schema
|
||||
FROM information_schema.table_constraints
|
||||
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT table_schema FROM information_schema.table_privileges
|
||||
WHERE table_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT trigger_schema,event_object_schema
|
||||
FROM information_schema.triggers
|
||||
WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
|
||||
SELECT DISTINCT table_schema FROM information_schema.views
|
||||
WHERE table_schema LIKE 'db_data%';
|
122
mysql-test/suite/funcs_1/datadict/charset_collation.inc
Normal file
122
mysql-test/suite/funcs_1/datadict/charset_collation.inc
Normal file
@ -0,0 +1,122 @@
|
||||
# suite/funcs_1/datadict/charset_collation.inc
|
||||
#
|
||||
# Tests checking the content of the information_schema tables
|
||||
# character_sets
|
||||
# collations
|
||||
# collation_character_set_applicability
|
||||
#
|
||||
#
|
||||
# The amount and properties of character_sets/collations depend on the
|
||||
# build type
|
||||
# 2007-12 MySQL 5.0
|
||||
# ---------------------------------------------------------------------
|
||||
#
|
||||
# Variant 1 fits to
|
||||
# version_comment MySQL Enterprise Server (Commercial)
|
||||
# version_comment MySQL Enterprise Server (GPL)
|
||||
# version_comment MySQL Classic Server (Commercial)
|
||||
# version_comment MySQL Pushbuild Edition, build <number>
|
||||
# (version_comment Source distribution
|
||||
# and
|
||||
# compile was without "max" - > no collation 'utf8_general_ci')
|
||||
#
|
||||
# Variant 2 fits to
|
||||
# version_comment MySQL Enterprise Server (GPL)
|
||||
# version_comment MySQL Classic Server (Commercial)
|
||||
# version_comment MySQL Pushbuild Edition, build <number>
|
||||
# (version_comment Source distribution
|
||||
# and
|
||||
# compile was without "max" - > collation 'utf8_general_ci' exists)
|
||||
#
|
||||
# Difference between variant 1 and 2 is the collation 'utf8_general_ci'.
|
||||
#
|
||||
# Variant 3 fits to
|
||||
# version_comment MySQL Community Server (GPL)
|
||||
# version_comment MySQL Cluster Server (Commercial)
|
||||
#
|
||||
# Difference between variant 3 and 2 is within the collation properties
|
||||
# IS_COMPILED and SORTLEN.
|
||||
#
|
||||
# Created:
|
||||
# 2007-12-18 mleich - remove the unstable character_set/collation subtests
|
||||
# from include/datadict-master.inc
|
||||
# - create this new test
|
||||
#
|
||||
|
||||
# Create a low privileged user.
|
||||
--error 0, ER_CANNOT_USER
|
||||
DROP USER dbdict_test@localhost;
|
||||
CREATE USER dbdict_test@localhost;
|
||||
|
||||
--echo # Establish connection con (user=dbdict_test)
|
||||
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
|
||||
connect (con,localhost,dbdict_test,,);
|
||||
################################################################################
|
||||
#
|
||||
# The original requirements for the following tests were:
|
||||
#
|
||||
# 3.2.2.2: Ensure that the table (information_schema.character_sets) shows the
|
||||
# relevant information on every character set for which the current
|
||||
# user or PUBLIC have the USAGE privilege.
|
||||
#
|
||||
# 3.2.2.3: Ensure that the table (information_schema.character_sets) does not
|
||||
# show any information on any character set for which the current user
|
||||
# or PUBLIC have no USAGE privilege.
|
||||
#
|
||||
#
|
||||
# 3.2.3.2: Ensure that the table (information_schema.collations) shows the
|
||||
# relevant information on every collation for which the current user
|
||||
# or PUBLIC have the USAGE privilege.
|
||||
#
|
||||
# 3.2.3.3: Ensure that the table (information_schema.collations) does not show
|
||||
# any information on any collations for which the current user and
|
||||
# PUBLIC have no USAGE privilege.
|
||||
#
|
||||
#
|
||||
# 3.2.4.2: Ensure that the table
|
||||
# information_schema.collation_character_set_applicability
|
||||
# shows the relevant information on every collation/character set
|
||||
# combination for which the current user or PUBLIC have the USAGE
|
||||
# privilege.
|
||||
#
|
||||
# 3.2.4.3: Ensure that the table
|
||||
# information_schema.collation_character_set_applicability
|
||||
# does not show any information on any collation/character set
|
||||
# combinations for which the current user and PUBLIC have no
|
||||
# USAGE privilege.
|
||||
#
|
||||
# Notes (2007-12-19 mleich):
|
||||
# - The requirements are outdated because grant/revoke privilege for using a
|
||||
# characterset/collation were never implemented.
|
||||
# Therefore the tests should simply check the content of these tables.
|
||||
#
|
||||
# - The amount of collations/character sets grows with new MySQL releases.
|
||||
#
|
||||
# - Even within the same release the amount of records within these tables
|
||||
# can differ between different build types (community, enterprise, source,...)
|
||||
#
|
||||
#
|
||||
################################################################################
|
||||
--echo
|
||||
SELECT *
|
||||
FROM information_schema.character_sets
|
||||
ORDER BY character_set_name;
|
||||
|
||||
--echo
|
||||
SELECT *
|
||||
FROM information_schema.collations
|
||||
ORDER BY collation_name;
|
||||
|
||||
echo;
|
||||
--echo
|
||||
SELECT *
|
||||
FROM information_schema.collation_character_set_applicability
|
||||
ORDER BY collation_name, character_set_name;
|
||||
|
||||
|
||||
# Cleanup
|
||||
--echo # Switch to connection default + disconnect con
|
||||
connection default;
|
||||
disconnect con;
|
||||
DROP USER dbdict_test@localhost;
|
||||
|
87
mysql-test/suite/funcs_1/datadict/columns.inc
Normal file
87
mysql-test/suite/funcs_1/datadict/columns.inc
Normal file
@ -0,0 +1,87 @@
|
||||
# suite/funcs_1/datadict/is_columns.inc
|
||||
#
|
||||
# Auxiliary script to be sourced by
|
||||
# is_columns_is
|
||||
# is_columns_mysql
|
||||
# is_columns_<engine>
|
||||
#
|
||||
# Purpose:
|
||||
# Check the content of information_schema.columns about tables within certain
|
||||
# database/s.
|
||||
#
|
||||
# Usage:
|
||||
# The variable $my_where has to
|
||||
# - be set before sourcing this script.
|
||||
# - contain the first part of the WHERE qualification
|
||||
# Example:
|
||||
# let $my_where = WHERE table_schema = 'information_schema'
|
||||
# AND table_name <> 'profiling';
|
||||
# --source suite/funcs_1/datadict/is_columns.inc
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval
|
||||
SELECT * FROM information_schema.columns
|
||||
$my_where
|
||||
ORDER BY table_schema, table_name, column_name;
|
||||
|
||||
--echo ##########################################################################
|
||||
--echo # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
|
||||
--echo ##########################################################################
|
||||
eval
|
||||
SELECT DISTINCT
|
||||
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
|
||||
DATA_TYPE,
|
||||
CHARACTER_SET_NAME,
|
||||
COLLATION_NAME
|
||||
FROM information_schema.columns
|
||||
$my_where
|
||||
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
|
||||
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
|
||||
|
||||
#FIXME 3.2.6.2: check the value 2.0079 tinytext ucs2 ucs2_general_ci
|
||||
eval
|
||||
SELECT DISTINCT
|
||||
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
|
||||
DATA_TYPE,
|
||||
CHARACTER_SET_NAME,
|
||||
COLLATION_NAME
|
||||
FROM information_schema.columns
|
||||
$my_where
|
||||
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
|
||||
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
|
||||
|
||||
eval
|
||||
SELECT DISTINCT
|
||||
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
|
||||
DATA_TYPE,
|
||||
CHARACTER_SET_NAME,
|
||||
COLLATION_NAME
|
||||
FROM information_schema.columns
|
||||
$my_where
|
||||
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
|
||||
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
|
||||
|
||||
echo --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values;
|
||||
echo --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL;
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval
|
||||
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
|
||||
TABLE_SCHEMA,
|
||||
TABLE_NAME,
|
||||
COLUMN_NAME,
|
||||
DATA_TYPE,
|
||||
CHARACTER_MAXIMUM_LENGTH,
|
||||
CHARACTER_OCTET_LENGTH,
|
||||
CHARACTER_SET_NAME,
|
||||
COLLATION_NAME,
|
||||
COLUMN_TYPE
|
||||
FROM information_schema.columns
|
||||
$my_where
|
||||
ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
|
||||
|
54
mysql-test/suite/funcs_1/datadict/datadict.pre
Normal file
54
mysql-test/suite/funcs_1/datadict/datadict.pre
Normal file
@ -0,0 +1,54 @@
|
||||
#### suite/funcs_1/datadict/datadict.pre
|
||||
#
|
||||
# Auxiliary script which loads prerequisites
|
||||
# (variables needed for --replace_result ...)
|
||||
# in datadictionary tests.
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
--disable_query_log
|
||||
|
||||
# Bug#12777 Different size shown for VARCHAR(n) columns (with n> 64)
|
||||
# in INFORMATION_SCHEMA
|
||||
# This bug was unfortunately (for testers) declared to be no bug.
|
||||
# So CHARACTER_MAXIMUM_LENGTH of several <whatever>_CATALOG columns within
|
||||
# the INFORMATION_SCHEMA depends on PATH_MAX of the operating system.
|
||||
# Workaround for this problem:
|
||||
# Get the size of ONE known colum and check the size against some values to
|
||||
# be able to use the correct --replace_result statement. Using this only the
|
||||
# one pair of 'wrong' values is replaced and not all occurrencies of all
|
||||
# possible pairs of values. See bug #12777 for details.
|
||||
SELECT character_maximum_length INTO @CML
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = 'information_schema'
|
||||
AND table_name = 'columns'
|
||||
AND column_name = 'table_catalog';
|
||||
|
||||
let $bug_12777_0512= `SELECT @CML = 512`;
|
||||
let $bug_12777_1023= `SELECT @CML = 1023`;
|
||||
let $bug_12777_1024= `SELECT @CML = 1024`;
|
||||
let $bug_12777_2048= `SELECT @CML = 2048`;
|
||||
# 4096 is the value used in the files with expected results.
|
||||
let $bug_12777_4095= `SELECT @CML = 4095`;
|
||||
if (0)
|
||||
{
|
||||
# enable this for debugging only, but NOT in a pushed version, as then the
|
||||
# result changes from OS to OS ...
|
||||
eval SELECT @CML AS 'CML',
|
||||
$bug_12777_0512 AS '512',
|
||||
$bug_12777_1023 AS '1023',
|
||||
$bug_12777_1024 AS '1024',
|
||||
$bug_12777_2048 AS '2048',
|
||||
$bug_12777_4095 AS '4095';
|
||||
}
|
||||
|
||||
|
||||
# Prepare a variable to be able to suppress machine dependant diffs
|
||||
# this can be used in: --replace_result $SERVER_NAME <SERVER_NAME>
|
||||
let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user
|
||||
WHERE host NOT In ("localhost", "127.0.0.1", "%")`;
|
||||
--enable_query_log
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_show_schema.test
|
||||
|
||||
# shows content of tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# let $message= <a message for the .result file>;
|
||||
# let $dbname= <prefix_of_a_cb_name>;
|
||||
# --source suite/funcs_1/datadict/datadict_show_schema.test
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
eval select *
|
||||
from information_schema.schemata
|
||||
where schema_name like '$dbname%';
|
||||
|
||||
eval select table_catalog, table_schema, engine
|
||||
from information_schema.tables
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select *
|
||||
from information_schema.columns
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select table_schema, table_name, is_updatable
|
||||
from information_schema.views
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select routine_name, routine_type, security_type, sql_mode
|
||||
from information_schema.routines
|
||||
where routine_schema like '$dbname%';
|
||||
|
||||
eval select table_name, index_schema, index_name, index_type
|
||||
from information_schema.statistics
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
--replace_result $SERVER_NAME <SERVER_NAME>
|
||||
--sorted_result
|
||||
eval select *
|
||||
from information_schema.user_privileges;
|
||||
# where grantee="'u_6_401013'@'%'";
|
||||
|
||||
eval select *
|
||||
from information_schema.column_privileges
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select *
|
||||
from information_schema.table_privileges
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select *
|
||||
from information_schema.key_column_usage
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval SELECT *
|
||||
FROM information_schema.triggers
|
||||
WHERE trigger_schema LIKE '$dbname%';
|
@ -1,28 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_show_table_design.test
|
||||
#
|
||||
# - shows design of *one* table from INFORMATION_SCHEMA
|
||||
# - used to have identical 'view' on all tested tables
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# let $is_table= <name of one of the tables>;
|
||||
# --source suite/funcs_1/datadict/datadict_show_table_design.test
|
||||
|
||||
USE information_schema;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval DESC $is_table;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval SHOW CREATE TABLE $is_table;
|
||||
|
||||
eval SELECT COUNT(*) FROM information_schema.columns
|
||||
WHERE table_schema = 'information_schema'
|
||||
AND table_name = '$is_table'
|
||||
ORDER BY ordinal_position;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval SELECT * FROM information_schema.columns
|
||||
WHERE table_schema = 'information_schema'
|
||||
AND table_name = '$is_table'
|
||||
ORDER BY ordinal_position;
|
@ -1,62 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
|
||||
#FIXME: splitting the "SELECT * FROM tables" in two parts until
|
||||
#FIXME: Bug #12397: wrong values shown in column CREATE_OPTIONS of INFORMATION_SCHEMA.TABLES
|
||||
#FIXME: is solved, like done in the _master.test, cannot be done here, so we replace here
|
||||
#FIXME: the result for ALL rows.
|
||||
# 9 AVG_ROW_LENGTH
|
||||
# 10 DATA_LENGTH
|
||||
# 11 MAX_DATA_LENGTH
|
||||
## 12 INDEX_LENGTH
|
||||
# 13 DATA_FREE
|
||||
# 15 CREATE_TIME
|
||||
# 16 UPDATE_TIME
|
||||
# 20 CREATE_OPTIONS
|
||||
--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#"
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
eval $dd_part1 collations where collation_name <> 'utf8_general_cs' $dd_part2;
|
||||
eval $dd_part1 collation_character_set_applicability where collation_name <> 'utf8_general_cs' $dd_part2;
|
||||
--replace_column 16 <Created> 17 <Last_Altered>
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
eval $dd_part1 views $dd_part2;
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
eval $dd_part1 triggers $dd_part2;
|
||||
|
||||
# later planned new tables for INFORMATION_SCHEMA (not before version 5.0.11)
|
||||
#
|
||||
# (see Reference Manual: 22.1.16. Other INFORMATION_SCHEMA Tables):
|
||||
#
|
||||
# parameters
|
||||
# referential_constraints
|
||||
#
|
||||
# check them here although they currently does not exist, but using this we
|
||||
# immedeatly get notice when they are implemented
|
||||
|
||||
#### DON'T FORGET TO ADD THE NEW TABLES TO THE CORRESPONDING FILES
|
||||
#### datadict_tables_error_<errno>.test !
|
||||
|
||||
--error 1109
|
||||
eval $dd_part1 parameters $dd_part2;
|
||||
|
||||
--error 1109
|
||||
eval $dd_part1 referential_constraints $dd_part2;
|
@ -1,33 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
|
||||
#--disable_query_log
|
||||
#eval SET @aux= 'This testcase shows the error number $error_no';
|
||||
#let $message= `SELECT @aux`;
|
||||
#--enable_query_log
|
||||
--source include/show_msg.inc
|
||||
|
||||
--disable_abort_on_error
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
eval $dd_part1 views $dd_part2;
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
eval $dd_part1 triggers $dd_part2;
|
||||
--enable_abort_on_error
|
@ -1,80 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1 (Can_t create/write to file ...):;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 views $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 triggers $dd_part2;
|
@ -1,51 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables_error_1044.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
# e.g.: ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
|
||||
|
||||
let $message= known error 1044 (ERROR 42000: Access denied for user ... to database ...):;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1044
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 triggers $dd_part2;
|
@ -1,49 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1049 (ERROR 42000: Unknown database ...):;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1049
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 triggers $dd_part2;
|
@ -1,49 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1051:;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1051
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 triggers $dd_part2;
|
@ -1,49 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1146:;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1146
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 triggers $dd_part2;
|
@ -1,49 +0,0 @@
|
||||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1288:;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1288
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 triggers $dd_part2;
|
42
mysql-test/suite/funcs_1/datadict/is_table_query.inc
Normal file
42
mysql-test/suite/funcs_1/datadict/is_table_query.inc
Normal file
@ -0,0 +1,42 @@
|
||||
# suite/funcs_1/datadict/is_table_query.inc
|
||||
#
|
||||
# Check that every INFORMATION_SCHEMA table can be queried with a SELECT
|
||||
# statement, just as if it were an ordinary user-defined table.
|
||||
# (Requirement 3.2.1.1)
|
||||
#
|
||||
# The variable $is_table must be set before sourcing this script.
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
--disable_warnings
|
||||
DROP VIEW IF EXISTS test.v1;
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP FUNCTION IF EXISTS test.f1;
|
||||
--enable_warnings
|
||||
eval CREATE VIEW test.v1 AS SELECT * FROM information_schema.$is_table;
|
||||
eval CREATE PROCEDURE test.p1() SELECT * FROM information_schema.$is_table;
|
||||
delimiter //;
|
||||
eval CREATE FUNCTION test.f1() returns BIGINT
|
||||
BEGIN
|
||||
DECLARE counter BIGINT DEFAULT NULL;
|
||||
SELECT COUNT(*) INTO counter FROM information_schema.$is_table;
|
||||
RETURN counter;
|
||||
END//
|
||||
delimiter ;//
|
||||
|
||||
|
||||
# We are not interested to check the content here.
|
||||
--echo # Attention: The printing of the next result sets is disabled.
|
||||
--disable_result_log
|
||||
eval SELECT * FROM information_schema.$is_table;
|
||||
SELECT * FROM test.v1;
|
||||
CALL test.p1;
|
||||
SELECT test.f1();
|
||||
--enable_result_log
|
||||
|
||||
DROP VIEW test.v1;
|
||||
DROP PROCEDURE test.p1;
|
||||
DROP FUNCTION test.f1;
|
55
mysql-test/suite/funcs_1/datadict/statistics.inc
Normal file
55
mysql-test/suite/funcs_1/datadict/statistics.inc
Normal file
@ -0,0 +1,55 @@
|
||||
# suite/funcs_1/datadict/statistics.inc
|
||||
#
|
||||
# Auxiliary script to be sourced by
|
||||
# is_statistics_is
|
||||
# is_statistics_mysql
|
||||
# is_statistics_<engine>
|
||||
#
|
||||
# Purpose:
|
||||
# Check the content of information_schema.statistics about tables within the
|
||||
# database '$database'.
|
||||
#
|
||||
# Usage:
|
||||
# The variable $database has to be set before sourcing this script.
|
||||
# Example:
|
||||
# let $database = db_data;
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
|
||||
--source suite/funcs_1/datadict/datadict.pre
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS db_datadict;
|
||||
--enable_warnings
|
||||
CREATE DATABASE db_datadict;
|
||||
|
||||
# Create a low privileged user.
|
||||
# Note: The database db_datadict is just a "home" for the low privileged user
|
||||
# and not in the focus of testing.
|
||||
--error 0,ER_CANNOT_USER
|
||||
DROP USER testuser1@localhost;
|
||||
CREATE USER testuser1@localhost;
|
||||
GRANT SELECT ON db_datadict.* TO testuser1@localhost;
|
||||
|
||||
let $my_select = SELECT * FROM information_schema.statistics
|
||||
$my_where
|
||||
ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
|
||||
--replace_column 10 #CARD#
|
||||
eval $my_select;
|
||||
|
||||
--echo # Establish connection testuser1 (user=testuser1)
|
||||
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
|
||||
connect (testuser1,localhost,testuser1,,db_datadict);
|
||||
--replace_column 10 #CARD#
|
||||
eval $my_select;
|
||||
|
||||
--echo # Switch to connection default and close connection testuser1
|
||||
connection default;
|
||||
disconnect testuser1;
|
||||
DROP USER testuser1@localhost;
|
||||
DROP DATABASE db_datadict;
|
||||
|
45
mysql-test/suite/funcs_1/datadict/table_constraints.inc
Normal file
45
mysql-test/suite/funcs_1/datadict/table_constraints.inc
Normal file
@ -0,0 +1,45 @@
|
||||
# suite/funcs_1/datadict/table_constraints.inc
|
||||
#
|
||||
# Auxiliary script to be sourced by
|
||||
# suite/funcs_1/t/is_table_constraints_mysql.test
|
||||
# suite/funcs_1/t/is_table_constraints_is.test
|
||||
#
|
||||
# The variable
|
||||
# $table_schema database to be inspected
|
||||
# has to be set before sourcing this script.
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS db_datadict;
|
||||
--enable_warnings
|
||||
CREATE DATABASE db_datadict;
|
||||
|
||||
# Create a low privileged user.
|
||||
# Note: The database db_datadict is just a "home" for the low privileged user
|
||||
# and not in the focus of testing.
|
||||
--error 0,ER_CANNOT_USER
|
||||
DROP USER testuser1@localhost;
|
||||
CREATE USER testuser1@localhost;
|
||||
GRANT SELECT ON db_datadict.* TO testuser1@localhost;
|
||||
|
||||
let $my_select = SELECT * FROM information_schema.table_constraints
|
||||
WHERE table_schema = '$table_schema'
|
||||
ORDER BY table_schema,table_name,constraint_name;
|
||||
eval $my_select;
|
||||
|
||||
--echo # Establish connection testuser1 (user=testuser1)
|
||||
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
|
||||
connect (testuser1,localhost,testuser1,,db_datadict);
|
||||
eval $my_select;
|
||||
|
||||
--echo # Switch to connection default and close connection testuser1
|
||||
connection default;
|
||||
disconnect testuser1;
|
||||
DROP USER testuser1@localhost;
|
||||
DROP DATABASE db_datadict;
|
||||
|
39
mysql-test/suite/funcs_1/datadict/tables1.inc
Normal file
39
mysql-test/suite/funcs_1/datadict/tables1.inc
Normal file
@ -0,0 +1,39 @@
|
||||
# suite/funcs_1/datadict/tables1.inc
|
||||
#
|
||||
# Auxiliary script to be sourced by
|
||||
# is_tables_mysql.test
|
||||
# is_tables_is.test
|
||||
# is_tables_<engine>.test
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS db_datadict;
|
||||
--enable_warnings
|
||||
CREATE DATABASE db_datadict;
|
||||
|
||||
--source suite/funcs_1/datadict/tables2.inc
|
||||
|
||||
# Create a low privileged user.
|
||||
# Note: The database db_datadict is just a "home" for the low privileged user
|
||||
# and not in the focus of testing.
|
||||
--error 0,ER_CANNOT_USER
|
||||
DROP USER testuser1@localhost;
|
||||
CREATE USER testuser1@localhost;
|
||||
GRANT SELECT ON db_datadict.* TO testuser1@localhost;
|
||||
|
||||
--echo # Establish connection testuser1 (user=testuser1)
|
||||
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
|
||||
connect (testuser1,localhost,testuser1,,db_datadict);
|
||||
--source suite/funcs_1/datadict/tables2.inc
|
||||
|
||||
--echo # Switch to connection default and close connection testuser1
|
||||
connection default;
|
||||
disconnect testuser1;
|
||||
DROP USER testuser1@localhost;
|
||||
DROP DATABASE db_datadict;
|
||||
|
47
mysql-test/suite/funcs_1/datadict/tables2.inc
Normal file
47
mysql-test/suite/funcs_1/datadict/tables2.inc
Normal file
@ -0,0 +1,47 @@
|
||||
# suite/funcs_1/datadict/tables2.inc
|
||||
#
|
||||
# Auxiliary script to be sourced by suite/funcs_1/datadict/tables1.inc.
|
||||
#
|
||||
# Author:
|
||||
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
|
||||
# testsuite funcs_1
|
||||
# Create this script based on older scripts and new code.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# 8 TABLE_ROWS
|
||||
# 9 AVG_ROW_LENGTH
|
||||
# 10 DATA_LENGTH
|
||||
# 11 MAX_DATA_LENGTH
|
||||
# 12 INDEX_LENGTH
|
||||
# 13 DATA_FREE
|
||||
# 15 CREATE_TIME
|
||||
# 16 UPDATE_TIME
|
||||
# 17 CHECK_TIME
|
||||
# 20 CREATE_OPTIONS
|
||||
# 21 TABLE_COMMENT User defined comment
|
||||
# + InnoDB
|
||||
# + NDB: "number_of_replicas: <number>" appended
|
||||
# + InnoDB: "InnoDB free: <number_kB> kB" appended
|
||||
# <number_kB> depends on tablespace history!
|
||||
# The LEFT/INSTR/IF/LENGTH stuff should remove these
|
||||
# storage engine specific part.
|
||||
let $innodb_pattern = 'InnoDB free';
|
||||
let $ndb_pattern = 'number_of_replicas';
|
||||
--vertical_results
|
||||
--replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#"
|
||||
eval
|
||||
SELECT *,
|
||||
LEFT( table_comment,
|
||||
IF(INSTR(table_comment,$innodb_pattern) = 0
|
||||
AND INSTR(table_comment,$ndb_pattern) = 0,
|
||||
LENGTH(table_comment),
|
||||
INSTR(table_comment,$innodb_pattern)
|
||||
+ INSTR(table_comment,$ndb_pattern) - 1))
|
||||
AS "user_comment",
|
||||
'-----------------------------------------------------' AS "Separator"
|
||||
FROM information_schema.tables
|
||||
$my_where
|
||||
ORDER BY table_schema,table_name;
|
||||
--horizontal_results
|
||||
|
Reference in New Issue
Block a user