1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -783,3 +783,9 @@ id aes_decrypt(str, 'bar')
1 foo
2 NULL
DROP TABLE t1, t2;
select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0);
field(0,NULL,1,0) field("",NULL,"bar","") field(0.0,NULL,1.0,0.0)
3 3 3
select field(NULL,1,2,NULL), field(NULL,1,2,0);
field(NULL,1,2,NULL) field(NULL,1,2,0)
0 0