Bug #4575 DATABASE() IS NULL - always false
Submitted: 16 Jul 2004 13:15 Modified: 16 Jul 2004 13:15
Reporter: Sergei Golubchik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:
Assigned to: Sergei Golubchik CPU Architecture:Any

[16 Jul 2004 13:15] Sergei Golubchik
Description:
see synopsis or how to repeat

How to repeat:
mysql> select database();
+------------+
| database() |
+------------+
| NULL       |
+------------+
1 row in set (0.00 sec)

mysql> select database() is null;
+--------------------+
| database() is null |
+--------------------+
|                  0 |
+--------------------+
1 row in set (0.01 sec)

Suggested fix:
set Item_func_database::maybe_null to 1
[16 Jul 2004 13:15] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html