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
47578036
Commit
47578036
authored
Apr 14, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
3dbbb2fc
533e0551
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+1
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+1
-0
sql/sql_delete.cc
sql/sql_delete.cc
+3
-0
No files found.
mysql-test/r/innodb.result
View file @
47578036
...
...
@@ -878,6 +878,7 @@ truncate table t1;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
commit;
truncate table t1;
truncate table t1;
select * from t1;
a
insert into t1 values(1),(2);
...
...
mysql-test/t/innodb.test
View file @
47578036
...
...
@@ -574,6 +574,7 @@ insert into t1 values(1),(2);
truncate
table
t1
;
commit
;
truncate
table
t1
;
truncate
table
t1
;
select
*
from
t1
;
insert
into
t1
values
(
1
),(
2
);
delete
from
t1
;
...
...
sql/sql_delete.cc
View file @
47578036
...
...
@@ -649,11 +649,14 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
if
(
!
ha_supports_generate
(
table_type
))
{
/* Probably InnoDB table */
ulong
save_options
=
thd
->
options
;
table_list
->
lock_type
=
TL_WRITE
;
thd
->
options
&=
~
(
ulong
)
(
OPTION_BEGIN
|
OPTION_NOT_AUTOCOMMIT
);
ha_enable_transaction
(
thd
,
FALSE
);
error
=
mysql_delete
(
thd
,
table_list
,
(
COND
*
)
0
,
(
SQL_LIST
*
)
0
,
HA_POS_ERROR
,
0
);
ha_enable_transaction
(
thd
,
TRUE
);
thd
->
options
=
save_options
;
DBUG_RETURN
(
error
);
}
if
(
lock_and_wait_for_table_name
(
thd
,
table_list
))
...
...
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