Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
fc2243d6
Commit
fc2243d6
authored
Sep 03, 2009
by
Satya B
Browse files
Options
Browse Files
Download
Plain Diff
merge mysql-5.0-bugteam to mysql-5.1-bugteam
parents
80d872bd
4a9e7e8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
include/my_sys.h
include/my_sys.h
+1
-0
mysys/my_copy.c
mysys/my_copy.c
+7
-0
sql/sql_table.cc
sql/sql_table.cc
+6
-1
No files found.
include/my_sys.h
View file @
fc2243d6
...
@@ -67,6 +67,7 @@ extern int NEAR my_errno; /* Last error in mysys */
...
@@ -67,6 +67,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_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_DONT_OVERWRITE_FILE 1024
/* my_copy: Don't overwrite file */
#define MY_THREADSAFE 2048
/* my_seek(): lock fd mutex */
#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_CHECK_ERROR 1
/* Params to my_end; Check open-close */
#define MY_GIVE_INFO 2
/* Give time info about process*/
#define MY_GIVE_INFO 2
/* Give time info about process*/
...
...
mysys/my_copy.c
View file @
fc2243d6
...
@@ -88,6 +88,13 @@ int my_copy(const char *from, const char *to, myf MyFlags)
...
@@ -88,6 +88,13 @@ int my_copy(const char *from, const char *to, myf MyFlags)
goto
err
;
goto
err
;
}
}
/* sync the destination file */
if
(
MyFlags
&
MY_SYNC
)
{
if
(
my_sync
(
to_file
,
MyFlags
))
goto
err
;
}
if
(
my_close
(
from_file
,
MyFlags
)
|
my_close
(
to_file
,
MyFlags
))
if
(
my_close
(
from_file
,
MyFlags
)
|
my_close
(
to_file
,
MyFlags
))
DBUG_RETURN
(
-
1
);
/* Error on close */
DBUG_RETURN
(
-
1
);
/* Error on close */
...
...
sql/sql_table.cc
View file @
fc2243d6
...
@@ -5217,6 +5217,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
...
@@ -5217,6 +5217,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
char
tmp_path
[
FN_REFLEN
];
char
tmp_path
[
FN_REFLEN
];
#endif
#endif
char
ts_name
[
FN_LEN
+
1
];
char
ts_name
[
FN_LEN
+
1
];
myf
flags
=
MY_DONT_OVERWRITE_FILE
;
DBUG_ENTER
(
"mysql_create_like_table"
);
DBUG_ENTER
(
"mysql_create_like_table"
);
...
@@ -5273,8 +5274,12 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
...
@@ -5273,8 +5274,12 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
DBUG_EXECUTE_IF
(
"sleep_create_like_before_copy"
,
my_sleep
(
6000000
););
DBUG_EXECUTE_IF
(
"sleep_create_like_before_copy"
,
my_sleep
(
6000000
););
if
(
opt_sync_frm
&&
!
(
create_info
->
options
&
HA_LEX_CREATE_TMP_TABLE
))
flags
|=
MY_SYNC
;
/*
/*
Create a new table by copying from source table
Create a new table by copying from source table
and sync the new table if the flag MY_SYNC is set
Altough exclusive name-lock on target table protects us from concurrent
Altough exclusive name-lock on target table protects us from concurrent
DML and DDL operations on it we still want to wrap .FRM creation and call
DML and DDL operations on it we still want to wrap .FRM creation and call
...
@@ -5295,7 +5300,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
...
@@ -5295,7 +5300,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
goto
err
;
goto
err
;
}
}
}
}
else
if
(
my_copy
(
src_path
,
dst_path
,
MYF
(
MY_DONT_OVERWRITE_FILE
)
))
else
if
(
my_copy
(
src_path
,
dst_path
,
flags
))
{
{
if
(
my_errno
==
ENOENT
)
if
(
my_errno
==
ENOENT
)
my_error
(
ER_BAD_DB_ERROR
,
MYF
(
0
),
db
);
my_error
(
ER_BAD_DB_ERROR
,
MYF
(
0
),
db
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment