You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

655 lines
20 KiB

-Run test suite with smaller aria keybuffer size (to make it possible to run more tests in parallel) -Added test and extra code to ensure we don't leave keyread on for a handler table. -Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. mysql-test/include/default_mysqld.cnf: Run test suite with smaller aria keybuffer size mysql-test/suite/maria/maria3.result: Run test suite with smaller aria keybuffer size mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result: Run test suite with smaller aria keybuffer size sql/handler.cc: Disable key read (extra safety if something went wrong) sql/multi_range_read.cc: Ensure we have don't leave keyread on for secondary_file sql/opt_range.cc: Simplify code with mark_columns_used_by_index_no_reset() Ensure that read_keys_and_merge() disableds keyread if it enables it sql/opt_subselect.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_derived.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_select.cc: Use 'enable_keyread()' instead of calling HA_EXTRA_RESET. (Makes debugging easier) Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. Remove not anymore used argument for create_internal_tmp_table() More DBUG sql/sql_select.h: Remove not anymore used argument for create_internal_tmp_table()
13 years ago
Fixed problem with very slow shutdown when using 100,000 MyISAM tables with delay_key_write Reason for the problem was that the hash of changed files in the key cache was too small (was 128). Fixed by making the hash size larger and changeable. - Introduced key-cache-file-hash-size (default 512) for MyISAM and aria_pagecache_file_hash_size (default 512) for Aria. - Added new status variable "Feature_delay_key_write" which counts number of tables opened that are using delay_key_write mysql-test/r/features.result: Added test of Feature_delay_key_write mysql-test/r/key_cache.result: Updated tests as the number of blocks has changed mysql-test/r/mysqld--help.result: Updated result mysql-test/suite/maria/maria3.result: Updated result mysql-test/suite/sys_vars/r/key_cache_file_hash_size_basic.result: Test new variable mysql-test/suite/sys_vars/t/aria_pagecache_file_hash_size_basic.test: Test new variable mysql-test/suite/sys_vars/t/key_cache_file_hash_size_basic.test: Test new variable mysql-test/t/features.test: Added test of Feature_delay_key_write mysql-test/t/key_cache.test: Updated tests as the number of blocks has changed mysys/mf_keycache.c: Made CHANGED_BLOCKS_HASH dynamic sql/handler.cc: Updated call to init_key_cache() sql/mysqld.cc: Added "Feature_delay_key_write" Added support for key-cache-file-hash-size sql/mysqld.h: Added support for key-cache-file-hash-size sql/sql_class.h: Added feature_files_opened_with_delayed_keys sql/sys_vars.cc: Added key_cache_file_hash_size storage/maria/ha_maria.cc: Added pagecache_file_hash_size Added counting of files with delay_key_write storage/maria/ma_checkpoint.c: Fixed compiler warning storage/maria/ma_pagecache.c: Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable storage/maria/ma_pagecache.h: Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable storage/maria/ma_rt_test.c: Updated parameters for init_pagecache() storage/maria/ma_test1.c: Updated parameters for init_pagecache() storage/maria/ma_test2.c: Updated parameters for init_pagecache() storage/maria/ma_test3.c: Updated parameters for init_pagecache() storage/maria/maria_chk.c: Updated parameters for init_pagecache() storage/maria/maria_ftdump.c: Updated parameters for init_pagecache() storage/maria/maria_pack.c: Updated parameters for init_pagecache() storage/maria/maria_read_log.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_consist.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_rwconsist.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_rwconsist2.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_single.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_nologs-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated parameters for init_pagecache() storage/myisam/ha_myisam.cc: Added counting of files with delay_key_write storage/myisam/mi_check.c: Updated call to init_key_cache() storage/myisam/mi_test1.c: Updated call to init_key_cache() storage/myisam/mi_test2.c: Updated call to init_key_cache() storage/myisam/mi_test3.c: Updated call to init_key_cache() storage/myisam/mi_test_all.sh: Fixed broken test storage/myisam/myisam_ftdump.c: Updated call to init_key_cache() storage/myisam/myisamchk.c: Updated call to init_key_cache() storage/myisam/myisamlog.c: Updated call to init_key_cache()
11 years ago
Added some fixes that should make MyISAM & Aria REPAIR work with more than 4G records - If one specifies --force twice to myisamchk and aria_chk, then we will try to finnish the repair even if sort_buffer would be too small. This was done by dynamically allocate buffer handler objects as long as memory lasts. - New option for myisamchk and aria_chk: create-missing-keys - Changed default size of myisam_sort_buffer_size from 8M to 128M. - Changed default size of sort_buffer_size in aria_chk from 128M to 256M. - Increased information in error message about 'sort_buffer_size' beeing to small. - Print also to 'show warnings' if repair was retried. - Increased size of internal sort-buffer-readers from 16K to 128K - Changed printing of 'number of records' to use %ll instead of casting to long - Changed buffer sizes for myisam and aria to use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines. include/my_global.h: Added MY_ALIGN_DOWN() to get previous alignment (for big memory areas) include/myisam.h: Increased size of types to be able to handle more records include/myisamchk.h: Increased size of types to be able to handle more records Added T_FORCE_SORT_MEMORY to force repair to work even if sort_buffer would not be big enough mysql-test/r/myisam.result: Updated result mysql-test/r/mysqld--help.result: Updated result mysql-test/r/repair.result: Updated result mysql-test/suite/maria/maria.result: Added test cases for some fixed bugs in MyISAM to verify that Aria doesn't have them too. mysql-test/suite/maria/maria.test: Added test cases for some fixed bugs in MyISAM to verify that Aria doesn't have them too. mysql-test/suite/maria/maria3.result: Updated result after sort buffer size increase mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result: Updated result after sort buffer size increase mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result: Updated result after sort buffer size increase mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test: Updated result after sort buffer size increase mysql-test/t/myisam.test: Fixed error messages to not print system specific data mysql-test/t/repair.test: Fixed error messages to not print system specific data storage/maria/ha_maria.cc: Print also to 'show warnings' if repair was retried Changed default size of sort_buffer_size from 128M to 256M (same as in mysqld) storage/maria/ma_check.c: Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT storage/maria/ma_sort.c: Increased size of internal sort-buffer-readers from 16K to 128K Increased size of types to be able to handle more records Added support for T_FORCE_SORT_MEMORY Don't allocate too many extra BUFFPEK at a time (they are probably not needed) Improved error message for "sort_buffer_size is too small" Changed printing of 'number of records' to use %ll instead of casting to long Fixed bug where maria_update_key_parts() was called too early. Fixed bug in detecting result from read_to_buffer(). Added 'out of memory' checking when calling 'alloc_dynamic()'. storage/maria/maria_chk.c: Added --create-missing-keys If one specifies --force twice then we will try to finnish the repair even if sort_buffer would be too small. check_param.sort_buffer_length varialble was used with wrong type. storage/maria/maria_def.h: Increased size of types to be able to handle more records Use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT storage/maria/maria_ftdump.c: Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT storage/maria/maria_read_log.c: Use PAGE_BUFFER_INIT for page cache storage/myisam/ha_myisam.cc: Changed default size of myisam_sort_buffer_size from 8M to 128M storage/myisam/mi_check.c: Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/myisam_ftdump.c: Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/myisamchk.c: Added --create-missing-keys If one specifies --force twice then we will try to finnish the repair even if sort_buffer would be too small. check_param.sort_buffer_length varialble was used with wrong type. Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/myisamdef.h: Increased SORT_BUFFER_INIT to 64M (speeds up repair a lot and most machines have nowadays a lot of memory) Use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/sort.c: Increased size of internal sort-buffer-readers from 16K to 128K Increased size of types to be able to handle more records Added support for T_FORCE_SORT_MEMORY Don't allocate too many extra BUFFPEK at a time (they are probably not needed) Improved error message for "sort_buffer_size is too small" Changed printing of 'number of records' to use %ll instead of casting to long Fixed bug in detecting result from read_to_buffer(). Added 'out of memory' checking when calling 'alloc_dynamic()'.
13 years ago
Fix for MDEV-533: Confusing error code when doing auto-increment insert for out-of-range values create table t1 (a smallint primary key auto_increment); insert into t1 values(32767); insert into t1 values(NULL); ERROR 1062 (23000): Duplicate entry '32767' for key 'PRIMARY Now on always gets error HA_ERR_AUTOINC_RANGE=167 "Out of range value for column", independent of store engine, SQL Mode or number of inserted rows. This is an unique error that is easier to test for in replication. Another bug fix is that we now get an error when trying to insert a too big auto-generated value, even in non-strict mode. Before one get insted the max column value inserted. This patch also fixes some issues with inserting negative numbers in an auto-increment column. Fixed the ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave. This ensures that replication works between an old server to a new slave for auto-increment overflow errors. Added SQLSTATE errors for handler errors Smaller bug fixes: * Added warnings for duplicate key errors when using INSERT IGNORE * Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0" * Allow one to see how cmake is called by using --just-print --just-configure BUILD/FINISH.sh: --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake. cmake/configure.pl: --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake. include/CMakeLists.txt: Added handler_state.h include/handler_state.h: SQLSTATE for handler error messages. Required for HA_ERR_AUTOINC_ERANGE, but solves also some other cases. mysql-test/extra/binlog_tests/binlog.test: Fixed old wrong behaviour Added more tests mysql-test/extra/binlog_tests/binlog_insert_delayed.test: Reset binary log to only print what's necessary in show_binlog_events mysql-test/extra/rpl_tests/rpl_auto_increment.test: Update to new error codes mysql-test/extra/rpl_tests/rpl_insert_delayed.test: Ignore warnings as this depends on how the test is run mysql-test/include/strict_autoinc.inc: On now gets an error on overflow mysql-test/r/auto_increment.result: Update results after fixing error message mysql-test/r/auto_increment_ranges_innodb.result: Test new behaviour mysql-test/r/auto_increment_ranges_myisam.result: Test new behaviour mysql-test/r/commit_1innodb.result: Added warnings for duplicate key error mysql-test/r/create.result: Added warnings for duplicate key error mysql-test/r/insert.result: Added warnings for duplicate key error mysql-test/r/insert_select.result: Added warnings for duplicate key error mysql-test/r/insert_update.result: Added warnings for duplicate key error mysql-test/r/mix2_myisam.result: Added warnings for duplicate key error mysql-test/r/myisam_mrr.result: Added warnings for duplicate key error mysql-test/r/null_key.result: Added warnings for duplicate key error mysql-test/r/replace.result: Update to new error codes mysql-test/r/strict_autoinc_1myisam.result: Update to new error codes mysql-test/r/strict_autoinc_2innodb.result: Update to new error codes mysql-test/r/strict_autoinc_3heap.result: Update to new error codes mysql-test/r/trigger.result: Added warnings for duplicate key error mysql-test/r/xtradb_mrr.result: Added warnings for duplicate key error mysql-test/suite/binlog/r/binlog_innodb_row.result: Updated result mysql-test/suite/binlog/r/binlog_row_binlog.result: Out of range data for auto-increment is not inserted anymore mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result: Updated result mysql-test/suite/binlog/r/binlog_stm_binlog.result: Out of range data for auto-increment is not inserted anymore mysql-test/suite/binlog/r/binlog_unsafe.result: Updated result mysql-test/suite/innodb/r/innodb-autoinc.result: Update to new error codes mysql-test/suite/innodb/r/innodb-lock.result: Updated results mysql-test/suite/innodb/r/innodb.result: Updated results mysql-test/suite/innodb/r/innodb_bug56947.result: Updated results mysql-test/suite/innodb/r/innodb_mysql.result: Updated results mysql-test/suite/innodb/t/innodb-autoinc.test: Update to new error codes mysql-test/suite/maria/maria3.result: Updated result mysql-test/suite/maria/mrr.result: Updated result mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result: Updated result mysql-test/suite/rpl/r/rpl_auto_increment.result: Update to new error codes mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff: Updated results mysql-test/suite/rpl/r/rpl_loaddatalocal.result: Updated results mysql-test/t/auto_increment.test: Update to new error codes mysql-test/t/auto_increment_ranges.inc: Test new behaviour mysql-test/t/auto_increment_ranges_innodb.test: Test new behaviour mysql-test/t/auto_increment_ranges_myisam.test: Test new behaviour mysql-test/t/replace.test: Update to new error codes mysys/my_getopt.c: Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0" sql/handler.cc: Ignore negative values for signed auto-increment columns Always give an error if we get an overflow for an auto-increment-column (instead of inserting the max value) Ensure that the row number is correct for the out-of-range-value error message. ****** Fixed wrong printing of column namn for "Out of range value" errors Fixed that INSERT_ID is correctly replicated also for out-of-range autoincrement values Fixed that print_keydup_error() can also be used to generate warnings ****** Return HA_ERR_AUTOINC_ERANGE (167) instead of ER_WARN_DATA_OUT_OF_RANGE for auto-increment overflow sql/handler.h: Allow INSERT IGNORE to continue also after out-of-range inserts. Fixed that print_keydup_error() can also be used to generate warnings sql/log_event.cc: Added DBUG_PRINT Fixed the ER_AUTOINC_READ_FAILED, ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave. This ensures that replication works between an old server to a new slave for auto-increment overflow errors. sql/sql_insert.cc: Add warnings for duplicate key errors when using INSERT IGNORE sql/sql_state.c: Added handler errors sql/sql_table.cc: Update call to print_keydup_error() storage/innobase/handler/ha_innodb.cc: Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB. storage/xtradb/handler/ha_innodb.cc: Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB.
13 years ago
Fixed some bugs in the Maria storage engine - Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables. - Fixed a rase condition when two threads calls external_lock and thr_lock() in different order. When this happend the transaction that called external lock first and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete. - Fixed that one can run maria_chk on an automatcally recovered tables without warnings about too small transaction id - Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run) - Fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated. client/mysqldump.c: Add "" around error message to make it more readable client/mysqltest.cc: Free environment variables mysql-test/r/mysqldump.result: Updated results mysql-test/r/openssl_1.result: Updated results mysql-test/suite/maria/r/maria-recover.result: Updated results mysql-test/suite/maria/r/maria3.result: Updated results mysql-test/suite/maria/t/maria3.test: Added more test of temporary tables storage/maria/ha_maria.cc: Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables. Start transaction in ma_block_get_status() instead of in ha_maria::external_lock(). - This fixes a rase condition when two threads calls external lock and thr_lock() in different order. When this happend the transaction that called external lock first and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete. Store latest transaction id in controll file if recovery was done. - This allows one to run maria_chk on an automatcally recovered tables without warnings about too small transaction id storage/maria/ha_maria.h: Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run) storage/maria/ma_blockrec.h: Added new function "_ma_block_get_status_no_versioning()" storage/maria/ma_init.c: Added hook to create trn in ma_block_get_status() if we are using MariaDB storage/maria/ma_open.c: Ensure we call _ma_block_get_status_no_versioning() for transactional tables without versioning (like tables with fulltext) storage/maria/ma_pagecache.c: Allow one to flush blocks that are pinned for read. This fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated. storage/maria/ma_recovery.c: Set maria_recovery_changed_data to 1 if recover changed something. Set max_trid_in_control_file to max found trn if we found a bigger trn. The allows will ensure that the control file is up to date after recovery which allows one to run maria_chk on the tables without warnings about too big trn storage/maria/ma_state.c: Call maria_create_trn_hook() in _ma_setup_live_state() instead of ha_maria::external_lock() This ensures that 'state' and trn are in sync and thus fixes the race condition mentioned for ha_maria.cc storage/maria/ma_static.c: Added maria_create_trn_hook() and maria_recovery_changed_data storage/maria/maria_def.h: Added MARIA_HANDLER->external_ptr, which is used to hold MariaDB thd. Added some new external variables Removed reference to non existing function: maria_concurrent_inserts()
16 years ago
14 years ago
  1. select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
  2. ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
  3. Aria YES Crash-safe tables with MyISAM heritage NO NO NO
  4. set global storage_engine=aria;
  5. set session storage_engine=aria;
  6. set global aria_page_checksum=0;
  7. set global aria_log_file_size=4294959104;
  8. drop table if exists t1,t2;
  9. SET SQL_WARNINGS=1;
  10. create table t1 (a int not null, key `a` (a) key_block_size=512);
  11. show create table t1;
  12. Table Create Table
  13. t1 CREATE TABLE `t1` (
  14. `a` int(11) NOT NULL,
  15. KEY `a` (`a`) KEY_BLOCK_SIZE=8192
  16. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
  17. drop table t1;
  18. create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
  19. Warnings:
  20. Warning 1071 Specified key was too long; max key length is 1000 bytes
  21. show create table t1;
  22. Table Create Table
  23. t1 CREATE TABLE `t1` (
  24. `a` varchar(2048) DEFAULT NULL,
  25. KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192
  26. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
  27. drop table t1;
  28. create table t1 (a int not null, key `a` (a) key_block_size=1025);
  29. show create table t1;
  30. Table Create Table
  31. t1 CREATE TABLE `t1` (
  32. `a` int(11) NOT NULL,
  33. KEY `a` (`a`) KEY_BLOCK_SIZE=8192
  34. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
  35. drop table t1;
  36. create table t1 (a int not null, key key_block_size=1024 (a));
  37. ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=1024 (a))' at line 1
  38. create table t1 (a int not null, key `a` key_block_size=1024 (a));
  39. ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1
  40. CREATE TABLE t1 (
  41. c1 INT,
  42. c2 VARCHAR(300),
  43. KEY (c1) KEY_BLOCK_SIZE 1024,
  44. KEY (c2) KEY_BLOCK_SIZE 8192
  45. );
  46. INSERT INTO t1 VALUES (10, REPEAT('a', CEIL(RAND(10) * 300))),
  47. (11, REPEAT('b', CEIL(RAND() * 300))),
  48. (12, REPEAT('c', CEIL(RAND() * 300))),
  49. (13, REPEAT('d', CEIL(RAND() * 300))),
  50. (14, REPEAT('e', CEIL(RAND() * 300))),
  51. (15, REPEAT('f', CEIL(RAND() * 300))),
  52. (16, REPEAT('g', CEIL(RAND() * 300))),
  53. (17, REPEAT('h', CEIL(RAND() * 300))),
  54. (18, REPEAT('i', CEIL(RAND() * 300))),
  55. (19, REPEAT('j', CEIL(RAND() * 300))),
  56. (20, REPEAT('k', CEIL(RAND() * 300))),
  57. (21, REPEAT('l', CEIL(RAND() * 300))),
  58. (22, REPEAT('m', CEIL(RAND() * 300))),
  59. (23, REPEAT('n', CEIL(RAND() * 300))),
  60. (24, REPEAT('o', CEIL(RAND() * 300))),
  61. (25, REPEAT('p', CEIL(RAND() * 300))),
  62. (26, REPEAT('q', CEIL(RAND() * 300))),
  63. (27, REPEAT('r', CEIL(RAND() * 300))),
  64. (28, REPEAT('s', CEIL(RAND() * 300))),
  65. (29, REPEAT('t', CEIL(RAND() * 300))),
  66. (30, REPEAT('u', CEIL(RAND() * 300))),
  67. (31, REPEAT('v', CEIL(RAND() * 300))),
  68. (32, REPEAT('w', CEIL(RAND() * 300))),
  69. (33, REPEAT('x', CEIL(RAND() * 300))),
  70. (34, REPEAT('y', CEIL(RAND() * 300))),
  71. (35, REPEAT('z', CEIL(RAND() * 300)));
  72. INSERT INTO t1 SELECT * FROM t1;
  73. INSERT INTO t1 SELECT * FROM t1;
  74. CHECK TABLE t1;
  75. Table Op Msg_type Msg_text
  76. test.t1 check status OK
  77. REPAIR TABLE t1;
  78. Table Op Msg_type Msg_text
  79. test.t1 repair status OK
  80. DELETE FROM t1 WHERE c1 >= 10;
  81. CHECK TABLE t1;
  82. Table Op Msg_type Msg_text
  83. test.t1 check status OK
  84. DROP TABLE t1;
  85. create table t1 (a int) transactional=0;
  86. show create table t1;
  87. Table Create Table
  88. t1 CREATE TABLE `t1` (
  89. `a` int(11) DEFAULT NULL
  90. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=0
  91. drop table t1;
  92. create table t1 (a int) row_format=dynamic transactional=0;
  93. show create table t1;
  94. Table Create Table
  95. t1 CREATE TABLE `t1` (
  96. `a` int(11) DEFAULT NULL
  97. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
  98. drop table t1;
  99. create table t1 (a int) row_format=dynamic transactional=1;
  100. Warnings:
  101. Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
  102. show create table t1;
  103. Table Create Table
  104. t1 CREATE TABLE `t1` (
  105. `a` int(11) DEFAULT NULL
  106. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
  107. alter table t1 row_format=PAGE;
  108. show create table t1;
  109. Table Create Table
  110. t1 CREATE TABLE `t1` (
  111. `a` int(11) DEFAULT NULL
  112. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
  113. alter table t1 row_format=DYNAMIC;
  114. Warnings:
  115. Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
  116. show create table t1;
  117. Table Create Table
  118. t1 CREATE TABLE `t1` (
  119. `a` int(11) DEFAULT NULL
  120. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
  121. alter table t1 transactional=0;
  122. show create table t1;
  123. Table Create Table
  124. t1 CREATE TABLE `t1` (
  125. `a` int(11) DEFAULT NULL
  126. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
  127. alter table t1 row_format=DYNAMIC;
  128. show create table t1;
  129. Table Create Table
  130. t1 CREATE TABLE `t1` (
  131. `a` int(11) DEFAULT NULL
  132. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
  133. drop table t1;
  134. create table t1 (a int) row_format=PAGE;
  135. show create table t1;
  136. Table Create Table
  137. t1 CREATE TABLE `t1` (
  138. `a` int(11) DEFAULT NULL
  139. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
  140. drop table t1;
  141. create table t1 (a int) row_format=PAGE TRANSACTIONAL=DEFAULT;
  142. show create table t1;
  143. Table Create Table
  144. t1 CREATE TABLE `t1` (
  145. `a` int(11) DEFAULT NULL
  146. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
  147. alter table t1 row_format=DYNAMIC;
  148. show create table t1;
  149. Table Create Table
  150. t1 CREATE TABLE `t1` (
  151. `a` int(11) DEFAULT NULL
  152. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC
  153. drop table t1;
  154. create table t1 (a int) transactional=0 row_format=FIXED;
  155. show create table t1;
  156. Table Create Table
  157. t1 CREATE TABLE `t1` (
  158. `a` int(11) DEFAULT NULL
  159. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
  160. alter table t1 transactional=1;
  161. Warnings:
  162. Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
  163. show create table t1;
  164. Table Create Table
  165. t1 CREATE TABLE `t1` (
  166. `a` int(11) DEFAULT NULL
  167. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
  168. alter table t1 transactional=0;
  169. show create table t1;
  170. Table Create Table
  171. t1 CREATE TABLE `t1` (
  172. `a` int(11) DEFAULT NULL
  173. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
  174. drop table t1;
  175. create table t1 (a int) transactional=0 row_format=FIXED;
  176. show create table t1;
  177. Table Create Table
  178. t1 CREATE TABLE `t1` (
  179. `a` int(11) DEFAULT NULL
  180. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
  181. alter table t1 transactional=1;
  182. Warnings:
  183. Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
  184. show create table t1;
  185. Table Create Table
  186. t1 CREATE TABLE `t1` (
  187. `a` int(11) DEFAULT NULL
  188. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
  189. alter table t1 transactional=0;
  190. show create table t1;
  191. Table Create Table
  192. t1 CREATE TABLE `t1` (
  193. `a` int(11) DEFAULT NULL
  194. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
  195. drop table t1;
  196. create table `t1` (
  197. t1_name varchar(255) default null,
  198. t1_id int(10) unsigned not null auto_increment,
  199. key (t1_name),
  200. primary key (t1_id)
  201. ) engine=aria auto_increment = 1000 default charset=latin1;
  202. lock tables t1 write;
  203. INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002);
  204. check table t1;
  205. Table Op Msg_type Msg_text
  206. test.t1 check status OK
  207. unlock tables;
  208. create table t2 like t1;
  209. insert into t2 select * from t1;
  210. analyze table t2;
  211. Table Op Msg_type Msg_text
  212. test.t2 analyze status Table is already up to date
  213. delete from t2;
  214. insert into t2 select * from t1;
  215. analyze table t2;
  216. Table Op Msg_type Msg_text
  217. test.t2 analyze status Table is already up to date
  218. drop table t1,t2;
  219. create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000));
  220. update t1 set b=repeat('a',100) where a between 1 and 100;
  221. check table t1;
  222. Table Op Msg_type Msg_text
  223. test.t1 check status OK
  224. update t1 set c=repeat('a',8192*2) where a between 200 and 202;
  225. check table t1;
  226. Table Op Msg_type Msg_text
  227. test.t1 check status OK
  228. drop table t1;
  229. CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=aria;
  230. insert into t1 values (1,1,"aaa"),(1,2,null);
  231. checksum table t1;
  232. Table Checksum
  233. test.t1 1112804611
  234. insert into t1 values (1,3,repeat('c',30000)),(4,4,repeat('a',30000));
  235. update t1 set v="row5" where b=4;
  236. delete from t1 where b=3;
  237. select a, b, length(v) from t1;
  238. a b length(v)
  239. 1 1 3
  240. 1 2 NULL
  241. 4 4 4
  242. drop table t1;
  243. CREATE TABLE t1 (
  244. auto int(5) unsigned NOT NULL auto_increment,
  245. string char(10) default "hello",
  246. tiny tinyint(4) DEFAULT '0' NOT NULL ,
  247. short smallint(6) DEFAULT '1' NOT NULL ,
  248. medium mediumint(8) DEFAULT '0' NOT NULL,
  249. long_int int(11) DEFAULT '0' NOT NULL,
  250. longlong bigint(13) DEFAULT '0' NOT NULL,
  251. real_float float(13,1) DEFAULT 0.0 NOT NULL,
  252. real_double double(16,4),
  253. utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
  254. ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
  255. umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
  256. ulong int(11) unsigned DEFAULT '0' NOT NULL,
  257. ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
  258. time_stamp timestamp,
  259. date_field date,
  260. time_field time,
  261. date_time datetime,
  262. blob_col blob,
  263. tinyblob_col tinyblob,
  264. mediumblob_col mediumblob not null default '',
  265. longblob_col longblob not null default '',
  266. options enum('one','two','tree') not null ,
  267. flags set('one','two','tree') not null default '',
  268. PRIMARY KEY (auto),
  269. KEY (utiny),
  270. KEY (tiny),
  271. KEY (short),
  272. KEY any_name (medium),
  273. KEY (longlong),
  274. KEY (real_float),
  275. KEY (ushort),
  276. KEY (umedium),
  277. KEY (ulong),
  278. KEY (ulonglong,ulong),
  279. KEY (options,flags)
  280. ) engine=aria;
  281. insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
  282. create table t2 (primary key (auto)) engine=aria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
  283. check table t1,t2;
  284. Table Op Msg_type Msg_text
  285. test.t1 check status OK
  286. test.t2 check status OK
  287. select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
  288. t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8
  289. 1 a 256 256 4096 4096
  290. drop table t2;
  291. create table t2 (primary key (auto)) engine=aria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
  292. check table t2;
  293. Table Op Msg_type Msg_text
  294. test.t2 check status OK
  295. drop table t1,t2;
  296. CREATE TABLE t1 (seq int, s1 int, s2 blob);
  297. insert into t1 values (1, 1, MD5(1));
  298. update t1 set s1=2 where seq=1;
  299. check table t1 extended;
  300. Table Op Msg_type Msg_text
  301. test.t1 check status OK
  302. drop table t1;
  303. select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "aria%" and variable_name not like "aria_used_for_temp_tables" order by 1;
  304. Variable_name Value
  305. aria_block_size 8192
  306. aria_checkpoint_interval 30
  307. aria_checkpoint_log_activity 1048576
  308. aria_encrypt_tables OFF
  309. aria_force_start_after_recovery_failures 0
  310. aria_group_commit none
  311. aria_group_commit_interval 0
  312. aria_log_file_size 4294959104
  313. aria_log_purge_type immediate
  314. aria_max_sort_file_size 9223372036853727232
  315. aria_pagecache_age_threshold 300
  316. aria_pagecache_buffer_size 8388608
  317. aria_pagecache_division_limit 100
  318. aria_pagecache_file_hash_size 512
  319. aria_page_checksum OFF
  320. aria_recover NORMAL
  321. aria_repair_threads 1
  322. aria_sort_buffer_size 268434432
  323. aria_stats_method nulls_unequal
  324. aria_sync_log_dir NEWFILE
  325. show status like 'aria%';
  326. Variable_name Value
  327. Aria_pagecache_blocks_not_flushed #
  328. Aria_pagecache_blocks_unused #
  329. Aria_pagecache_blocks_used #
  330. Aria_pagecache_read_requests #
  331. Aria_pagecache_reads #
  332. Aria_pagecache_write_requests #
  333. Aria_pagecache_writes #
  334. Aria_transaction_log_syncs #
  335. create table t1 (b char(0));
  336. insert into t1 values(NULL),("");
  337. select length(b) from t1;
  338. length(b)
  339. NULL
  340. 0
  341. alter table t1 add column c char(0), add key (c);
  342. insert into t1 values("",""),("",NULL);
  343. select length(b),length(c) from t1;
  344. length(b) length(c)
  345. NULL NULL
  346. 0 NULL
  347. 0 0
  348. 0 NULL
  349. select length(b),length(c) from t1 where c is null;
  350. length(b) length(c)
  351. NULL NULL
  352. 0 NULL
  353. 0 NULL
  354. select length(b),length(c) from t1 where c is not null;
  355. length(b) length(c)
  356. 0 0
  357. select length(b),length(c) from t1 order by c;
  358. length(b) length(c)
  359. NULL NULL
  360. 0 NULL
  361. 0 NULL
  362. 0 0
  363. alter table t1 add column d char(0) not null, add key (d);
  364. ERROR 42000: The storage engine Aria can't index column `d`
  365. drop table t1;
  366. CREATE TABLE t1 (a bit(3));
  367. insert into t1 values (NULL),(0),(1),(2),(3),(4),(5),(6),(7);
  368. select hex(a) from t1;
  369. hex(a)
  370. NULL
  371. 0
  372. 1
  373. 2
  374. 3
  375. 4
  376. 5
  377. 6
  378. 7
  379. drop table t1;
  380. create table t1(a bit not null);
  381. insert into t1 values(0),(1);
  382. select a+0 from t1;
  383. a+0
  384. 0
  385. 1
  386. drop table t1;
  387. CREATE TABLE t1 (col1 int, s1 char(16) DEFAULT NULL, s2 char(16) DEFAULT NULL, KEY (s1,s2));
  388. insert into t1 (col1) values(0);
  389. drop table t1;
  390. set global aria_page_checksum=1;
  391. create table t1 (a int);
  392. show create table t1;
  393. Table Create Table
  394. t1 CREATE TABLE `t1` (
  395. `a` int(11) DEFAULT NULL
  396. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  397. set global aria_page_checksum=0;
  398. drop table t1;
  399. set global aria_log_file_size=4294967296;
  400. Warnings:
  401. Warning 1292 Truncated incorrect aria_log_file_size value: '4294967296'
  402. create table t1 (a int not null);
  403. lock tables t1 write;
  404. insert into t1 values (1),(2);
  405. delete from t1;
  406. unlock tables;
  407. select * from t1;
  408. a
  409. insert into t1 values (1),(2);
  410. delete from t1;
  411. select * from t1;
  412. a
  413. drop table t1;
  414. create table t1 (c int);
  415. insert into t1 values(1),(2);
  416. create table t2 select * from t1;
  417. create table t3 select * from t1, t2;
  418. ERROR 42S21: Duplicate column name 'c'
  419. create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
  420. drop table t1, t2, t3;
  421. create table t1 (t datetime) engine=aria;
  422. insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
  423. select * from t1;
  424. t
  425. 2000-01-01 00:00:00
  426. 2069-12-31 00:00:00
  427. 1970-01-01 00:00:00
  428. 1999-12-31 00:00:00
  429. 1000-01-01 00:00:00
  430. 9999-12-31 00:00:00
  431. 2000-01-01 00:00:00
  432. 2069-12-31 00:00:00
  433. 1970-01-01 00:00:00
  434. 1999-12-31 23:59:59
  435. 1000-01-01 00:00:00
  436. 9999-12-31 23:59:59
  437. 2003-01-00 00:00:00
  438. 2003-00-00 00:00:00
  439. optimize table t1;
  440. Table Op Msg_type Msg_text
  441. test.t1 optimize status OK
  442. check table t1;
  443. Table Op Msg_type Msg_text
  444. test.t1 check status OK
  445. delete from t1 where t > 0;
  446. optimize table t1;
  447. Table Op Msg_type Msg_text
  448. test.t1 optimize status OK
  449. check table t1;
  450. Table Op Msg_type Msg_text
  451. test.t1 check status OK
  452. drop table t1;
  453. SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
  454. CREATE TABLE t1 (id int(11) PRIMARY KEY auto_increment,f1 varchar(10) NOT NULL UNIQUE);
  455. INSERT IGNORE INTO t1 (f1) VALUES ("test1");
  456. INSERT IGNORE INTO t1 (f1) VALUES ("test1");
  457. Warnings:
  458. Warning 1062 Duplicate entry 'test1' for key 'f1'
  459. INSERT IGNORE INTO t1 (f1) VALUES ("test2");
  460. SELECT * FROM t1;
  461. id f1
  462. 1 test1
  463. 2 test2
  464. drop table t1;
  465. SET SQL_MODE = '';
  466. create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
  467. insert into t1 values(100, "a");
  468. insert into t1 values(300, "b");
  469. insert into t1 values(50, "a");
  470. ERROR 23000: Duplicate entry 'a' for key 'c'
  471. insert into t1 values(null, "c");
  472. select * from t1;
  473. n c
  474. 100 a
  475. 300 b
  476. 301 c
  477. update t1 set n=400,c='a' where n=301;
  478. ERROR 23000: Duplicate entry 'a' for key 'c'
  479. insert into t1 values(null, "d");
  480. select * from t1;
  481. n c
  482. 100 a
  483. 300 b
  484. 301 c
  485. 302 d
  486. drop table t1;
  487. create table t1 (n int not null primary key auto_increment, c char(1), unique(c)) transactional=0 row_format=dynamic;
  488. insert into t1 values(100, "a");
  489. insert into t1 values(300, "b");
  490. insert into t1 values(50, "a");
  491. ERROR 23000: Duplicate entry 'a' for key 'c'
  492. insert into t1 values(null, "c");
  493. select * from t1;
  494. n c
  495. 100 a
  496. 300 b
  497. 301 c
  498. update t1 set n=400,c='a' where n=301;
  499. ERROR 23000: Duplicate entry 'a' for key 'c'
  500. insert into t1 values(null, "d");
  501. select * from t1;
  502. n c
  503. 100 a
  504. 300 b
  505. 301 c
  506. 302 d
  507. drop table t1;
  508. create table t1 (n int not null, c char(1)) engine=aria;
  509. alter table t1 engine=myisam;
  510. alter table t1 engine=aria;
  511. show create table t1;
  512. Table Create Table
  513. t1 CREATE TABLE `t1` (
  514. `n` int(11) NOT NULL,
  515. `c` char(1) DEFAULT NULL
  516. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
  517. drop table t1;
  518. create table t1 (n int not null, c char(1)) engine=aria transactional=1;
  519. alter table t1 engine=myisam;
  520. Warnings:
  521. Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
  522. alter table t1 engine=aria;
  523. show create table t1;
  524. Table Create Table
  525. t1 CREATE TABLE `t1` (
  526. `n` int(11) NOT NULL,
  527. `c` char(1) DEFAULT NULL
  528. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=1
  529. drop table t1;
  530. create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
  531. Warnings:
  532. Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
  533. alter table t1 engine=aria;
  534. show create table t1;
  535. Table Create Table
  536. t1 CREATE TABLE `t1` (
  537. `n` int(11) NOT NULL,
  538. `c` char(1) DEFAULT NULL
  539. ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=1
  540. drop table t1;
  541. create table t1 (a int, key(a)) transactional=0;
  542. insert into t1 values (0),(1),(2),(3),(4);
  543. insert into t1 select NULL from t1;
  544. check table t1;
  545. Table Op Msg_type Msg_text
  546. test.t1 check status OK
  547. drop table t1;
  548. create temporary table t1 (a int, key(a)) transactional=1;
  549. create temporary table t2 (a int, key(a)) transactional=1;
  550. insert into t1 values (0),(1),(2),(3),(4);
  551. insert into t2 select * from t1;
  552. insert into t1 select NULL from t2;
  553. select count(*) from t1;
  554. count(*)
  555. 10
  556. select count(*) from t1 where a >= 4;
  557. count(*)
  558. 1
  559. drop table t1, t2;
  560. create temporary table t1 (a int, key(a)) transactional=0 row_format=page;
  561. create temporary table t2 (a int, key(a)) transactional=0 row_format=page;
  562. insert into t1 values (0),(1),(2),(3),(4);
  563. insert into t2 select * from t1;
  564. insert into t1 select NULL from t2;
  565. select count(*) from t1;
  566. count(*)
  567. 10
  568. select count(*) from t1 where a >= 4;
  569. count(*)
  570. 1
  571. drop table t1, t2;
  572. create temporary table t1 (a int, key(a)) transactional=0 row_format=fixed;
  573. create temporary table t2 (a int, key(a)) transactional=0 row_format=dynamic;
  574. insert into t1 values (0),(1),(2),(3),(4);
  575. insert into t2 select * from t1;
  576. insert into t1 select NULL from t2;
  577. select count(*) from t1;
  578. count(*)
  579. 10
  580. select count(*) from t1 where a >= 4;
  581. count(*)
  582. 1
  583. drop table t1, t2;
  584. create table t1 (i int auto_increment not null primary key) transactional=0;
  585. check table t1 extended;
  586. Table Op Msg_type Msg_text
  587. test.t1 check status OK
  588. delete from t1 where i = 10;
  589. check table t1 extended;
  590. Table Op Msg_type Msg_text
  591. test.t1 check status OK
  592. drop table t1;
  593. create table t1 (i int auto_increment not null primary key);
  594. check table t1 extended;
  595. Table Op Msg_type Msg_text
  596. test.t1 check status OK
  597. delete from t1 where i = 10;
  598. check table t1 extended;
  599. Table Op Msg_type Msg_text
  600. test.t1 check status OK
  601. drop table t1;
  602. CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)) transactional=0;
  603. INSERT INTO t1 VALUES('Offside'),('City Of God');
  604. SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
  605. a
  606. City Of God
  607. SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE);
  608. a
  609. City Of God
  610. DROP TABLE t1;
  611. create table t1(a int) engine=aria transactional=1;
  612. select CREATE_OPTIONS from information_schema.TABLES where
  613. TABLE_SCHEMA='test' and TABLE_NAME='t1';
  614. CREATE_OPTIONS
  615. transactional=1
  616. drop table t1;
  617. create table t1 (a int, unique(a)) engine=aria transactional=1;
  618. insert into t1 values(1);
  619. insert into t1 values(2),(2);
  620. ERROR 23000: Duplicate entry '2' for key 'a'
  621. create table t2 (a int, unique(a)) engine=aria transactional=0 row_format=dynamic;
  622. insert into t2 values(1);
  623. insert into t2 values(2),(2);
  624. ERROR 23000: Duplicate entry '2' for key 'a'
  625. insert into t1 values(3);
  626. insert into t2 values(3);
  627. drop table t1, t2;
  628. CREATE TABLE t1 (
  629. a INT PRIMARY KEY,
  630. b CHAR(255),
  631. c VARCHAR(2048),
  632. d VARCHAR(18990),
  633. e CHAR(128),
  634. f CHAR(192)
  635. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  636. INSERT INTO t1 VALUES
  637. (1,'A','B','C','','D'),
  638. (2,'Abcdefghi','E','F','','G');
  639. CREATE TABLE t2 (
  640. g INT PRIMARY KEY,
  641. h CHAR(32),
  642. i CHAR(255),
  643. j TEXT
  644. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  645. INSERT INTO t2 VALUES (1,'M','','H'),
  646. (2,'N','','H');
  647. SELECT * FROM t1, t2 WHERE a = g ORDER BY b;
  648. a b c d e f g h i j
  649. 1 A B C D 1 M H
  650. 2 Abcdefghi E F G 2 N H
  651. drop table t1,t2;
  652. # End of 5.1 tests
  653. create table t1 (a int) engine=aria;
  654. lock table t1 write;
  655. drop table t1;