diff options
author | Satya B <satya.bn@sun.com> | 2009-09-03 16:02:03 +0530 |
---|---|---|
committer | Satya B <satya.bn@sun.com> | 2009-09-03 16:02:03 +0530 |
commit | 2fc9c5d19993f4af526b97153ee7363ac108831b (patch) | |
tree | bc7f9709d4619c3b3db77c9ad3c177844a34ce4b /include | |
parent | 183607b8c864684a67fea2c11fa2755abd11f6ab (diff) | |
download | mariadb-git-2fc9c5d19993f4af526b97153ee7363ac108831b.tar.gz |
Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled for
CREATE TABLE...LIKE...
The mysql server option 'sync_frm' is ignored when table is created with
syntax CREATE TABLE .. LIKE..
Fixed by adding the MY_SYNC flag and calling my_sync() from my_copy() when
the flag is set.
In mysql_create_table(), when the 'sync_frm' is set, MY_SYNC flag is passed
to my_copy().
Note: TestCase is not attached and can be tested manually using debugger.
client/Makefile.am:
BUG#46591 - .frm file isn't sync'd with sync_frm enabled for
CREATE TABLE...LIKE...
add my_sync to sources as it is used in my_copy() method
include/my_sys.h:
BUG#46591 - .frm file isn't sync'd with sync_frm enabled for
CREATE TABLE...LIKE...
MY_SYNC flag is added to call my_sync() method
mysys/my_copy.c:
BUG#46591 - .frm file isn't sync'd with sync_frm enabled for
CREATE TABLE...LIKE...
my_sync() is method is called when MY_SYNC is set in my_copy()
sql/sql_table.cc:
BUG#46591 - .frm file isn't sync'd with sync_frm enabled for
CREATE TABLE...LIKE...
Fixed mysql_create_like_table() to call my_sync() when opt_sync_frm variable
is set
Diffstat (limited to 'include')
-rw-r--r-- | include/my_sys.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 4254ec3dbcb..4ec4846f528 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -68,6 +68,7 @@ extern int NEAR my_errno; /* Last error in mysys */ #define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */ #define MY_DONT_OVERWRITE_FILE 1024 /* my_copy: Don't overwrite file */ #define MY_THREADSAFE 2048 /* my_seek(): lock fd mutex */ +#define MY_SYNC 4096 /* my_copy(): sync dst file */ #define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */ #define MY_GIVE_INFO 2 /* Give time info about process*/ |