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
670c9a3a
Commit
670c9a3a
authored
Dec 04, 2019
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bb-10.3-release' into 10.3
parents
81bf7d33
f6d8640d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
7 deletions
+26
-7
mysql-test/suite/versioning/r/update.result
mysql-test/suite/versioning/r/update.result
+8
-0
mysql-test/suite/versioning/t/update.test
mysql-test/suite/versioning/t/update.test
+9
-0
sql/sp_head.cc
sql/sp_head.cc
+1
-5
sql/sql_derived.cc
sql/sql_derived.cc
+8
-2
No files found.
mysql-test/suite/versioning/r/update.result
View file @
670c9a3a
...
@@ -299,5 +299,13 @@ create or replace table t1 (id int, k int, primary key (id)) engine=innodb with
...
@@ -299,5 +299,13 @@ create or replace table t1 (id int, k int, primary key (id)) engine=innodb with
insert into t1 values (1,1),(2,2);
insert into t1 values (1,1),(2,2);
create or replace view v1 as select * from t1;
create or replace view v1 as select * from t1;
update v1 set id= 2 where k = 0;
update v1 set id= 2 where k = 0;
create or replace table t1 (a int) with system versioning;
create or replace view v1 as select * from t1;
create or replace procedure sp() update v1 set xx = 1;
call sp;
ERROR 42S22: Unknown column 'xx' in 'field list'
call sp;
ERROR 42S22: Unknown column 'xx' in 'field list'
drop procedure sp;
drop view v1;
drop view v1;
drop table t1;
drop table t1;
mysql-test/suite/versioning/t/update.test
View file @
670c9a3a
...
@@ -219,7 +219,16 @@ insert into t1 values (1,1),(2,2);
...
@@ -219,7 +219,16 @@ insert into t1 values (1,1),(2,2);
create
or
replace
view
v1
as
select
*
from
t1
;
create
or
replace
view
v1
as
select
*
from
t1
;
update
v1
set
id
=
2
where
k
=
0
;
update
v1
set
id
=
2
where
k
=
0
;
create
or
replace
table
t1
(
a
int
)
with
system
versioning
;
create
or
replace
view
v1
as
select
*
from
t1
;
create
or
replace
procedure
sp
()
update
v1
set
xx
=
1
;
--
error
ER_BAD_FIELD_ERROR
call
sp
;
--
error
ER_BAD_FIELD_ERROR
call
sp
;
# cleanup
# cleanup
drop
procedure
sp
;
drop
view
v1
;
drop
view
v1
;
drop
table
t1
;
drop
table
t1
;
...
...
sql/sp_head.cc
View file @
670c9a3a
...
@@ -3379,11 +3379,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
...
@@ -3379,11 +3379,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
Update the state of the active arena if no errors on
Update the state of the active arena if no errors on
open_tables stage.
open_tables stage.
*/
*/
if
(
likely
(
!
res
)
||
likely
(
!
thd
->
is_error
())
||
if
(
likely
(
!
res
)
||
likely
(
!
thd
->
is_error
()))
(
thd
->
get_stmt_da
()
->
sql_errno
()
!=
ER_CANT_REOPEN_TABLE
&&
thd
->
get_stmt_da
()
->
sql_errno
()
!=
ER_NO_SUCH_TABLE
&&
thd
->
get_stmt_da
()
->
sql_errno
()
!=
ER_NO_SUCH_TABLE_IN_ENGINE
&&
thd
->
get_stmt_da
()
->
sql_errno
()
!=
ER_UPDATE_TABLE_USED
))
thd
->
stmt_arena
->
state
=
Query_arena
::
STMT_EXECUTED
;
thd
->
stmt_arena
->
state
=
Query_arena
::
STMT_EXECUTED
;
/*
/*
...
...
sql/sql_derived.cc
View file @
670c9a3a
...
@@ -707,9 +707,15 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
...
@@ -707,9 +707,15 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
case
SQLCOM_DELETE_MULTI
:
case
SQLCOM_DELETE_MULTI
:
case
SQLCOM_UPDATE
:
case
SQLCOM_UPDATE
:
case
SQLCOM_UPDATE_MULTI
:
case
SQLCOM_UPDATE_MULTI
:
if
((
res
=
unit
->
first_select
()
->
vers_setup_conds
(
thd
,
derived
->
merge_underlying_list
)))
if
((
res
=
first_select
->
vers_setup_conds
(
thd
,
derived
->
merge_underlying_list
)))
goto
exit
;
goto
exit
;
derived
->
where
=
and_items
(
thd
,
derived
->
where
,
derived
->
merge_underlying_list
->
where
);
if
(
derived
->
merge_underlying_list
->
where
)
{
Query_arena_stmt
on_stmt_arena
(
thd
);
derived
->
where
=
and_items
(
thd
,
derived
->
where
,
derived
->
merge_underlying_list
->
where
);
}
default:
default:
break
;
break
;
}
}
...
...
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