mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
5534d81430
including the test case: https://github.com/mysql/mysql-server/commit/520aedfe INNODB: "DATA DIRECTORY" OPTION OF CREATE TABLE FAILS WITH PWRITE() OS ERROR 22 Fix for version mysql-5.6 PROBLEM ======== For version mysql-5.6.27 onwards InnoDB fails to create a table with explicit 'data directory' option when Innodb_flush_method is set to O_DIRECT.While creating link file we get a a pwrite error 22 due to the alignment restrictions imposed by O_DIRECT flag which is being set for the link file created. FIX === Fixed the above issue by making use of file IO functions while creating the link file that wouldn't let the O_DIRECT flag restrictions arise. Reviewed-by: Kevin Lewis <kevin.lewis@oracle.com> Reviewed-by: Shaohua Wang <shaohua.wang@oracle.com> RB: 11387
28 lines
No EOL
1,011 B
Text
28 lines
No EOL
1,011 B
Text
--source include/not_embedded.inc
|
|
--source include/have_innodb.inc
|
|
--source include/not_windows.inc
|
|
|
|
--disable_query_log
|
|
CALL mtr.add_suppression("\\[Warning\\] InnoDB: Failed to set O_DIRECT on file ./ibdata1: OPEN: Invalid argument, continuing anyway. O_DIRECT is known to result in 'Invalid argument' on Linux on tmpfs, see MySQL Bug#26662.");
|
|
|
|
# The below mtr suppression to avoid failure in solaris platform.
|
|
CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to set DIRECTIO_ON on file.*");
|
|
--enable_query_log
|
|
|
|
SHOW VARIABLES LIKE 'innodb_flush_method';
|
|
|
|
let MYSQLD_DATADIR=`SELECT @@datadir`;
|
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
# Create a table with explicit data directory option.
|
|
EVAL CREATE TABLE t1 (x INT) ENGINE=INNODB, DATA DIRECTORY='$MYSQL_TMP_DIR';
|
|
|
|
--echo # Contents of tmp/test directory containing .ibd file
|
|
--list_files $MYSQL_TMP_DIR/test
|
|
|
|
--echo # Contents of the 'test' database directory containing .isl and .frm files
|
|
--list_files $MYSQLD_DATADIR/test
|
|
|
|
DROP TABLE t1;
|
|
|