perl_dbi_nulls_test.pl
"Christian Metzger" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <trinity-67c344d4-0650-441c-84e3-9a5a3bf2ca81-1404887767507@3capp-webde-bs32> |
DBI VERSION: 1.616 DBD::mysql VERSION: 4.027 Using connect arguments, db version: 5.5.37-MariaDB-wsrep => Drop table 'dbi__null_test_tmp', if it already exists... => Create table 'dbi__null_test_tmp'... => Insert 4 rows into the table... Inserting values (1, 'Homer') Inserting values (2, NULL) Inserting values (3, 'Marge') Inserting values (4, NULL) => Testing clause style 0: WHERE mycol = ?... Selecting row with Marge Selecting rows with NULL => WHERE clause style 0 returned incorrect results. Non-NULL test rows returned these row ids: 3 The NULL test rows returned these row ids: => Testing clause style 1: WHERE NVL(mycol, '-') = NVL(?, '-')... Selecting row with Marge DBD::mysql::st execute failed: FUNCTION test.NVL does not exist at ./dbi_nulls_test.pl line 123. => Testing clause style 2: WHERE ISNULL(mycol, '-') = ISNULL(?, '-')... Selecting row with Marge DBD::mysql::st execute failed: Incorrect parameter count in the call to native function 'ISNULL' at ./dbi_nulls_test.pl line 123. => Testing clause style 3: WHERE DECODE(mycol, ?, 1, 0) = 1... Selecting row with Marge DBD::mysql::st execute failed: Incorrect parameter count in the call to native function 'DECODE' at ./dbi_nulls_test.pl line 123. => Testing clause style 4: WHERE mycol = ? OR (mycol IS NULL AND ? IS NULL)... Selecting row with Marge Selecting rows with NULL => WHERE clause style 4 is supported. => Testing clause style 5: WHERE mycol = ? OR (mycol IS NULL AND SP_ISNULL(?) = 1)... Selecting row with Marge DBD::mysql::st execute failed: FUNCTION test.SP_ISNULL does not exist at ./dbi_nulls_test.pl line 123. => Testing clause style 6: WHERE mycol = ? OR (mycol IS NULL AND ? = 1)... Selecting row with Marge Selecting rows with NULL => WHERE clause style 6 is supported. ------------------------------------------------------------------------ 2 styles are supported: Style 4: WHERE mycol = ? OR (mycol IS NULL AND ? IS NULL) Style 6: WHERE mycol = ? OR (mycol IS NULL AND ? = 1) ------------------------------------------------------------------------