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
b54a4b76
Commit
b54a4b76
authored
Jun 17, 2013
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
5.3 -> 5.5 Merge
parents
10be9160
fee78df3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
1 deletion
+57
-1
mysql-test/r/type_datetime_hires.result
mysql-test/r/type_datetime_hires.result
+12
-0
mysql-test/r/view.result
mysql-test/r/view.result
+12
-0
mysql-test/t/type_datetime_hires.test
mysql-test/t/type_datetime_hires.test
+9
-0
mysql-test/t/view.test
mysql-test/t/view.test
+14
-0
sql/sql_derived.cc
sql/sql_derived.cc
+10
-1
No files found.
mysql-test/r/type_datetime_hires.result
View file @
b54a4b76
...
...
@@ -338,3 +338,15 @@ select * from t1;
a b
2010-01-02 03:04:05.000000 2010-01-02 03:04:05
drop table t1;
#
# MDEV-4651 Crash in my_decimal2decimal in a ORDER BY query
#
SET @@time_zone='+00:00';
CREATE TABLE t1 (a DATETIME(4) NOT NULL);
INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2000-00-00 00:00:00');
SELECT UNIX_TIMESTAMP(a) FROM t1 ORDER BY 1;
UNIX_TIMESTAMP(a)
NULL
978307200.0000
DROP TABLE t1;
SET @@time_zone=DEFAULT;
mysql-test/r/view.result
View file @
b54a4b76
...
...
@@ -4863,6 +4863,18 @@ a
1
drop view v1;
drop table t1,t2;
#
# MDEV-4593: p_s: crash in simplify_joins with delete using subselect
# from view
#
create table `t1`(`a` int);
create table `t2`(`a` int);
create or replace view `v1` as select `a` from `t1`;
prepare s from "delete from `t2` order by (select 1 from `v1`)";
execute s;
deallocate prepare s;
drop view v1;
drop tables t1,t2;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------
...
...
mysql-test/t/type_datetime_hires.test
View file @
b54a4b76
...
...
@@ -69,3 +69,12 @@ alter table t1 modify b datetime, modify a datetime(6);
select
*
from
t1
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-4651 Crash in my_decimal2decimal in a ORDER BY query
--
echo
#
SET
@@
time_zone
=
'+00:00'
;
CREATE
TABLE
t1
(
a
DATETIME
(
4
)
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
'2001-01-01 00:00:00'
),(
'2000-00-00 00:00:00'
);
SELECT
UNIX_TIMESTAMP
(
a
)
FROM
t1
ORDER
BY
1
;
DROP
TABLE
t1
;
SET
@@
time_zone
=
DEFAULT
;
mysql-test/t/view.test
View file @
b54a4b76
...
...
@@ -4794,6 +4794,20 @@ WHERE a = alias.a );
drop
view
v1
;
drop
table
t1
,
t2
;
--
echo
#
--
echo
# MDEV-4593: p_s: crash in simplify_joins with delete using subselect
--
echo
# from view
--
echo
#
create
table
`t1`
(
`a`
int
);
create
table
`t2`
(
`a`
int
);
create
or
replace
view
`v1`
as
select
`a`
from
`t1`
;
prepare
s
from
"delete from `t2` order by (select 1 from `v1`)"
;
execute
s
;
deallocate
prepare
s
;
drop
view
v1
;
drop
tables
t1
,
t2
;
--
echo
# -----------------------------------------------------------------
--
echo
# -- End of 5.3 tests.
--
echo
# -----------------------------------------------------------------
...
...
sql/sql_derived.cc
View file @
b54a4b76
...
...
@@ -87,7 +87,16 @@ mysql_handle_derived(LEX *lex, uint phases)
sl
&&
!
res
;
sl
=
sl
->
next_select_in_list
())
{
for
(
TABLE_LIST
*
cursor
=
sl
->
get_table_list
();
TABLE_LIST
*
cursor
=
sl
->
get_table_list
();
/*
DT_MERGE_FOR_INSERT is not needed for views/derived tables inside
subqueries. Views and derived tables of subqueries should be
processed normally.
*/
if
(
phases
==
DT_MERGE_FOR_INSERT
&&
cursor
&&
cursor
->
top_table
()
->
select_lex
!=
&
lex
->
select_lex
)
continue
;
for
(;
cursor
&&
!
res
;
cursor
=
cursor
->
next_local
)
{
...
...
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