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
bea9f826
Commit
bea9f826
authored
Jan 21, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
5.2 merge
parents
3aa370bb
aa2f88ba
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
4 deletions
+46
-4
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-1
mysql-test/r/repair_symlink-5543.result
mysql-test/r/repair_symlink-5543.result
+14
-0
mysql-test/t/repair_symlink-5543.test
mysql-test/t/repair_symlink-5543.test
+26
-0
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+2
-1
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+2
-1
storage/pbxt/src/myxt_xt.cc
storage/pbxt/src/myxt_xt.cc
+1
-1
No files found.
mysql-test/mysql-test-run.pl
View file @
bea9f826
...
...
@@ -482,7 +482,7 @@ sub main {
}
}
if
(
not
defined
@$completed
)
{
if
(
not
@$completed
)
{
mtr_error
("
Test suite aborted
");
}
...
...
mysql-test/r/repair_symlink-5543.result
0 → 100644
View file @
bea9f826
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
insert t1 values (1);
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair error Can't create new tempfile: 'MYSQL_TMP_DIR/t1.TMD'
test.t1 repair status Operation failed
drop table t1;
create table t2 (a int) engine=aria data directory='MYSQL_TMP_DIR';
insert t2 values (1);
repair table t2;
Table Op Msg_type Msg_text
test.t2 repair error Can't create new tempfile: 'MYSQL_TMP_DIR/t2.TMD'
test.t2 repair status Operation failed
drop table t2;
mysql-test/t/repair_symlink-5543.test
0 → 100644
View file @
bea9f826
#
# MDEV-5543 MyISAM repair unsafe usage of TMD files
#
--
source
include
/
have_symlink
.
inc
--
source
include
/
not_windows
.
inc
--
source
include
/
have_maria
.
inc
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
eval
create
table
t1
(
a
int
)
engine
=
myisam
data
directory
=
'$MYSQL_TMP_DIR'
;
insert
t1
values
(
1
);
--
system
ln
-
s
$MYSQL_TMP_DIR
/
foobar5543
$MYSQL_TMP_DIR
/
t1
.
TMD
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
repair
table
t1
;
drop
table
t1
;
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
eval
create
table
t2
(
a
int
)
engine
=
aria
data
directory
=
'$MYSQL_TMP_DIR'
;
insert
t2
values
(
1
);
--
system
ln
-
s
$MYSQL_TMP_DIR
/
foobar5543
$MYSQL_TMP_DIR
/
t2
.
TMD
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
repair
table
t2
;
drop
table
t2
;
--
list_files
$MYSQL_TMP_DIR
foobar5543
--
system
rm
$MYSQL_TMP_DIR
/
t1
.
TMD
$MYSQL_TMP_DIR
/
t2
.
TMD
storage/maria/ha_maria.cc
View file @
bea9f826
/* Copyright (C) 2004-2008 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
Copyright (C) 2008-2009 Sun Microsystems, Inc.
Copyright (c) 2009, 2014, SkySQL Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -1610,7 +1611,7 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize)
param
->
db_name
=
table
->
s
->
db
.
str
;
param
->
table_name
=
table
->
alias
.
c_ptr
();
param
->
tmpfile_createflag
=
O_RDWR
|
O_TRUNC
;
param
->
tmpfile_createflag
=
O_RDWR
|
O_TRUNC
|
O_EXCL
;
param
->
using_global_keycache
=
1
;
param
->
thd
=
thd
;
param
->
tmpdir
=
&
mysql_tmpdir_list
;
...
...
storage/myisam/ha_myisam.cc
View file @
bea9f826
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates
Copyright (c) 2009, 2014, SkySQL Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -1187,7 +1188,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize)
param
.
db_name
=
table
->
s
->
db
.
str
;
param
.
table_name
=
table
->
alias
.
c_ptr
();
param
.
tmpfile_createflag
=
O_RDWR
|
O_TRUNC
;
param
.
tmpfile_createflag
=
O_RDWR
|
O_TRUNC
|
O_EXCL
;
param
.
using_global_keycache
=
1
;
param
.
thd
=
thd
;
param
.
tmpdir
=
&
mysql_tmpdir_list
;
...
...
storage/pbxt/src/myxt_xt.cc
View file @
bea9f826
...
...
@@ -937,7 +937,7 @@ xtPublic xtBool myxt_create_row_from_key(XTOpenTablePtr XT_UNUSED(ot), XTIndexPt
*/
byte
*
key_ptr
=
key
;
// Cannot take the address of a register variable!
memcpy
(
record
+
keyseg
->
start
+
keyseg
->
bit_start
,
(
char
*
)
&
key_ptr
,
sizeof
(
char
*
));
&
key_ptr
,
sizeof
(
char
*
));
my_store_blob_length
(
record
+
keyseg
->
start
,
(
uint
)
keyseg
->
bit_start
,
length
);
...
...
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