summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-08-16 14:32:44 +0400
committerAlexander Barkov <bar@mariadb.com>2019-08-16 14:32:44 +0400
commitec1f195ecf797fc5f37b0cfdbe4ee76d71a96729 (patch)
tree2b487e18e950607ee87d0168ac086bffb1eaa57d /mysql-test
parent1217e4a0c05eff7a394e46e64dffc849c9edda22 (diff)
downloadmariadb-git-ec1f195ecf797fc5f37b0cfdbe4ee76d71a96729.tar.gz
MDEV-15955 Assertion `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_LONGLONG' failed in Protocol_text::store_longlong
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/type_int.result24
-rw-r--r--mysql-test/t/type_int.test19
2 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/r/type_int.result b/mysql-test/r/type_int.result
new file mode 100644
index 00000000000..aaf35690306
--- /dev/null
+++ b/mysql-test/r/type_int.result
@@ -0,0 +1,24 @@
+#
+# Start of 5.5 tests
+#
+#
+# MDEV-15955 Assertion `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_LONGLONG' failed in Protocol_text::store_longlong
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT @a := 1 FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+@a := 1
+1
+SELECT COALESCE(1) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+COALESCE(1)
+1
+SELECT COALESCE(@a:=1) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+COALESCE(@a:=1)
+1
+SELECT COALESCE(@a) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+COALESCE(@a)
+1
+DROP TABLE t1;
+#
+# End of 5.5 tests
+#
diff --git a/mysql-test/t/type_int.test b/mysql-test/t/type_int.test
new file mode 100644
index 00000000000..52be12bf494
--- /dev/null
+++ b/mysql-test/t/type_int.test
@@ -0,0 +1,19 @@
+--echo #
+--echo # Start of 5.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-15955 Assertion `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_LONGLONG' failed in Protocol_text::store_longlong
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT @a := 1 FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+SELECT COALESCE(1) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+SELECT COALESCE(@a:=1) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+SELECT COALESCE(@a) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar');
+DROP TABLE t1;
+
+--echo #
+--echo # End of 5.5 tests
+--echo #