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
1742561b
Commit
1742561b
authored
Dec 10, 2016
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix use-after-free [closes #89]
parent
a17b8f70
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
mysql-test/suite/versioning/r/alter.result
mysql-test/suite/versioning/r/alter.result
+2
-2
mysql-test/suite/versioning/r/optimized_fields.result
mysql-test/suite/versioning/r/optimized_fields.result
+1
-0
sql/item.cc
sql/item.cc
+9
-13
No files found.
mysql-test/suite/versioning/r/alter.result
View file @
1742561b
...
@@ -276,7 +276,7 @@ t CREATE TABLE `t` (
...
@@ -276,7 +276,7 @@ t CREATE TABLE `t` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
alter table t without system versioning;
alter table t without system versioning;
alter table t with system versioning, algorithm=inplace;
alter table t with system versioning, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
.
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
alter table t with system versioning, algorithm=copy;
alter table t with system versioning, algorithm=copy;
show create table t;
show create table t;
Table Create Table
Table Create Table
...
@@ -346,7 +346,7 @@ a
...
@@ -346,7 +346,7 @@ a
2
2
1
1
alter table t without system versioning, algorithm=inplace;
alter table t without system versioning, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
.
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
alter table t without system versioning, algorithm=copy;
alter table t without system versioning, algorithm=copy;
show create table t;
show create table t;
Table Create Table
Table Create Table
...
...
mysql-test/suite/versioning/r/optimized_fields.result
View file @
1742561b
...
@@ -18,6 +18,7 @@ a b b+0
...
@@ -18,6 +18,7 @@ a b b+0
3 NULL NULL
3 NULL NULL
Warnings:
Warnings:
Warning 4075 Attempt to read unversioned field `b` in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
Warning 4075 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6);
select * from t for system_time as of timestamp now(6);
a b
a b
1 NULL
1 NULL
...
...
sql/item.cc
View file @
1742561b
...
@@ -2760,19 +2760,17 @@ void Item_field::set_field(Field *field_par)
...
@@ -2760,19 +2760,17 @@ void Item_field::set_field(Field *field_par)
if
(
field
->
table
->
s
->
tmp_table
==
SYSTEM_TMP_TABLE
)
if
(
field
->
table
->
s
->
tmp_table
==
SYSTEM_TMP_TABLE
)
any_privileges
=
0
;
any_privileges
=
0
;
if
(
field
->
flags
&
VERS_OPTIMIZED_UPDATE_FLAG
&&
context
&&
context
->
select_lex
&&
field
->
force_null
=
false
;
context
->
select_lex
->
vers_conditions
.
type
!=
if
(
field
->
flags
&
VERS_OPTIMIZED_UPDATE_FLAG
&&
context
&&
FOR_SYSTEM_TIME_UNSPECIFIED
&&
context
->
select_lex
&&
!
field
->
force_null
)
context
->
select_lex
->
vers_conditions
.
type
!=
FOR_SYSTEM_TIME_UNSPECIFIED
)
{
{
DBUG_ASSERT
(
context
->
select_lex
->
parent_lex
&&
context
->
select_lex
->
parent_lex
->
thd
);
field
->
force_null
=
true
;
field
->
force_null
=
true
;
THD
*
thd
=
context
->
select_lex
->
parent_lex
->
thd
;
push_warning_printf
(
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
current_
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
ER_NON_VERSIONED_FIELD_IN_VERSIONED_QUERY
,
ER_NON_VERSIONED_FIELD_IN_VERSIONED_QUERY
,
ER_THD
(
thd
,
ER_NON_VERSIONED_FIELD_IN_VERSIONED_QUERY
),
ER_THD
(
current_
thd
,
ER_NON_VERSIONED_FIELD_IN_VERSIONED_QUERY
),
field_name
);
field_name
);
}
}
}
}
...
@@ -5922,8 +5920,6 @@ void Item_field::cleanup()
...
@@ -5922,8 +5920,6 @@ void Item_field::cleanup()
it will be linked correctly next time by name of field and table alias.
it will be linked correctly next time by name of field and table alias.
I.e. we can drop 'field'.
I.e. we can drop 'field'.
*/
*/
if
(
field
)
field
->
force_null
=
false
;
field
=
0
;
field
=
0
;
item_equal
=
NULL
;
item_equal
=
NULL
;
null_value
=
FALSE
;
null_value
=
FALSE
;
...
...
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