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
447bebfd
Commit
447bebfd
authored
May 13, 2003
by
jani@hynda.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in DROP DATABASE when database had a RAID type table.
Bug ID 381.
parent
c9c58417
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
8 deletions
+27
-8
mysql-test/r/raid.result
mysql-test/r/raid.result
+3
-0
mysql-test/t/raid.test
mysql-test/t/raid.test
+3
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-4
sql/set_var.cc
sql/set_var.cc
+1
-1
sql/sql_db.cc
sql/sql_db.cc
+18
-3
No files found.
mysql-test/r/raid.result
View file @
447bebfd
create database test_raid;
create table test_raid.r1 (i int) raid_type=1;
drop database test_raid;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (
id int unsigned not null auto_increment primary key,
...
...
mysql-test/t/raid.test
View file @
447bebfd
...
...
@@ -5,6 +5,9 @@ show variables like "have_raid";
# Test of raided tables
#
create
database
test_raid
;
create
table
test_raid
.
r1
(
i
int
)
raid_type
=
1
;
drop
database
test_raid
;
DROP
TABLE
IF
EXISTS
t1
,
t2
;
CREATE
TABLE
t1
(
id
int
unsigned
not
null
auto_increment
primary
key
,
...
...
sql/mysqld.cc
View file @
447bebfd
...
...
@@ -4722,11 +4722,9 @@ static void get_options(int argc,char **argv)
my_disable_locking
=
myisam_single_user
=
test
(
opt_external_locking
==
0
);
my_default_record_cache_size
=
global_system_variables
.
read_buff_size
;
myisam_max_temp_length
=
(
my_off_t
)
min
(
global_system_variables
.
myisam_max_sort_file_size
,
(
ulonglong
)
MAX_FILE_SIZE
);
(
my_off_t
)
global_system_variables
.
myisam_max_sort_file_size
;
myisam_max_extra_temp_length
=
(
my_off_t
)
min
(
global_system_variables
.
myisam_max_extra_sort_file_size
,
(
ulonglong
)
MAX_FILE_SIZE
);
(
my_off_t
)
global_system_variables
.
myisam_max_extra_sort_file_size
;
/* Set global variables based on startup options */
myisam_block_size
=
(
uint
)
1
<<
my_bit_log2
(
opt_myisam_block_size
);
...
...
sql/set_var.cc
View file @
447bebfd
...
...
@@ -592,7 +592,7 @@ static void
fix_myisam_max_extra_sort_file_size
(
THD
*
thd
,
enum_var_type
type
)
{
myisam_max_extra_temp_length
=
(
my_off_t
)
global_system_variables
.
myisam_max_sort_file_size
;
(
my_off_t
)
global_system_variables
.
myisam_max_
extra_
sort_file_size
;
}
...
...
sql/sql_db.cc
View file @
447bebfd
...
...
@@ -211,6 +211,8 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
ulong
found_other_files
=
0
;
char
filePath
[
FN_REFLEN
];
TABLE_LIST
*
tot_list
=
0
,
**
tot_list_next
;
List
<
String
>
raid_dirs
;
DBUG_ENTER
(
"mysql_rm_known_files"
);
DBUG_PRINT
(
"enter"
,(
"path: %s"
,
org_path
));
...
...
@@ -229,6 +231,8 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
{
char
newpath
[
FN_REFLEN
];
MY_DIR
*
new_dirp
;
String
*
dir
;
strxmov
(
newpath
,
org_path
,
"/"
,
file
->
name
,
NullS
);
unpack_filename
(
newpath
,
newpath
);
if
((
new_dirp
=
my_dir
(
newpath
,
MYF
(
MY_DONT_SORT
))))
...
...
@@ -239,7 +243,11 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
my_dirend
(
dirp
);
DBUG_RETURN
(
-
1
);
}
raid_dirs
.
push_back
(
dir
=
new
String
(
newpath
));
dir
->
copy
();
continue
;
}
found_other_files
++
;
continue
;
}
if
(
find_type
(
fn_ext
(
file
->
name
),
&
deletable_extentions
,
1
+
2
)
<=
0
)
...
...
@@ -278,11 +286,18 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
deleted
++
;
}
}
my_dirend
(
dirp
);
if
(
thd
->
killed
||
(
tot_list
&&
mysql_rm_table_part2_with_lock
(
thd
,
tot_list
,
1
,
1
)))
{
my_dirend
(
dirp
);
DBUG_RETURN
(
-
1
);
}
List_iterator
<
String
>
it
(
raid_dirs
);
String
*
dir
;
while
((
dir
=
it
++
))
if
(
rmdir
(
dir
->
c_ptr
())
<
0
)
found_other_files
++
;
my_dirend
(
dirp
);
/*
If the directory is a symbolic link, remove the link first, then
...
...
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