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
9c49005f
Commit
9c49005f
authored
Aug 05, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in truncating nonexisting table, found by Carsten
parent
97e34fe2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
mysql-test/r/truncate.result
mysql-test/r/truncate.result
+2
-0
mysql-test/t/truncate.test
mysql-test/t/truncate.test
+2
-0
sql/sql_delete.cc
sql/sql_delete.cc
+2
-1
No files found.
mysql-test/r/truncate.result
View file @
9c49005f
...
@@ -20,3 +20,5 @@ truncate table t1;
...
@@ -20,3 +20,5 @@ truncate table t1;
select * from t1;
select * from t1;
n
n
drop table t1;
drop table t1;
truncate non_existing_table;
Table 'test.non_existing_table' doesn't exist
mysql-test/t/truncate.test
View file @
9c49005f
...
@@ -18,3 +18,5 @@ insert into t1 values (1),(2),(3);
...
@@ -18,3 +18,5 @@ insert into t1 values (1),(2),(3);
truncate
table
t1
;
truncate
table
t1
;
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
--
error
1146
truncate
non_existing_table
;
sql/sql_delete.cc
View file @
9c49005f
...
@@ -546,7 +546,8 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
...
@@ -546,7 +546,8 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
db_type
table_type
;
db_type
table_type
;
if
((
table_type
=
get_table_type
(
path
))
==
DB_TYPE_UNKNOWN
)
if
((
table_type
=
get_table_type
(
path
))
==
DB_TYPE_UNKNOWN
)
{
{
my_error
(
ER_NO_SUCH_TABLE
,
MYF
(
0
),
table_list
->
real_name
);
my_error
(
ER_NO_SUCH_TABLE
,
MYF
(
0
),
table_list
->
db
,
table_list
->
real_name
);
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
}
}
if
(
!
ha_supports_generate
(
table_type
))
if
(
!
ha_supports_generate
(
table_type
))
...
...
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