Commit 9b2d3666 authored by Rucha Deodhar's avatar Rucha Deodhar

MDEV-20207: Assertion ! is_set() failed in Diagnostics_area::set_eof_status

upon HANDLER READ

Analysis: The error state is not stored while checking condition and key
name.
Fix: Return true while checking condition and key name if error is reported
because geometry object can't be created from the data in the index value
for HANDLER READ.
parent 25ccf8f6
......@@ -1845,3 +1845,19 @@ a b
HANDLER t1 CLOSE;
DROP TABLE t1;
End of 5.1 tests
#
# 10.2 Test
#
# MDEV-20207: Assertion `! is_set()' failed in
# Diagnostics_area::set_eof_status upon HANDLER READ
#
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
HANDLER h READ a = (0);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
HANDLER h CLOSE;
DROP TABLE t1;
# End of 10.2 Test
......@@ -80,3 +80,23 @@ HANDLER t1 CLOSE;
DROP TABLE t1;
--echo End of 5.1 tests
--echo #
--echo # 10.2 Test
--echo #
--echo # MDEV-20207: Assertion `! is_set()' failed in
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
--echo #
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
--error ER_CANT_CREATE_GEOMETRY_OBJECT
HANDLER h READ a = (0);
HANDLER h CLOSE;
DROP TABLE t1;
--echo # End of 10.2 Test
......@@ -1748,3 +1748,19 @@ HANDLER t1 READ `PRIMARY` PREV;
f1 f2
3 3
DROP TABLE t1;
#
# 10.2 Test
#
# MDEV-20207: Assertion `! is_set()' failed in
# Diagnostics_area::set_eof_status upon HANDLER READ
#
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
HANDLER h READ a = (0);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
HANDLER h CLOSE;
DROP TABLE t1;
# End of 10.2 Test
......@@ -31,3 +31,23 @@ HANDLER t1 OPEN;
HANDLER t1 READ FIRST WHERE f2 <= 1;
HANDLER t1 READ `PRIMARY` PREV;
DROP TABLE t1;
--echo #
--echo # 10.2 Test
--echo #
--echo # MDEV-20207: Assertion `! is_set()' failed in
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
--echo #
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
--error ER_CANT_CREATE_GEOMETRY_OBJECT
HANDLER h READ a = (0);
HANDLER h CLOSE;
DROP TABLE t1;
--echo # End of 10.2 Test
......@@ -312,3 +312,19 @@ Note 1050 Table 'v' already exists
handler v read next;
ERROR 42S02: Unknown table 'v' in HANDLER
drop view v;
#
# 10.2 Test
#
# MDEV-20207: Assertion `! is_set()' failed in
# Diagnostics_area::set_eof_status upon HANDLER READ
#
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
HANDLER h READ a = (0);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
HANDLER h CLOSE;
DROP TABLE t1;
# End of 10.2 Test
......@@ -354,3 +354,23 @@ execute stmt;
--error ER_UNKNOWN_TABLE
handler v read next;
drop view v;
--echo #
--echo # 10.2 Test
--echo #
--echo # MDEV-20207: Assertion `! is_set()' failed in
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
--echo #
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
--error ER_CANT_CREATE_GEOMETRY_OBJECT
HANDLER h READ a = (0);
HANDLER h CLOSE;
DROP TABLE t1;
--echo # End of 10.2 Test
......@@ -1931,3 +1931,17 @@ test.t1 preload_keys status OK
HANDLER t1 READ FIRST;
ERROR 42S02: Unknown table 't1' in HANDLER
End of 5.1 tests
#
# 10.2 Test
#
# MDEV-20207: Assertion `! is_set()' failed in
# Diagnostics_area::set_eof_status upon HANDLER READ
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
HANDLER h READ a = (0);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
HANDLER h CLOSE;
DROP TABLE t1;
# End of 10.2 Test
......@@ -169,3 +169,23 @@ HANDLER t1 READ FIRST;
--echo End of 5.1 tests
--echo #
--echo # 10.2 Test
--echo #
--echo # MDEV-20207: Assertion `! is_set()' failed in
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
--echo #
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a POINT, KEY(a));
HANDLER t1 OPEN h;
--error ER_CANT_CREATE_GEOMETRY_OBJECT
HANDLER h READ a = (0);
HANDLER h CLOSE;
DROP TABLE t1;
--echo # End of 10.2 Test
......@@ -613,8 +613,10 @@ mysql_ha_fix_cond_and_key(SQL_HANDLER *handler,
if (!in_prepare)
{
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->write_set);
(void) item->save_in_field(key_part->field, 1);
int res= item->save_in_field(key_part->field, 1);
dbug_tmp_restore_column_map(&table->write_set, old_map);
if (res)
return 1;
}
key_len+= key_part->store_length;
keypart_map= (keypart_map << 1) | 1;
......
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