1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix handling of NULL fields in FIELD(). (Bug #10944)

mysql-test/r/func_str.result:
  Update results
mysql-test/t/func_str.test:
  Add regression tests
sql/item_func.cc:
  Handle NULL as first argument to FIELD()
This commit is contained in:
unknown
2005-06-01 09:48:25 -07:00
parent 853a55ad21
commit f20c56a9e7
3 changed files with 20 additions and 4 deletions

View File

@@ -521,3 +521,9 @@ SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id
DROP TABLE t1, t2;
#
# Bug #10944: Mishandling of NULL arguments in FIELD()
#
select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0);
select field(NULL,1,2,NULL), field(NULL,1,2,0);