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
ed89b81b
Commit
ed89b81b
authored
Mar 14, 2008
by
istruewing@stella.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fix. Moved the symlink handling from sql_parse.cc here.
parent
eabe082d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
mysql-test/r/symlink.result
mysql-test/r/symlink.result
+2
-2
mysql-test/t/symlink.test
mysql-test/t/symlink.test
+5
-2
sql/sql_table.cc
sql/sql_table.cc
+19
-1
No files found.
mysql-test/r/symlink.result
View file @
ed89b81b
...
...
@@ -146,10 +146,10 @@ DATA DIRECTORY='TEST_DIR/master-data/test';
ERROR HY000: Incorrect arguments to DATA DIRECORY
CREATE TABLE t1(a INT)
DATA DIRECTORY='TEST_DIR/master-data/';
DROP TABLE t1;
ERROR HY000: Incorrect arguments to DATA DIRECORY
CREATE TABLE t1(a INT)
INDEX DIRECTORY='TEST_DIR/master-data';
DROP TABLE t1;
ERROR HY000: Incorrect arguments to INDEX DIRECORY
CREATE TABLE t1(a INT)
INDEX DIRECTORY='TEST_DIR/master-data_var';
ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2)
...
...
mysql-test/t/symlink.test
View file @
ed89b81b
...
...
@@ -126,6 +126,9 @@ drop table t1;
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
t1
.
MYI
EOF
--
replace_result
$MYSQLTEST_VARDIR
TEST_DIR
# If $MYSQLTEST_VARDIR is a symbolic link, the low level MyISAm error
# message contains the real path of $MYSQLTEST_VARDIR. Try to catch this.
--
replace_regex
/
write
to
file
'\/.*\/tmp/write to file '
TEST_DIR
\
/
tmp
/
--
error
1
eval
CREATE
TABLE
t1
(
a
INT
)
DATA
DIRECTORY
=
'$MYSQLTEST_VARDIR/tmp'
...
...
@@ -209,13 +212,13 @@ INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql';
eval
CREATE
TABLE
t1
(
a
INT
)
DATA
DIRECTORY
=
'$MYSQLTEST_VARDIR/master-data/test'
;
--
replace_result
$MYSQLTEST_VARDIR
TEST_DIR
--
error
1210
eval
CREATE
TABLE
t1
(
a
INT
)
DATA
DIRECTORY
=
'$MYSQLTEST_VARDIR/master-data/'
;
DROP
TABLE
t1
;
--
replace_result
$MYSQLTEST_VARDIR
TEST_DIR
--
error
1210
eval
CREATE
TABLE
t1
(
a
INT
)
INDEX
DIRECTORY
=
'$MYSQLTEST_VARDIR/master-data'
;
DROP
TABLE
t1
;
--
replace_result
$MYSQLTEST_VARDIR
TEST_DIR
--
error
1
eval
CREATE
TABLE
t1
(
a
INT
)
...
...
sql/sql_table.cc
View file @
ed89b81b
...
...
@@ -3517,8 +3517,26 @@ bool mysql_create_table_no_lock(THD *thd,
create_info
->
table_existed
=
0
;
// Mark that table is created
#ifdef HAVE_READLINK
if
(
test_if_data_home_dir
(
create_info
->
data_file_name
))
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
"DATA DIRECTORY"
);
goto
unlock_and_end
;
}
if
(
test_if_data_home_dir
(
create_info
->
index_file_name
))
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
"INDEX DIRECTORY"
);
goto
unlock_and_end
;
}
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
check_partition_dirs
(
thd
->
lex
->
part_info
))
{
goto
unlock_and_end
;
}
#endif
/* WITH_PARTITION_STORAGE_ENGINE */
if
(
!
my_use_symdir
||
(
thd
->
variables
.
sql_mode
&
MODE_NO_DIR_IN_CREATE
))
#endif
#endif
/* HAVE_READLINK */
{
if
(
create_info
->
data_file_name
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
...
...
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