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
474f45b3
Commit
474f45b3
authored
Apr 09, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discover of table non-existance on drop
parent
e06cb317
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
mysql-test/suite/archive/discover.result
mysql-test/suite/archive/discover.result
+11
-1
mysql-test/suite/archive/discover.test
mysql-test/suite/archive/discover.test
+11
-1
sql/handler.cc
sql/handler.cc
+6
-1
No files found.
mysql-test/suite/archive/discover.result
View file @
474f45b3
...
...
@@ -76,9 +76,19 @@ t1 CREATE TABLE `t1` (
# discover on drop
#
flush tables;
drop table t
0, t
1;
drop table t1;
show tables;
Tables_in_test
t0
#
# discover of table non-existance on drop
#
select * from t0;
a
flush tables;
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
drop table t0;
#
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
#
...
...
mysql-test/suite/archive/discover.test
View file @
474f45b3
...
...
@@ -62,9 +62,19 @@ show create table t1;
--
echo
#
remove_file
$mysqld_datadir
/
test
/
t1
.
frm
;
flush
tables
;
drop
table
t
0
,
t
1
;
drop
table
t1
;
show
tables
;
--
echo
#
--
echo
# discover of table non-existance on drop
--
echo
#
select
*
from
t0
;
remove_file
$mysqld_datadir
/
test
/
t0
.
ARZ
;
flush
tables
;
--
error
ER_NO_SUCH_TABLE
select
*
from
t1
;
drop
table
t0
;
--
echo
#
--
echo
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
--
echo
#
...
...
sql/handler.cc
View file @
474f45b3
...
...
@@ -3448,9 +3448,14 @@ int handler::delete_table(const char *name)
{
int
saved_error
=
0
;
int
error
=
0
;
int
enoent_or_zero
=
ENOENT
;
// Error if no file was deleted
int
enoent_or_zero
;
char
buff
[
FN_REFLEN
];
if
(
ht
->
discover_table
)
enoent_or_zero
=
0
;
// the table may not exist in the engine, it's ok
else
enoent_or_zero
=
ENOENT
;
// the first file of bas_ext() *must* exist
for
(
const
char
**
ext
=
bas_ext
();
*
ext
;
ext
++
)
{
fn_format
(
buff
,
name
,
""
,
*
ext
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
...
...
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