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
d64702d4
Commit
d64702d4
authored
Apr 11, 2017
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: different results when querying a VIEW from PREPARED STATEMENT and without it [fixes #176]
parent
ecd18bc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
mysql-test/suite/versioning/r/view.result
mysql-test/suite/versioning/r/view.result
+0
-3
sql/sql_select.cc
sql/sql_select.cc
+2
-7
No files found.
mysql-test/suite/versioning/r/view.result
View file @
d64702d4
...
...
@@ -39,8 +39,6 @@ x
drop prepare stmt;
select * from vt1;
x
2
1
prepare stmt from 'select * from vt1';
execute stmt;
x
...
...
@@ -50,7 +48,6 @@ x
1
select * from vt1 for system_time as of timestamp @t1;
x
2
1
prepare stmt from 'select * from vt1 for system_time as of timestamp @t1';
execute stmt;
...
...
sql/sql_select.cc
View file @
d64702d4
...
...
@@ -703,11 +703,6 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
DBUG_RETURN
(
0
);
}
while
(
tables
&&
tables
->
is_view
()
&&
!
thd
->
stmt_arena
->
is_stmt_prepare
())
{
tables
=
tables
->
view
->
select_lex
.
table_list
.
first
;
}
for
(
table
=
tables
;
table
;
table
=
table
->
next_local
)
{
if
(
table
->
table
&&
table
->
table
->
versioned
())
...
...
@@ -16879,9 +16874,9 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
continue
;
// Some kind of const item
}
if
(
type
==
Item
::
FIELD_ITEM
)
if
(
type
==
Item
::
FIELD_ITEM
||
type
==
Item
::
REF_ITEM
)
{
Item_field
*
item_field
=
(
Item_field
*
)
item
;
Item_field
*
item_field
=
(
Item_field
*
)
item
->
real_item
()
;
Field
*
field
=
item_field
->
field
;
TABLE_SHARE
*
s
=
field
->
table
->
s
;
if
(
s
->
versioned
)
...
...
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