mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
MDEV-30263 Assertion failure in Protocol::end_statement upon HANDLER READ with invalid timestamp
Process save_in_field() return codes as in other places (<0 is real error)
This commit is contained in:
parent
d1f42fc80f
commit
271b73770c
3 changed files with 30 additions and 1 deletions
14
mysql-test/suite/handler/handler_warnings.result
Normal file
14
mysql-test/suite/handler/handler_warnings.result
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#
|
||||||
|
# MDEV-30263: --echo # Assertion failure in Protocol::end_statement
|
||||||
|
# upon HANDLER READ with invalid timestamp
|
||||||
|
#
|
||||||
|
CREATE TABLE t (a TIMESTAMP, KEY(a));
|
||||||
|
HANDLER t OPEN;
|
||||||
|
HANDLER t READ a > ('2022-12');
|
||||||
|
a
|
||||||
|
# above should issue the same warnings/errors as following
|
||||||
|
SELECT * from t WHERE t.a > ('2022-12');
|
||||||
|
a
|
||||||
|
HANDLER t CLOSE;
|
||||||
|
DROP TABLE t;
|
||||||
|
End of 10.5 tests
|
15
mysql-test/suite/handler/handler_warnings.test
Normal file
15
mysql-test/suite/handler/handler_warnings.test
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-30263: --echo # Assertion failure in Protocol::end_statement
|
||||||
|
--echo # upon HANDLER READ with invalid timestamp
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t (a TIMESTAMP, KEY(a));
|
||||||
|
HANDLER t OPEN;
|
||||||
|
HANDLER t READ a > ('2022-12');
|
||||||
|
--echo # above should issue the same warnings/errors as following
|
||||||
|
SELECT * from t WHERE t.a > ('2022-12');
|
||||||
|
# Cleanup
|
||||||
|
HANDLER t CLOSE;
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
--echo End of 10.5 tests
|
|
@ -700,7 +700,7 @@ mysql_ha_fix_cond_and_key(SQL_HANDLER *handler,
|
||||||
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->write_set);
|
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->write_set);
|
||||||
int res= 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);
|
dbug_tmp_restore_column_map(&table->write_set, old_map);
|
||||||
if (res)
|
if (res < 0 || thd->is_error())
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
key_len+= key_part->store_length;
|
key_len+= key_part->store_length;
|
||||||
|
|
Loading…
Add table
Reference in a new issue