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
ca463b53
Commit
ca463b53
authored
Oct 27, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: optimized build fix on view/derived
parent
669fd1d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
sql/sql_derived.cc
sql/sql_derived.cc
+7
-7
sql/sql_lex.cc
sql/sql_lex.cc
+1
-0
sql/sql_view.cc
sql/sql_view.cc
+7
-7
No files found.
sql/sql_derived.cc
View file @
ca463b53
...
...
@@ -748,7 +748,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
// Leading versioning table specified explicitly
// (i.e. if at least one system field is selected)
TABLE_LIST
*
expli_table
=
NULL
;
const
LString_i
*
impli_start
,
*
impli_end
;
LEX_CSTRING
impli_start
,
impli_end
;
Item_field
*
expli_start
=
NULL
,
*
expli_end
=
NULL
;
for
(
TABLE_LIST
*
table
=
sl
->
table_list
.
first
;
table
;
table
=
table
->
next_local
)
...
...
@@ -761,8 +761,8 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
if
(
!
impli_table
)
{
impli_table
=
table
;
impli_start
=
&
table_start
;
impli_end
=
&
table_end
;
impli_start
=
table_start
;
impli_end
=
table_end
;
}
/* Implicitly add versioning fields if needed */
...
...
@@ -809,7 +809,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
else
expli_table
=
table
;
expli_start
=
fld
;
impli_end
=
&
table_end
;
impli_end
=
table_end
;
}
else
if
(
table_end
==
fld
->
field_name
)
{
...
...
@@ -833,7 +833,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
else
expli_table
=
table
;
expli_end
=
fld
;
impli_start
=
&
table_start
;
impli_start
=
table_start
;
}
}
// while ((item= it++))
}
// for (TABLE_LIST *table)
...
...
@@ -844,9 +844,9 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
if
(
impli_table
)
{
Query_arena_stmt
on_stmt_arena
(
thd
);
if
(
!
expli_start
&&
(
res
=
sl
->
vers_push_field
(
thd
,
impli_table
,
*
impli_start
)))
if
(
!
expli_start
&&
(
res
=
sl
->
vers_push_field
(
thd
,
impli_table
,
impli_start
)))
goto
exit
;
if
(
!
expli_end
&&
(
res
=
sl
->
vers_push_field
(
thd
,
impli_table
,
*
impli_end
)))
if
(
!
expli_end
&&
(
res
=
sl
->
vers_push_field
(
thd
,
impli_table
,
impli_end
)))
goto
exit
;
if
(
impli_table
->
vers_conditions
)
...
...
sql/sql_lex.cc
View file @
ca463b53
...
...
@@ -7441,6 +7441,7 @@ Item *LEX::make_item_func_replace(THD *thd,
bool
SELECT_LEX
::
vers_push_field
(
THD
*
thd
,
TABLE_LIST
*
table
,
const
LEX_CSTRING
field_name
)
{
DBUG_ASSERT
(
field_name
.
str
);
Item_field
*
fld
=
new
(
thd
->
mem_root
)
Item_field
(
thd
,
&
context
,
table
->
db
,
table
->
alias
,
&
field_name
);
if
(
!
fld
)
...
...
sql/sql_view.cc
View file @
ca463b53
...
...
@@ -466,7 +466,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
// Leading versioning table specified explicitly
// (i.e. if at least one system field is selected)
TABLE_LIST
*
expli_table
=
NULL
;
const
LString_i
*
impli_start
,
*
impli_end
;
LEX_CSTRING
impli_start
,
impli_end
;
Item_field
*
expli_start
=
NULL
,
*
expli_end
=
NULL
;
for
(
TABLE_LIST
*
table
=
tables
;
table
;
table
=
table
->
next_local
)
...
...
@@ -496,8 +496,8 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
if
(
!
impli_table
)
{
impli_table
=
table
;
impli_start
=
&
table_start
;
impli_end
=
&
table_end
;
impli_start
=
table_start
;
impli_end
=
table_end
;
}
/* Implicitly add versioning fields if needed */
...
...
@@ -546,7 +546,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
else
expli_table
=
table
;
expli_start
=
fld
;
impli_end
=
&
table_end
;
impli_end
=
table_end
;
}
else
if
(
table_end
==
fld
->
field_name
)
{
...
...
@@ -571,7 +571,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
else
expli_table
=
table
;
expli_end
=
fld
;
impli_start
=
&
table_start
;
impli_start
=
table_start
;
}
}
// while ((item= it++))
}
// for (TABLE_LIST *table)
...
...
@@ -581,9 +581,9 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
if
(
impli_table
)
{
if
(
!
expli_start
&&
sl
->
vers_push_field
(
thd
,
impli_table
,
*
impli_start
))
if
(
!
expli_start
&&
sl
->
vers_push_field
(
thd
,
impli_table
,
impli_start
))
goto
err
;
if
(
!
expli_end
&&
sl
->
vers_push_field
(
thd
,
impli_table
,
*
impli_end
))
if
(
!
expli_end
&&
sl
->
vers_push_field
(
thd
,
impli_table
,
impli_end
))
goto
err
;
}
#pragma GCC diagnostic pop
...
...
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