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
35f2d831
Commit
35f2d831
authored
Oct 20, 2001
by
monty@work.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
52270d32
0f25a1a0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
5 deletions
+47
-5
Docs/manual.texi
Docs/manual.texi
+8
-0
mysql-test/t/join_outer.test
mysql-test/t/join_outer.test
+10
-0
mysql-test/t/null.test
mysql-test/t/null.test
+15
-0
sql/mysqld.cc
sql/mysqld.cc
+9
-1
sql/sql_select.cc
sql/sql_select.cc
+5
-4
No files found.
Docs/manual.texi
View file @
35f2d831
...
...
@@ -48849,6 +48849,14 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.44
@itemize @bullet
@item
Don't use @code{signal()} on windows because this appears to not be
100 % reliable.
@item
Fixed bug when doing @code{WHERE column_name=NULL} on an indexed column
that had @code{NULL} values.
@item
Fixed bug when doing @code{LEFT JOIN ... ON (column_name = constant) WHERE column_name = constant}.
@item
When using replications, aborted queries that contained @code{%} could cause
a core dum.
@item
mysql-test/t/join_outer.test
View file @
35f2d831
...
...
@@ -394,3 +394,13 @@ INSERT INTO t2 VALUES (1,1);
explain
SELECT
*
from
t1
left
join
t2
on
t1
.
id
=
t2
.
id
where
t2
.
id
IS
NULL
;
SELECT
*
from
t1
left
join
t2
on
t1
.
id
=
t2
.
id
where
t2
.
id
IS
NULL
;
drop
table
t1
,
t2
;
#
# Test problem with using key_column= constant in ON and WHERE
#
create
table
t1
(
bug_id
mediumint
,
reporter
mediumint
);
create
table
t2
(
bug_id
mediumint
,
who
mediumint
,
index
(
who
));
insert
into
t2
values
(
1
,
1
),(
1
,
2
);
insert
into
t1
values
(
1
,
1
),(
2
,
1
);
SELECT
*
FROM
t1
LEFT
JOIN
t2
ON
(
t1
.
bug_id
=
t2
.
bug_id
AND
t2
.
who
=
2
)
WHERE
(
t1
.
reporter
=
2
OR
t2
.
who
=
2
);
drop
table
t1
,
t2
;
mysql-test/t/null.test
View file @
35f2d831
...
...
@@ -20,3 +20,18 @@ create table t1 (x int);
insert
into
t1
values
(
null
);
select
*
from
t1
where
x
!=
0
;
drop
table
t1
;
#
# Test problem med index on NULL columns and testing with =NULL;
#
DROP
TABLE
IF
EXISTS
t1
;
CREATE
TABLE
t1
(
indexed_field
int
default
NULL
,
KEY
indexed_field
(
indexed_field
)
);
INSERT
INTO
t1
VALUES
(
NULL
),(
NULL
);
SELECT
*
FROM
t1
WHERE
indexed_field
=
NULL
;
SELECT
*
FROM
t1
WHERE
indexed_field
IS
NULL
;
SELECT
*
FROM
t1
WHERE
indexed_field
<=>
NULL
;
DROP
TABLE
t1
;
sql/mysqld.cc
View file @
35f2d831
...
...
@@ -2937,13 +2937,21 @@ struct show_var_st init_vars[]= {
{
"have_openssl"
,
(
char
*
)
&
have_openssl
,
SHOW_HAVE
},
{
"init_file"
,
(
char
*
)
&
opt_init_file
,
SHOW_CHAR_PTR
},
#ifdef HAVE_INNOBASE_DB
{
"innodb_additional_mem_pool_size"
,
(
char
*
)
&
innobase_additional_mem_pool_size
,
SHOW_LONG
},
{
"innodb_buffer_pool_size"
,
(
char
*
)
&
innobase_buffer_pool_size
,
SHOW_LONG
},
{
"innodb_data_file_path"
,
(
char
*
)
&
innobase_data_file_path
,
SHOW_CHAR_PTR
},
{
"innodb_data_home_dir"
,
(
char
*
)
&
innobase_data_home_dir
,
SHOW_CHAR_PTR
},
{
"innodb_file_io_threads"
,
(
char
*
)
&
innobase_file_io_threads
,
SHOW_LONG
},
{
"innodb_flush_log_at_trx_commit"
,
(
char
*
)
&
innobase_flush_log_at_trx_commit
,
SHOW_MY_BOOL
},
{
"innodb_flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
{
"innodb_lock_wait_timeout"
,
(
char
*
)
&
innobase_lock_wait_timeout
,
SHOW_LONG
},
{
"innodb_log_arch_dir"
,
(
char
*
)
&
innobase_log_arch_dir
,
SHOW_CHAR_PTR
},
{
"innodb_log_archive"
,
(
char
*
)
&
innobase_log_archive
,
SHOW_MY_BOOL
},
{
"innodb_log_buffer_size"
,
(
char
*
)
&
innobase_log_buffer_size
,
SHOW_LONG
},
{
"innodb_log_file_size"
,
(
char
*
)
&
innobase_log_file_size
,
SHOW_LONG
},
{
"innodb_log_files_in_group"
,
(
char
*
)
&
innobase_log_files_in_group
,
SHOW_LONG
},
{
"innodb_log_group_home_dir"
,
(
char
*
)
&
innobase_log_group_home_dir
,
SHOW_CHAR_PTR
},
{
"innodb_
flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
{
"innodb_
mirrored_log_groups"
,
(
char
*
)
&
innobase_mirrored_log_groups
,
SHOW_LONG
},
#endif
{
"interactive_timeout"
,
(
char
*
)
&
net_interactive_timeout
,
SHOW_LONG
},
{
"join_buffer_size"
,
(
char
*
)
&
join_buff_size
,
SHOW_LONG
},
...
...
sql/sql_select.cc
View file @
35f2d831
...
...
@@ -5084,15 +5084,16 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
static
bool
test_if_ref
(
Item_field
*
left_item
,
Item
*
right_item
)
{
Field
*
field
=
left_item
->
field
;
if
(
!
field
->
table
->
const_table
)
// No need to change const test
// No need to change const test. We also have to keep tests on LEFT JOIN
if
(
!
field
->
table
->
const_table
&&
!
field
->
table
->
maybe_null
)
{
Item
*
ref_item
=
part_of_refkey
(
field
->
table
,
field
);
if
(
ref_item
&&
ref_item
->
eq
(
right_item
))
{
if
(
right_item
->
type
()
==
Item
::
FIELD_ITEM
)
return
(
field
->
eq_def
(((
Item_field
*
)
right_item
)
->
field
)
&&
!
field
->
table
->
maybe_null
);
if
(
right_item
->
const_item
(
))
return
(
field
->
eq_def
(((
Item_field
*
)
right_item
)
->
field
)
);
if
(
right_item
->
const_item
()
&&
(
right_item
->
val_int
()
||
!
right_item
->
null_value
))
{
// We can remove binary fields and numerical fields except float,
// as float comparison isn't 100 % secure
...
...
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