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
85ff7bec
Commit
85ff7bec
authored
Apr 06, 2006
by
svoj@april.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into april.(none):/home/svoj/devel/mysql/BUG14945/mysql-5.0
parents
cd15f309
209682e0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
3 deletions
+28
-3
mysql-test/r/sp.result
mysql-test/r/sp.result
+11
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+15
-0
sql/sql_delete.cc
sql/sql_delete.cc
+1
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/sp.result
View file @
85ff7bec
...
...
@@ -4811,6 +4811,17 @@ begin
declare x int;
select id from t1 order by x;
end|
drop procedure if exists bug14945|
create table t3 (id int not null auto_increment primary key)|
create procedure bug14945() deterministic truncate t3|
insert into t3 values (null)|
call bug14945()|
insert into t3 values (null)|
select * from t3|
id
1
drop table t3|
drop procedure bug14945|
create procedure bug16474_2(x int)
select id from t1 order by x|
call bug16474_1()|
...
...
mysql-test/t/sp.test
View file @
85ff7bec
...
...
@@ -5666,6 +5666,21 @@ begin
select
id
from
t1
order
by
x
;
end
|
#
# BUG#14945: Truncate table doesn't reset the auto_increment counter
#
--
disable_warnings
drop
procedure
if
exists
bug14945
|
--
enable_warnings
create
table
t3
(
id
int
not
null
auto_increment
primary
key
)
|
create
procedure
bug14945
()
deterministic
truncate
t3
|
insert
into
t3
values
(
null
)
|
call
bug14945
()
|
insert
into
t3
values
(
null
)
|
select
*
from
t3
|
drop
table
t3
|
drop
procedure
bug14945
|
# This does NOT order by column index; variable is an expression.
create
procedure
bug16474_2
(
x
int
)
select
id
from
t1
order
by
x
|
...
...
sql/sql_delete.cc
View file @
85ff7bec
...
...
@@ -842,8 +842,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
table_list
->
db
,
table_list
->
table_name
);
DBUG_RETURN
(
TRUE
);
}
if
(
!
ha_check_storage_engine_flag
(
table_type
,
HTON_CAN_RECREATE
)
||
thd
->
lex
->
sphead
)
if
(
!
ha_check_storage_engine_flag
(
table_type
,
HTON_CAN_RECREATE
))
goto
trunc_by_del
;
if
(
lock_and_wait_for_table_name
(
thd
,
table_list
))
DBUG_RETURN
(
TRUE
);
...
...
sql/sql_parse.cc
View file @
85ff7bec
...
...
@@ -3350,7 +3350,7 @@ mysql_execute_command(THD *thd)
Don't allow this within a transaction because we want to use
re-generate table
*/
if
(
(
thd
->
locked_tables
&&
!
lex
->
sphead
)
||
thd
->
active_transaction
())
if
(
thd
->
locked_tables
||
thd
->
active_transaction
())
{
my_message
(
ER_LOCK_OR_ACTIVE_TRANSACTION
,
ER
(
ER_LOCK_OR_ACTIVE_TRANSACTION
),
MYF
(
0
));
...
...
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