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
d025029d
Commit
d025029d
authored
May 07, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for ISNULL()
parent
d6fcf75a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
3 deletions
+19
-3
Docs/manual.texi
Docs/manual.texi
+6
-1
mysql-test/r/join.result
mysql-test/r/join.result
+3
-0
mysql-test/t/join.test
mysql-test/t/join.test
+1
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+7
-0
sql/item_timefunc.h
sql/item_timefunc.h
+1
-1
No files found.
Docs/manual.texi
View file @
d025029d
...
@@ -46916,6 +46916,10 @@ not yet 100% confident in this code.
...
@@ -46916,6 +46916,10 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.51
@appendixsubsec Changes in release 3.23.51
@itemize @bullet
@itemize @bullet
@item
@item
Removed BDB documentation.
@item
Fixed mit-pthreads to compile with glibc 2.2 (needed for @code{make dist}).
@item
Fixed the @code{FLOAT(X+1,X)} is not converted to @code{FLOAT(X+2,X)}.
Fixed the @code{FLOAT(X+1,X)} is not converted to @code{FLOAT(X+2,X)}.
(This also affected @code{DECIMAL}, @code{DOUBLE} and @code{REAL} types)
(This also affected @code{DECIMAL}, @code{DOUBLE} and @code{REAL} types)
@item
@item
...
@@ -46929,7 +46933,8 @@ Fixed that underflowed decimal fields is not zero filled.
...
@@ -46929,7 +46933,8 @@ Fixed that underflowed decimal fields is not zero filled.
If we get an overflow when inserting @code{'+11111'} for
If we get an overflow when inserting @code{'+11111'} for
@code{decimal(5,0) unsigned} columns, we will just drop the sign.
@code{decimal(5,0) unsigned} columns, we will just drop the sign.
@item
@item
Fixed bug with @code{ISNULL(expression_which_cannot_be_null)}.
Fixed optimization bug with @code{ISNULL(expression_which_cannot_be_null)} and
@code{ISNULL(constant_expression)}.
@item
@item
Fixed host lookup bug in the glibc library that we used with the 3.23.50
Fixed host lookup bug in the glibc library that we used with the 3.23.50
Linux-x86 binaries.
Linux-x86 binaries.
mysql-test/r/join.result
View file @
d025029d
...
@@ -27,6 +27,9 @@ d d
...
@@ -27,6 +27,9 @@ d d
0000-00-00 NULL
0000-00-00 NULL
d
d
0000-00-00
0000-00-00
d
2001-08-01
0000-00-00
COUNT(t1.Title)
COUNT(t1.Title)
1
1
COUNT(t1.Title)
COUNT(t1.Title)
...
...
mysql-test/t/join.test
View file @
d025029d
...
@@ -120,6 +120,7 @@ CREATE TABLE t2 (d DATE NOT NULL);
...
@@ -120,6 +120,7 @@ CREATE TABLE t2 (d DATE NOT NULL);
INSERT
INTO
t1
(
d
)
VALUES
(
'2001-08-01'
),(
'0000-00-00'
);
INSERT
INTO
t1
(
d
)
VALUES
(
'2001-08-01'
),(
'0000-00-00'
);
SELECT
*
FROM
t1
LEFT
JOIN
t2
USING
(
d
)
WHERE
t2
.
d
IS
NULL
;
SELECT
*
FROM
t1
LEFT
JOIN
t2
USING
(
d
)
WHERE
t2
.
d
IS
NULL
;
SELECT
*
from
t1
WHERE
t1
.
d
IS
NULL
;
SELECT
*
from
t1
WHERE
t1
.
d
IS
NULL
;
SELECT
*
FROM
t1
WHERE
1
/
0
IS
NULL
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
#
#
...
...
sql/item_cmpfunc.cc
View file @
d025029d
...
@@ -1211,7 +1211,7 @@ longlong Item_func_isnull::val_int()
...
@@ -1211,7 +1211,7 @@ longlong Item_func_isnull::val_int()
This has to be here because of the test in update_used_tables().
This has to be here because of the test in update_used_tables().
*/
*/
if
(
!
used_tables_cache
)
if
(
!
used_tables_cache
)
return
0
;
return
cached_value
;
(
void
)
args
[
0
]
->
val
();
(
void
)
args
[
0
]
->
val
();
return
(
args
[
0
]
->
null_value
)
?
1
:
0
;
return
(
args
[
0
]
->
null_value
)
?
1
:
0
;
}
}
...
...
sql/item_cmpfunc.h
View file @
d025029d
...
@@ -429,6 +429,7 @@ class Item_func_in :public Item_int_func
...
@@ -429,6 +429,7 @@ class Item_func_in :public Item_int_func
class
Item_func_isnull
:
public
Item_bool_func
class
Item_func_isnull
:
public
Item_bool_func
{
{
longlong
cached_value
;
public:
public:
Item_func_isnull
(
Item
*
a
)
:
Item_bool_func
(
a
)
{}
Item_func_isnull
(
Item
*
a
)
:
Item_bool_func
(
a
)
{}
longlong
val_int
();
longlong
val_int
();
...
@@ -449,6 +450,12 @@ public:
...
@@ -449,6 +450,12 @@ public:
args
[
0
]
->
update_used_tables
();
args
[
0
]
->
update_used_tables
();
used_tables_cache
=
args
[
0
]
->
used_tables
();
used_tables_cache
=
args
[
0
]
->
used_tables
();
}
}
if
(
!
used_tables_cache
)
{
/* Remember if the value is always NULL or never NULL */
args
[
0
]
->
val
();
cached_value
=
args
[
0
]
->
null_value
?
(
longlong
)
1
:
(
longlong
)
0
;
}
}
}
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_NULL
;
}
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_NULL
;
}
};
};
...
...
sql/item_timefunc.h
View file @
d025029d
...
@@ -47,7 +47,7 @@ public:
...
@@ -47,7 +47,7 @@ public:
Item_func_to_days
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
Item_func_to_days
(
Item
*
a
)
:
Item_int_func
(
a
)
{}
longlong
val_int
();
longlong
val_int
();
const
char
*
func_name
()
const
{
return
"to_days"
;
}
const
char
*
func_name
()
const
{
return
"to_days"
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
6
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
6
;
maybe_null
=
1
;
}
};
};
...
...
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