summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-08-16 20:58:14 +0400
committerAlexander Barkov <bar@mariadb.com>2019-08-16 20:58:14 +0400
commitf987de7122b8bd72b758cb8e172bec1ff5f7124b (patch)
tree916212ad16a941791c4a8bd4bbe59ada34207ad2 /mysql-test
parentecdacf7264eecb520657ef9ed42021bcc0bcad06 (diff)
parentec1f195ecf797fc5f37b0cfdbe4ee76d71a96729 (diff)
downloadmariadb-git-f987de7122b8bd72b758cb8e172bec1ff5f7124b.tar.gz
Merge remote-tracking branch 'origin/5.5' into 10.1
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/type_int.result24
-rw-r--r--mysql-test/t/type_int.test21
2 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/r/type_int.result b/mysql-test/r/type_int.result
index 4e7b928ac07..1364f58169e 100644
--- a/mysql-test/r/type_int.result
+++ b/mysql-test/r/type_int.result
@@ -1,4 +1,28 @@
#
+# 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
+#
+#
# Start of 10.1 tests
#
#
diff --git a/mysql-test/t/type_int.test b/mysql-test/t/type_int.test
index e8b9b2cffcd..8eba40c7e32 100644
--- a/mysql-test/t/type_int.test
+++ b/mysql-test/t/type_int.test
@@ -1,4 +1,25 @@
--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 #
+
+
+--echo #
--echo # Start of 10.1 tests
--echo #