summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_if.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/func_if.result')
-rw-r--r--mysql-test/r/func_if.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result
index c7f548ae2bc..61f63cc7253 100644
--- a/mysql-test/r/func_if.result
+++ b/mysql-test/r/func_if.result
@@ -234,3 +234,20 @@ SELECT if(1, NULL, (SELECT min('hello')));
if(1, NULL, (SELECT min('hello')))
NULL
End of 5.2 tests
+#
+# MDEV-8663: IF Statement returns multiple values erroneously
+# (or Assertion `!null_value' failed in Item::send(Protocol*, String*)
+#
+CREATE TABLE `t1` (
+`datas` VARCHAR(25) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1266 Using storage engine MyISAM for table 't1'
+INSERT INTO `t1` VALUES ('1,2'), ('2,3'), ('3,4');
+SELECT IF(FIND_IN_SET('1', `datas`), 1.5, IF(FIND_IN_SET('2', `datas`), 2, NULL)) AS `First`, '1' AS `Second`, '2' AS `Third` FROM `t1`;
+First Second Third
+1.5 1 2
+2.0 1 2
+NULL 1 2
+drop table t1;