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.

77 lines
2.4 KiB

12 years ago
  1. if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`)
  2. {
  3. --skip Not fixed in InnoDB before 5.6.17
  4. }
  5. --echo #
  6. --echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
  7. --echo # OPERATION IF IT IS DONE IN-PLACE
  8. --echo #
  9. --source include/have_innodb.inc
  10. # innodb_change_buffering_debug option is debug only
  11. --source include/have_debug.inc
  12. # Embedded server does not support crashing
  13. --source include/not_embedded.inc
  14. # DBUG_SUICIDE() hangs under valgrind
  15. --source include/not_valgrind.inc
  16. # No windows, need perl
  17. --source include/not_windows.inc
  18. # The flag innodb_change_buffering_debug is only available in debug builds.
  19. # It instructs InnoDB to try to evict pages from the buffer pool when
  20. # change buffering is possible, so that the change buffer will be used
  21. # whenever possible.
  22. SET GLOBAL innodb_change_buffering_debug = 1;
  23. let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err;
  24. CREATE TABLE t1(
  25. a INT AUTO_INCREMENT PRIMARY KEY,
  26. b CHAR(1),
  27. c INT,
  28. INDEX(b))
  29. ENGINE=InnoDB;
  30. # Create enough rows for the table, so that the change buffer will be
  31. # used for modifying the secondary index page. There must be multiple
  32. # index pages, because changes to the root page are never buffered.
  33. INSERT INTO t1 VALUES(0,'x',1);
  34. INSERT INTO t1 SELECT 0,b,c FROM t1;
  35. INSERT INTO t1 SELECT 0,b,c FROM t1;
  36. INSERT INTO t1 SELECT 0,b,c FROM t1;
  37. INSERT INTO t1 SELECT 0,b,c FROM t1;
  38. INSERT INTO t1 SELECT 0,b,c FROM t1;
  39. INSERT INTO t1 SELECT 0,b,c FROM t1;
  40. INSERT INTO t1 SELECT 0,b,c FROM t1;
  41. INSERT INTO t1 SELECT 0,b,c FROM t1;
  42. INSERT INTO t1 SELECT 0,b,c FROM t1;
  43. INSERT INTO t1 SELECT 0,b,c FROM t1;
  44. INSERT INTO t1 SELECT 0,b,c FROM t1;
  45. BEGIN;
  46. SELECT b FROM t1 LIMIT 3;
  47. connect (con1,localhost,root,,);
  48. connection con1;
  49. BEGIN;
  50. DELETE FROM t1 WHERE a=1;
  51. # This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
  52. INSERT INTO t1 VALUES(1,'X',1);
  53. SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
  54. --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
  55. --error 2013
  56. # This should force a change buffer merge
  57. SELECT b FROM t1 LIMIT 3;
  58. let SEARCH_PATTERN=Wrote log record for ibuf update in place operation;
  59. --source include/search_pattern_in_file.inc
  60. # Write file to make mysql-test-run.pl start up the server again
  61. --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
  62. --enable_reconnect
  63. --source include/wait_until_connected_again.inc
  64. CHECK TABLE t1;
  65. # Cleanup
  66. DROP TABLE t1;