]> git.koha-community.org Git - koha.git/commit
Bug 8164: Replace IFNULL with COALESCE
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 23 Aug 2012 14:36:24 +0000 (16:36 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 29 Nov 2012 00:08:29 +0000 (19:08 -0500)
commit8dd92940bb8f3777f63cddf401e6fc01550173c7
tree96efab44409ecfff78d702f3bca8d35273f2881c
parent9aa1969a04f25e65264f4ef10bad4e3573a53f22
Bug 8164: Replace IFNULL with COALESCE

mysql> SELECT IFNULL(0, 123);
+----------------+
| IFNULL(0, 123) |
+----------------+
|              0 |
+----------------+
1 row in set (0.00 sec)

mysql> SELECT IFNULL(1, 123);
+----------------+
| IFNULL(1, 123) |
+----------------+
|              1 |
+----------------+
1 row in set (0.00 sec)

mysql> SELECT IFNULL(NULL, 123);
+-------------------+
| IFNULL(NULL, 123) |
+-------------------+
|               123 |
+-------------------+
1 row in set (0.00 sec)

mysql> SELECT COALESCE(0, 123);
+------------------+
| COALESCE(0, 123) |
+------------------+
|                0 |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT COALESCE(1, 123);
+------------------+
| COALESCE(1, 123) |
+------------------+
|                1 |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT COALESCE(NULL, 123);
+---------------------+
| COALESCE(NULL, 123) |
+---------------------+
|                 123 |
+---------------------+
1 row in set (0.00 sec)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Acquisition.pm
C4/Bookseller.pm
C4/VirtualShelves.pm