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
39157fbf
Commit
39157fbf
authored
Feb 11, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ER_NON_VERSIONED_FIELD_IN_HISTORICAL_QUERY
parent
d0f5e56a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
115 deletions
+3
-115
mysql-test/suite/versioning/r/optimized.result
mysql-test/suite/versioning/r/optimized.result
+0
-33
sql/item.cc
sql/item.cc
+0
-18
sql/item.h
sql/item.h
+0
-3
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+2
-2
sql/sql_select.cc
sql/sql_select.cc
+1
-57
sql/sql_select.h
sql/sql_select.h
+0
-2
No files found.
mysql-test/suite/versioning/r/optimized.result
View file @
39157fbf
...
...
@@ -16,65 +16,36 @@ select a, b, b+0 from t for system_time as of timestamp now(6);
a b b+0
1 2 2
3 4 4
Warnings:
Note 4110 Non-versioned field `b` in historical query
Note 4110 Non-versioned field `b` in historical query
select * from t for system_time as of timestamp now(6);
a b
1 2
3 4
Warnings:
Note 4110 Non-versioned field `b` in historical query
select count(*) from t for system_time as of timestamp now(6) group by b;
count(*)
1
1
Warnings:
Note 4110 Non-versioned field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b asc;
a b
1 2
3 4
Warnings:
Note 4110 Non-versioned field `b` in historical query
Note 4110 Non-versioned field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b desc;
a b
3 4
1 2
Warnings:
Note 4110 Non-versioned field `b` in historical query
Note 4110 Non-versioned field `b` in historical query
select * from t for system_time as of timestamp now(6) group by a having a=2;
a b
Warnings:
Note 4110 Non-versioned field `b` in historical query
select * from t for system_time as of timestamp now(6) group by b having b=2;
a b
1 2
Warnings:
Note 4110 Non-versioned field `b` in historical query
Note 4110 Non-versioned field `b` in historical query
Note 4110 Non-versioned field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=2;
a
1
Warnings:
Note 4110 Non-versioned field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=NULL;
a
Warnings:
Note 4110 Non-versioned field `b` in historical query
select a from t for system_time as of timestamp now(6) where b is NULL;
a
Warnings:
Note 4110 Non-versioned field `b` in historical query
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
count(*) b
Warnings:
Note 4110 Non-versioned field `b` in historical query
Note 4110 Non-versioned field `b` in historical query
Note 4110 Non-versioned field `b` in historical query
select a, b from t;
a b
1 2
...
...
@@ -88,10 +59,6 @@ select * from t for system_time as of timestamp now(6);
a b
1 2
3 4
Warnings:
Note 4110 Non-versioned field `b` in historical query
select * from t for system_time as of timestamp now(6) where b is NULL;
a b
Warnings:
Note 4110 Non-versioned field `b` in historical query
drop table t;
sql/item.cc
View file @
39157fbf
...
...
@@ -10626,24 +10626,6 @@ Item_field::excl_dep_on_grouping_fields(st_select_lex *sel)
return
find_matching_grouping_field
(
this
,
sel
)
!=
NULL
;
}
Item
*
Item_field
::
vers_transformer
(
THD
*
thd
,
uchar
*
)
{
if
(
!
field
)
return
this
;
if
(
field
->
vers_update_unversioned
()
&&
context
&&
field
->
table
->
pos_in_table_list
&&
field
->
table
->
pos_in_table_list
->
vers_conditions
)
{
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_NOTE
,
ER_NON_VERSIONED_FIELD_IN_HISTORICAL_QUERY
,
ER_THD
(
thd
,
ER_NON_VERSIONED_FIELD_IN_HISTORICAL_QUERY
),
field_name
.
str
);
}
return
this
;
}
bool
Item_field
::
vers_trx_id
()
const
{
DBUG_ASSERT
(
field
);
...
...
sql/item.h
View file @
39157fbf
...
...
@@ -1763,8 +1763,6 @@ class Item: public Value_source,
virtual
Item_field
*
field_for_view_update
()
{
return
0
;
}
virtual
Item
*
vers_transformer
(
THD
*
thd
,
uchar
*
)
{
return
this
;
}
virtual
bool
vers_trx_id
()
const
{
return
false
;
}
virtual
Item
*
neg_transformer
(
THD
*
thd
)
{
return
NULL
;
}
...
...
@@ -2928,7 +2926,6 @@ class Item_field :public Item_ident
uint32
max_display_length
()
const
{
return
field
->
max_display_length
();
}
Item_field
*
field_for_view_update
()
{
return
this
;
}
int
fix_outer_field
(
THD
*
thd
,
Field
**
field
,
Item
**
reference
);
virtual
Item
*
vers_transformer
(
THD
*
thd
,
uchar
*
);
virtual
bool
vers_trx_id
()
const
;
virtual
Item
*
update_value_transformer
(
THD
*
thd
,
uchar
*
select_arg
);
Item
*
derived_field_transformer_for_having
(
THD
*
thd
,
uchar
*
arg
);
...
...
sql/share/errmsg-utf8.txt
View file @
39157fbf
...
...
@@ -7825,8 +7825,8 @@ ER_VERS_FIELD_WRONG_TYPE
ER_VERS_ENGINE_UNSUPPORTED
eng "Transaction system versioning for %`s is not supported"
ER_
NON_VERSIONED_FIELD_IN_HISTORICAL_QUERY
eng "
Non-versioned field %`s in historical query
"
ER_
UNUSED_22
eng "
You should never see it
"
ER_PARTITION_WRONG_TYPE
eng "Wrong partitioning type, expected type: %`s"
...
...
sql/sql_select.cc
View file @
39157fbf
...
...
@@ -690,46 +690,6 @@ bool vers_select_conds_t::init_from_sysvar(THD *thd)
return
false
;
}
inline
void
JOIN
::
vers_check_items
()
{
Item_transformer
transformer
=
&
Item
::
vers_transformer
;
if
(
conds
)
{
Item
*
tmp
=
conds
->
transform
(
thd
,
transformer
,
NULL
);
if
(
conds
!=
tmp
)
conds
=
tmp
;
}
for
(
ORDER
*
ord
=
order
;
ord
;
ord
=
ord
->
next
)
{
Item
*
tmp
=
(
*
ord
->
item
)
->
transform
(
thd
,
transformer
,
NULL
);
if
(
*
ord
->
item
!=
tmp
)
{
ord
->
item_ptr
=
tmp
;
*
ord
->
item
=
ord
->
item_ptr
;
}
}
for
(
ORDER
*
ord
=
group_list
;
ord
;
ord
=
ord
->
next
)
{
Item
*
tmp
=
(
*
ord
->
item
)
->
transform
(
thd
,
transformer
,
NULL
);
if
(
*
ord
->
item
!=
tmp
)
{
ord
->
item_ptr
=
tmp
;
*
ord
->
item
=
ord
->
item_ptr
;
}
}
if
(
having
)
{
Item
*
tmp
=
having
->
transform
(
thd
,
transformer
,
NULL
);
if
(
having
!=
tmp
)
having
=
tmp
;
}
}
int
SELECT_LEX
::
vers_setup_conds
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
**
where_expr
)
{
DBUG_ENTER
(
"SELECT_LEX::vers_setup_cond"
);
...
...
@@ -1143,7 +1103,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
/*
TRUE if the SELECT list mixes elements with and without grouping,
and there is no GROUP BY clause. Mixing non-aggregated fields with
aggregate functions in the SELECT list is a MySQL ex
p
tenstion that
aggregate functions in the SELECT list is a MySQL extenstion that
is allowed only if the ONLY_FULL_GROUP_BY sql mode is not set.
*/
mixed_implicit_grouping
=
false
;
...
...
@@ -1439,11 +1399,6 @@ JOIN::prepare(TABLE_LIST *tables_init,
if
(
!
procedure
&&
result
&&
result
->
prepare
(
fields_list
,
unit_arg
))
goto
err
;
/* purecov: inspected */
if
(
!
thd
->
stmt_arena
->
is_stmt_prepare
()
&&
select_lex
->
versioned_tables
>
0
)
{
vers_check_items
();
}
unit
=
unit_arg
;
if
(
prepare_stage2
())
goto
err
;
...
...
@@ -4047,17 +4002,6 @@ void JOIN::exec_inner()
procedure
?
procedure_fields_list
:
*
fields
,
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
);
{
List_iterator
<
Item
>
it
(
*
columns_list
);
while
(
Item
*
item
=
it
++
)
{
Item_transformer
transformer
=
&
Item
::
vers_transformer
;
Item
*
new_item
=
item
->
transform
(
thd
,
transformer
,
NULL
);
if
(
new_item
)
// Item_default_value::transform() may return NULL
it
.
replace
(
new_item
);
}
}
error
=
do_select
(
this
,
procedure
);
/* Accumulate the counts from all join iterations of all join parts. */
thd
->
inc_examined_row_count
(
join_examined_rows
);
...
...
sql/sql_select.h
View file @
39157fbf
...
...
@@ -1767,8 +1767,6 @@ class JOIN :public Sql_alloc
void
cleanup_item_list
(
List
<
Item
>
&
items
)
const
;
bool
add_having_as_table_cond
(
JOIN_TAB
*
tab
);
bool
make_aggr_tables_info
();
void
vers_check_items
();
};
enum
enum_with_bush_roots
{
WITH_BUSH_ROOTS
,
WITHOUT_BUSH_ROOTS
};
...
...
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