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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
87e036a2
Commit
87e036a2
authored
Oct 19, 2001
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql
parents
0889d8dc
253b9ecb
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
7 deletions
+58
-7
Docs/manual.texi
Docs/manual.texi
+8
-0
libmysql/libmysql.c
libmysql/libmysql.c
+2
-2
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+2
-0
mysql-test/r/null.result
mysql-test/r/null.result
+7
-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 @
87e036a2
...
@@ -46845,6 +46845,14 @@ not yet 100% confident in this code.
...
@@ -46845,6 +46845,14 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.44
@appendixsubsec Changes in release 3.23.44
@itemize @bullet
@itemize @bullet
@item
@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
When using replications, aborted queries that contained @code{%} could cause
a core dum.
a core dum.
@item
@item
libmysql/libmysql.c
View file @
87e036a2
...
@@ -1002,7 +1002,7 @@ mysql_init(MYSQL *mysql)
...
@@ -1002,7 +1002,7 @@ mysql_init(MYSQL *mysql)
else
else
bzero
((
char
*
)
(
mysql
),
sizeof
(
*
(
mysql
)));
bzero
((
char
*
)
(
mysql
),
sizeof
(
*
(
mysql
)));
mysql
->
options
.
connect_timeout
=
CONNECT_TIMEOUT
;
mysql
->
options
.
connect_timeout
=
CONNECT_TIMEOUT
;
#if defined(SIGPIPE) && defined(THREAD)
#if defined(SIGPIPE) && defined(THREAD)
&& !defined(__WIN__)
if
(
!
((
mysql
)
->
client_flag
&
CLIENT_IGNORE_SIGPIPE
))
if
(
!
((
mysql
)
->
client_flag
&
CLIENT_IGNORE_SIGPIPE
))
(
void
)
signal
(
SIGPIPE
,
pipe_sig_handler
);
(
void
)
signal
(
SIGPIPE
,
pipe_sig_handler
);
#endif
#endif
...
@@ -1043,7 +1043,7 @@ static void mysql_once_init()
...
@@ -1043,7 +1043,7 @@ static void mysql_once_init()
mysql_unix_port
=
env
;
mysql_unix_port
=
env
;
}
}
mysql_debug
(
NullS
);
mysql_debug
(
NullS
);
#if defined(SIGPIPE) && !defined(THREAD)
#if defined(SIGPIPE) && !defined(THREAD)
&& !defined(__WIN__)
(
void
)
signal
(
SIGPIPE
,
SIG_IGN
);
(
void
)
signal
(
SIGPIPE
,
SIG_IGN
);
#endif
#endif
}
}
...
...
mysql-test/r/join_outer.result
View file @
87e036a2
...
@@ -318,3 +318,5 @@ t1 ALL NULL NULL NULL NULL 2
...
@@ -318,3 +318,5 @@ t1 ALL NULL NULL NULL NULL 2
t2 index id id 8 NULL 1 where used; Using index; Not exists
t2 index id id 8 NULL 1 where used; Using index; Not exists
id name id idx
id name id idx
2 no NULL NULL
2 no NULL NULL
bug_id reporter bug_id who
1 1 1 2
mysql-test/r/null.result
View file @
87e036a2
...
@@ -23,3 +23,10 @@ NULL 0
...
@@ -23,3 +23,10 @@ NULL 0
inet_ntoa(null) inet_aton(null) inet_aton("122.256") inet_aton("122.226.") inet_aton("")
inet_ntoa(null) inet_aton(null) inet_aton("122.256") inet_aton("122.226.") inet_aton("")
NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL
x
x
indexed_field
indexed_field
NULL
NULL
indexed_field
NULL
NULL
mysql-test/t/join_outer.test
View file @
87e036a2
...
@@ -394,3 +394,13 @@ INSERT INTO t2 VALUES (1,1);
...
@@ -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
;
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
;
SELECT
*
from
t1
left
join
t2
on
t1
.
id
=
t2
.
id
where
t2
.
id
IS
NULL
;
drop
table
t1
,
t2
;
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 @
87e036a2
...
@@ -20,3 +20,18 @@ create table t1 (x int);
...
@@ -20,3 +20,18 @@ create table t1 (x int);
insert
into
t1
values
(
null
);
insert
into
t1
values
(
null
);
select
*
from
t1
where
x
!=
0
;
select
*
from
t1
where
x
!=
0
;
drop
table
t1
;
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 @
87e036a2
...
@@ -2901,13 +2901,21 @@ struct show_var_st init_vars[]= {
...
@@ -2901,13 +2901,21 @@ struct show_var_st init_vars[]= {
{
"have_openssl"
,
(
char
*
)
&
have_ssl
,
SHOW_HAVE
},
{
"have_openssl"
,
(
char
*
)
&
have_ssl
,
SHOW_HAVE
},
{
"init_file"
,
(
char
*
)
&
opt_init_file
,
SHOW_CHAR_PTR
},
{
"init_file"
,
(
char
*
)
&
opt_init_file
,
SHOW_CHAR_PTR
},
#ifdef HAVE_INNOBASE_DB
#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_file_path"
,
(
char
*
)
&
innobase_data_file_path
,
SHOW_CHAR_PTR
},
{
"innodb_data_home_dir"
,
(
char
*
)
&
innobase_data_home_dir
,
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_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_arch_dir"
,
(
char
*
)
&
innobase_log_arch_dir
,
SHOW_CHAR_PTR
},
{
"innodb_log_archive"
,
(
char
*
)
&
innobase_log_archive
,
SHOW_MY_BOOL
},
{
"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_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
#endif
{
"interactive_timeout"
,
(
char
*
)
&
net_interactive_timeout
,
SHOW_LONG
},
{
"interactive_timeout"
,
(
char
*
)
&
net_interactive_timeout
,
SHOW_LONG
},
{
"join_buffer_size"
,
(
char
*
)
&
join_buff_size
,
SHOW_LONG
},
{
"join_buffer_size"
,
(
char
*
)
&
join_buff_size
,
SHOW_LONG
},
...
...
sql/sql_select.cc
View file @
87e036a2
...
@@ -4963,15 +4963,16 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
...
@@ -4963,15 +4963,16 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
static
bool
test_if_ref
(
Item_field
*
left_item
,
Item
*
right_item
)
static
bool
test_if_ref
(
Item_field
*
left_item
,
Item
*
right_item
)
{
{
Field
*
field
=
left_item
->
field
;
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
);
Item
*
ref_item
=
part_of_refkey
(
field
->
table
,
field
);
if
(
ref_item
&&
ref_item
->
eq
(
right_item
))
if
(
ref_item
&&
ref_item
->
eq
(
right_item
))
{
{
if
(
right_item
->
type
()
==
Item
::
FIELD_ITEM
)
if
(
right_item
->
type
()
==
Item
::
FIELD_ITEM
)
return
(
field
->
eq_def
(((
Item_field
*
)
right_item
)
->
field
)
&&
return
(
field
->
eq_def
(((
Item_field
*
)
right_item
)
->
field
)
);
!
field
->
table
->
maybe_null
);
if
(
right_item
->
const_item
()
&&
if
(
right_item
->
const_item
(
))
(
right_item
->
val_int
()
||
!
right_item
->
null_value
))
{
{
// We can remove binary fields and numerical fields except float,
// We can remove binary fields and numerical fields except float,
// as float comparison isn't 100 % secure
// 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