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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0eec7df9
Commit
0eec7df9
authored
Nov 12, 2007
by
istruewing@stella.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge stella.local:/home2/mydev/mysql-5.1-ateam
into stella.local:/home2/mydev/mysql-5.1-axmrg
parents
90d9ac11
162d70cb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
3 deletions
+32
-3
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+1
-0
mysql-test/r/partition_hash.result
mysql-test/r/partition_hash.result
+0
-1
mysql-test/r/symlink.result
mysql-test/r/symlink.result
+6
-0
mysql-test/t/partition_hash.test
mysql-test/t/partition_hash.test
+3
-1
mysql-test/t/symlink.test
mysql-test/t/symlink.test
+12
-0
mysys/my_symlink2.c
mysys/my_symlink2.c
+10
-1
No files found.
libmysqld/lib_sql.cc
View file @
0eec7df9
...
...
@@ -93,6 +93,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
thd
->
current_stmt
=
stmt
;
thd
->
store_globals
();
// Fix if more than one connect
lex_start
(
thd
);
/*
We have to call free_old_query before we start to fill mysql->fields
for new query. In the case of embedded server we collect field data
...
...
mysql-test/r/partition_hash.result
View file @
0eec7df9
...
...
@@ -185,5 +185,4 @@ c1 c2 c3
drop table t1;
CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1;
INSERT DELAYED INTO t1 VALUES (1);
ERROR HY000: Table storage engine for 't1' doesn't have this option
DROP TABLE t1;
mysql-test/r/symlink.result
View file @
0eec7df9
...
...
@@ -99,6 +99,12 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1(a INT)
DATA DIRECTORY='TEST_DIR/var/master-data/mysql'
INDEX DIRECTORY='TEST_DIR/var/master-data/mysql';
RENAME TABLE t1 TO user;
ERROR HY000: Can't create/write to file 'TEST_DIR/var/master-data/mysql/user.MYI' (Errcode: 17)
DROP TABLE t1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
mysql-test/t/partition_hash.test
View file @
0eec7df9
...
...
@@ -148,7 +148,9 @@ drop table t1;
# Bug#31210 - INSERT DELAYED crashes server when used on partitioned table
#
CREATE
TABLE
t1
(
c1
INT
)
ENGINE
=
MyISAM
PARTITION
BY
HASH
(
c1
)
PARTITIONS
1
;
--
error
ER_ILLEGAL_HA
# The test succeeds in an embedded server because normal insert is done.
# The test fails in a normal server with "engine doesn't have this option".
--
error
0
,
ER_ILLEGAL_HA
INSERT
DELAYED
INTO
t1
VALUES
(
1
);
DROP
TABLE
t1
;
mysql-test/t/symlink.test
View file @
0eec7df9
...
...
@@ -120,6 +120,18 @@ enable_query_log;
show
create
table
t1
;
drop
table
t1
;
#
# BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE
#
--
replace_result
$MYSQL_TEST_DIR
TEST_DIR
eval
CREATE
TABLE
t1
(
a
INT
)
DATA
DIRECTORY
=
'$MYSQL_TEST_DIR/var/master-data/mysql'
INDEX
DIRECTORY
=
'$MYSQL_TEST_DIR/var/master-data/mysql'
;
--
replace_result
$MYSQL_TEST_DIR
TEST_DIR
--
error
1
RENAME
TABLE
t1
TO
user
;
DROP
TABLE
t1
;
#
# Test specifying DATA DIRECTORY that is the same as what would normally
# have been chosen. (Bug #8707)
...
...
mysys/my_symlink2.c
View file @
0eec7df9
...
...
@@ -130,6 +130,7 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
int
was_symlink
=
(
!
my_disable_symlinks
&&
!
my_readlink
(
link_name
,
from
,
MYF
(
0
)));
int
result
=
0
;
int
name_is_different
;
DBUG_ENTER
(
"my_rename_with_symlink"
);
if
(
!
was_symlink
)
...
...
@@ -138,6 +139,14 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
/* Change filename that symlink pointed to */
strmov
(
tmp_name
,
to
);
fn_same
(
tmp_name
,
link_name
,
1
);
/* Copy dir */
name_is_different
=
strcmp
(
link_name
,
tmp_name
);
if
(
name_is_different
&&
!
access
(
tmp_name
,
F_OK
))
{
my_errno
=
EEXIST
;
if
(
MyFlags
&
MY_WME
)
my_error
(
EE_CANTCREATEFILE
,
MYF
(
0
),
tmp_name
,
EEXIST
);
DBUG_RETURN
(
1
);
}
/* Create new symlink */
if
(
my_symlink
(
tmp_name
,
to
,
MyFlags
))
...
...
@@ -149,7 +158,7 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
the same basename and different directories.
*/
if
(
strcmp
(
link_name
,
tmp_name
)
&&
my_rename
(
link_name
,
tmp_name
,
MyFlags
))
if
(
name_is_different
&&
my_rename
(
link_name
,
tmp_name
,
MyFlags
))
{
int
save_errno
=
my_errno
;
my_delete
(
to
,
MyFlags
);
/* Remove created symlink */
...
...
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