mariadb/mysql-test/suite/innodb/r/tablespace_per_table_windows.result
Marko Mäkelä 228b7e4db5 MDEV-13626 Merge InnoDB test cases from MySQL 5.7
This imports and adapts a number of MySQL 5.7 test cases that are
applicable to MariaDB.

Some tests for old bug fixes are not that relevant because the code
has been refactored since then (especially starting with
MariaDB Server 10.6), and the tests would not reproduce the
original bug if the fix was reverted.

In the test innodb_fts.opt, there are many duplicate MATCH ranks, which
would make the results nondeterministic. The test was stabilized by
changing some LIMIT clauses or by adding sorted_result in those cases
where the purpose of a test was to show that no sorting took place
in the server.

In the test innodb_fts.phrase, MySQL 5.7 would generate FTS_DOC_ID that
are 1 larger than in MariaDB. In innodb_fts.index_table the difference is 2.
This is because in MariaDB, fts_get_next_doc_id() post-increments
cache->next_doc_id, while MySQL 5.7 pre-increments it.

Reviewed by: Thirunarayanan Balathandayuthapani
2023-11-08 12:17:14 +02:00

51 lines
2.9 KiB
Text

#
# Test the limits of a file-per-table tablespace name. MySQL combines
# the database name with the table name to make a unique table name.
#
SET default_storage_engine=InnoDB;
#
# MySQL limits each database and tablename identifier to 64 characters
# of up to 3 bytes per character, corresponding to 192 bytes.
#
CREATE DATABASE `this_sixty_five_byte_name_is_too_long____________________________`;
ERROR 42000: Incorrect database name 'this_sixty_five_byte_name_is_too_long____________________________'
CREATE DATABASE `this_sixty_four_byte_name_is_not_too_long_______________________`;
USE `this_sixty_four_byte_name_is_not_too_long_______________________`;
#
# A 64 character tablename can be created in a 64 character database name
#
CREATE TABLE `this_sixty_four_byte_name_is_not_too_long_______________________`.`this_sixty_four_byte_name_is_not_too_long_______________________` (a SERIAL);
#
# A 65 character tablename is too long.
#
CREATE TABLE `test`.`this_sixty_five_byte_name_is_too_long____________________________` (a SERIAL);
ERROR 42000: Incorrect table name 'this_sixty_five_byte_name_is_too_long____________________________'
CREATE TABLE `this_sixty_four_byte_name_is_not_too_long_______________________`.`this_sixty_five_byte_name_is_too_long____________________________` (a SERIAL);
ERROR 42000: Incorrect table name 'this_sixty_five_byte_name_is_too_long____________________________'
#
# Show the successfully created database and table
#
SHOW CREATE TABLE `this_sixty_four_byte_name_is_not_too_long_______________________`.`this_sixty_four_byte_name_is_not_too_long_______________________`;
Table Create Table
this_sixty_four_byte_name_is_not_too_long_______________________ CREATE TABLE `this_sixty_four_byte_name_is_not_too_long_______________________` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
---- list_files MYSQLD_DATADIR/this_sixty_four_byte_name_is_not_too_long_______________________
db.opt
this_sixty_four_byte_name_is_not_too_long_______________________.frm
this_sixty_four_byte_name_is_not_too_long_______________________.ibd
SELECT name FROM information_schema.innodb_sys_tables WHERE name LIKE '%long%';
name
this_sixty_four_byte_name_is_not_too_long_______________________/this_sixty_four_byte_name_is_not_too_long_______________________
SELECT name FROM information_schema.innodb_sys_tablespaces WHERE name LIKE '%long%';
name
this_sixty_four_byte_name_is_not_too_long_______________________/this_sixty_four_byte_name_is_not_too_long_______________________
SELECT path FROM information_schema.innodb_sys_datafiles WHERE path LIKE '%long%';
path
.\this_sixty_four_byte_name_is_not_too_long_______________________\this_sixty_four_byte_name_is_not_too_long_______________________.ibd
SELECT file_name, tablespace_name FROM information_schema.files WHERE file_name LIKE '%long%';
#
# Cleanup
#
DROP DATABASE `this_sixty_four_byte_name_is_not_too_long_______________________`;