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
bfdbb179
Commit
bfdbb179
authored
Feb 05, 2014
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merge 5.5->10.0-base
parents
74cca641
41fd4844
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
1 deletion
+58
-1
mysql-test/r/ps.result
mysql-test/r/ps.result
+21
-0
mysql-test/suite/plugins/t/unix_socket.test
mysql-test/suite/plugins/t/unix_socket.test
+13
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+23
-0
sql/sql_derived.cc
sql/sql_derived.cc
+1
-1
No files found.
mysql-test/r/ps.result
View file @
bfdbb179
...
@@ -4019,4 +4019,25 @@ c1
...
@@ -4019,4 +4019,25 @@ c1
NULL
NULL
2
2
DROP TABLE t1,t2;
DROP TABLE t1,t2;
#
# MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of
# PS with LEFT JOIN, TEMPTABLE view
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (0),(8);
CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM;
CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2;
SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk;
SUM(pk)
NULL
PREPARE stmt FROM "SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk";
EXECUTE stmt;
SUM(pk)
NULL
EXECUTE stmt;
SUM(pk)
NULL
DEALLOCATE PREPARE stmt;
DROP VIEW v2;
DROP TABLE t1, t2;
# End of 5.3 tests
# End of 5.3 tests
mysql-test/suite/plugins/t/unix_socket.test
View file @
bfdbb179
...
@@ -3,10 +3,23 @@
...
@@ -3,10 +3,23 @@
# get .result differences from CURRENT_USER().
# get .result differences from CURRENT_USER().
--
source
include
/
not_as_root
.
inc
--
source
include
/
not_as_root
.
inc
# The previous check verifies that the user does not have root permissions.
# However in some cases tests are run under a user named 'root',
# even although this user does not have real root permissions.
# This test should be skipped in this case, since it does not expect
# that there are records in mysql.user where user=<username>
if
(
$USER
==
"root"
)
{
skip
Cannot
be
run
by
user
named
'root'
even
if
it
does
not
have
all
privileges
;
}
if
(
!
$AUTH_SOCKET_SO
)
{
if
(
!
$AUTH_SOCKET_SO
)
{
skip
No
auth_socket
plugin
;
skip
No
auth_socket
plugin
;
}
}
if
(
!
$USER
)
{
skip
USER
variable
is
undefined
;
}
let
$plugindir
=
`SELECT @@global.plugin_dir`
;
let
$plugindir
=
`SELECT @@global.plugin_dir`
;
eval
install
plugin
unix_socket
soname
'$AUTH_SOCKET_SO'
;
eval
install
plugin
unix_socket
soname
'$AUTH_SOCKET_SO'
;
...
...
mysql-test/t/ps.test
View file @
bfdbb179
...
@@ -3594,4 +3594,27 @@ EXECUTE stmt;
...
@@ -3594,4 +3594,27 @@ EXECUTE stmt;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of
--
echo
# PS with LEFT JOIN, TEMPTABLE view
--
echo
#
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
0
),(
8
);
CREATE
TABLE
t2
(
pk
INT
PRIMARY
KEY
)
ENGINE
=
MyISAM
;
CREATE
ALGORITHM
=
TEMPTABLE
VIEW
v2
AS
SELECT
*
FROM
t2
;
SELECT
SUM
(
pk
)
FROM
t1
LEFT
JOIN
v2
ON
a
=
pk
;
PREPARE
stmt
FROM
"SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk"
;
EXECUTE
stmt
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
DROP
VIEW
v2
;
DROP
TABLE
t1
,
t2
;
--
echo
# End of 5.3 tests
--
echo
# End of 5.3 tests
sql/sql_derived.cc
View file @
bfdbb179
...
@@ -625,7 +625,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
...
@@ -625,7 +625,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
if
((
res
=
sl
->
handle_derived
(
lex
,
DT_PREPARE
)))
if
((
res
=
sl
->
handle_derived
(
lex
,
DT_PREPARE
)))
goto
exit
;
goto
exit
;
if
(
derived
->
outer_join
)
if
(
derived
->
outer_join
&&
sl
->
first_cond_optimization
)
{
{
/* Mark that table is part of OUTER JOIN and fields may be NULL */
/* Mark that table is part of OUTER JOIN and fields may be NULL */
for
(
TABLE_LIST
*
cursor
=
(
TABLE_LIST
*
)
sl
->
table_list
.
first
;
for
(
TABLE_LIST
*
cursor
=
(
TABLE_LIST
*
)
sl
->
table_list
.
first
;
...
...
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