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
12c6eb3b
Commit
12c6eb3b
authored
Mar 08, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
post merge fixes
sql/sql_parse.cc: Auto merged
parents
50985b67
39c32324
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
2 deletions
+56
-2
.bzrignore
.bzrignore
+1
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+24
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+28
-0
sql/sql_delete.cc
sql/sql_delete.cc
+2
-1
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
.bzrignore
View file @
12c6eb3b
...
...
@@ -1105,3 +1105,4 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
acinclude.m4
mysql-test/r/sp.result
View file @
12c6eb3b
...
...
@@ -2697,6 +2697,30 @@ call bug7992()|
call bug7992()|
drop procedure bug7992|
drop table t3|
drop table t2;
drop table t1;
drop procedure if exists sp1;
create table t1 (a int) engine=innodb|
create procedure sp1 ()
begin
truncate table t1; insert t1 values (1); rollback;
end
|
set autocommit=0;
insert t1 values (2);
call sp1();
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
commit;
set autocommit=1;
select * from t1;
a
2
call sp1();
select * from t1;
a
1
drop table t1;
drop procedure sp1;
create table t3 (
lpitnumber int(11) default null,
lrecordtype int(11) default null
...
...
mysql-test/t/sp.test
View file @
12c6eb3b
...
...
@@ -3276,7 +3276,35 @@ call bug7992()|
call
bug7992
()
|
drop
procedure
bug7992
|
drop
table
t3
|
delimiter
;
|
drop
table
t2
;
drop
table
t1
;
#
# BUG#8850
#
--
disable_warnings
drop
procedure
if
exists
sp1
;
--
enable_warnings
delimiter
|
;
create
table
t1
(
a
int
)
engine
=
innodb
|
create
procedure
sp1
()
begin
truncate
table
t1
;
insert
t1
values
(
1
);
rollback
;
end
|
delimiter
;
|
set
autocommit
=
0
;
insert
t1
values
(
2
);
--
error
1192
call
sp1
();
commit
;
set
autocommit
=
1
;
select
*
from
t1
;
call
sp1
();
select
*
from
t1
;
drop
table
t1
;
drop
procedure
sp1
;
#
# BUG#8849: problem with insert statement with table alias's
...
...
sql/sql_delete.cc
View file @
12c6eb3b
...
...
@@ -749,11 +749,12 @@ 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_supports_generate
(
table_type
))
if
(
!
ha_supports_generate
(
table_type
)
||
thd
->
lex
->
sphead
)
{
/* Probably InnoDB table */
table_list
->
lock_type
=
TL_WRITE
;
ha_enable_transaction
(
thd
,
FALSE
);
mysql_init_select
(
thd
->
lex
);
error
=
mysql_delete
(
thd
,
table_list
,
(
COND
*
)
0
,
(
SQL_LIST
*
)
0
,
HA_POS_ERROR
,
0
);
ha_enable_transaction
(
thd
,
TRUE
);
...
...
sql/sql_parse.cc
View file @
12c6eb3b
...
...
@@ -3191,7 +3191,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
||
thd
->
active_transaction
())
if
(
(
thd
->
locked_tables
&&
!
lex
->
sphead
)
||
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