1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-3777 Cleanup left-over values from a previously failed insert.

This commit is contained in:
Gagan Goel
2020-03-05 02:26:58 +00:00
parent 7558171ee1
commit b5373d227a
3 changed files with 8 additions and 3 deletions

View File

@ -2990,7 +2990,7 @@ int ha_mcs_impl_delete_table(const char* name)
int rc = ha_mcs_impl_delete_table_(dbName, name, *ci);
return rc;
}
int ha_mcs_impl_write_row(const uchar* buf, TABLE* table)
int ha_mcs_impl_write_row(const uchar* buf, TABLE* table, uint64_t rows_changed)
{
THD* thd = current_thd;
// Error out INSERT on VIEW. It's currently not supported.
@ -3015,6 +3015,11 @@ int ha_mcs_impl_write_row(const uchar* buf, TABLE* table)
cal_connection_info* ci = reinterpret_cast<cal_connection_info*>(get_fe_conn_info_ptr());
// At the beginning of insert, make sure there are no
// left-over values from a previously possibly failed insert.
if (rows_changed == 0)
ci->tableValuesMap.clear();
if (thd->slave_thread && !get_replication_slave(thd))
return 0;