From 6608e22d9ceb67fe39879f7cf08cfbd9c05591f5 Mon Sep 17 00:00:00 2001
From: unknown <bar@mysql.com>
Date: Fri, 5 Nov 2004 14:07:12 +0400
Subject: [PATCH] user_var.result, user_var.test:   My previous change that
 "set @a=NULL" doesn't change charset   fixed 'Bug #6321' as well. Prove with
 a new test that   FIELD(<uservariable content NULL>, ...) now works fine too.

mysql-test/t/user_var.test:
  My previous change that "set @a=NULL" doesn't change charset
  fixed 'Bug #6321' as well. Prove with a new test that
  FIELD(<uservariable content NULL>, ...) now works fine too.
mysql-test/r/user_var.result:
  My previous change that "set @a=NULL" doesn't change charset
  fixed 'Bug #6321' as well. Prove with a new test that
  FIELD(<uservariable content NULL>, ...) now works fine too.
---
 mysql-test/r/user_var.result | 4 ++++
 mysql-test/t/user_var.test   | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 2750478c1c..659c392e15 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -195,3 +195,7 @@ SET @`v`:=_ucs2 0x006100620063 COLLATE ucs2_general_ci;
 SET TIMESTAMP=10000;
 insert into t2 values (@v);
 drop table t1, t2;
+set @var= NULL ;
+select FIELD( @var,'1it','Hit') as my_column;
+my_column
+0
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index 601724e68c..3816af42c5 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -120,3 +120,9 @@ show binlog events from 79;
 drop table t1, t2;
 
 
+#
+# Bug #6321 strange error:
+#   string function FIELD(<uservariable content NULL>, ...)
+#
+set @var= NULL ;
+select FIELD( @var,'1it','Hit') as my_column;
-- 
2.30.9