Commit d7a484b0 authored by Eugene Kosov's avatar Eugene Kosov Committed by GitHub

SQL: segfault after make_select() in VTMD

parent 1d056f5a
...@@ -354,6 +354,10 @@ u0_vtmd ...@@ -354,6 +354,10 @@ u0_vtmd
u0_vtmd_vtmd u0_vtmd_vtmd
Warnings: Warnings:
Warning 4088 Table `test.u0_vtmd` is not a VTMD table Warning 4088 Table `test.u0_vtmd` is not a VTMD table
set versioning_alter_history= survive;
create or replace table t (x int) with system versioning;
select * from t for system_time all;
x sys_trx_start sys_trx_end
drop database db0; drop database db0;
drop database db1; drop database db1;
drop database test; drop database test;
......
...@@ -193,6 +193,10 @@ set versioning_hide= auto; ...@@ -193,6 +193,10 @@ set versioning_hide= auto;
create or replace table u0_vtmd (x int) with system versioning; create or replace table u0_vtmd (x int) with system versioning;
show tables; show tables;
set versioning_alter_history= survive;
create or replace table t (x int) with system versioning;
select * from t for system_time all;
drop database db0; drop database db0;
drop database db1; drop database db1;
drop database test; drop database test;
......
...@@ -547,7 +547,7 @@ VTMD_table::find_archive_name(THD *thd, String &out) ...@@ -547,7 +547,7 @@ VTMD_table::find_archive_name(THD *thd, String &out)
while (!(error= info.read_record(&info)) && !thd->killed && !thd->is_error()) while (!(error= info.read_record(&info)) && !thd->killed && !thd->is_error())
{ {
if (select->skip_record(thd) > 0) if (!select || select->skip_record(thd) > 0)
{ {
vtmd.table->field[FLD_ARCHIVE_NAME]->val_str(&out); vtmd.table->field[FLD_ARCHIVE_NAME]->val_str(&out);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment