diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-03-08 15:16:43 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-03-08 15:16:43 +0100 |
commit | 7dcc04ff485954664bb319161e2c48f9bfd8dca8 (patch) | |
tree | 34314505fab0333dfbd5509b798f9eacc2808fb7 | |
parent | 4268406d2acb13c40856f203e6da55f8285d222b (diff) | |
download | mariadb-git-bb-10.5-MDEV-20632-2.tar.gz |
Added blob testbb-10.5-MDEV-20632-2
-rw-r--r-- | mysql-test/main/cte_cycle.test | 15 | ||||
-rw-r--r-- | sql/sql_union.cc | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/mysql-test/main/cte_cycle.test b/mysql-test/main/cte_cycle.test index 9b3ce98c066..b1dadcbe8f2 100644 --- a/mysql-test/main/cte_cycle.test +++ b/mysql-test/main/cte_cycle.test @@ -83,3 +83,18 @@ drop view v1; drop table t1; + +--echo # +--echo # A simple blob case +--echo # + +create table t1 (a int, b text); +insert into t1 values (1, "a"); + +WITH RECURSIVE cte AS ( + SELECT a, b from t1 UNION ALL + SELECT a, b FROM cte WHERE a IS NOT NULL) + CYCLE b RESTRICT +SELECT * FROM cte; + +drop table t1; diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 2cdbabc08e8..f8025cdf701 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -257,7 +257,8 @@ int select_union_recursive::send_data(List<Item> &values) write_err != HA_ERR_FOUND_DUPP_UNIQUE) { int err; - DBUG_ASSERT(incr_table->s->reclength == table->s->reclength); + DBUG_ASSERT(incr_table->s->reclength == table->s->reclength || + incr_table->s->reclength == table->s->reclength - MARIA_UNIQUE_HASH_LENGTH); if ((err= incr_table->file->ha_write_tmp_row(table->record[0]))) { bool is_duplicate; |