MDEV-19365 Assertion failure in LONG Unique after 10.3 merge
If handler->inited is RND use cloned handler for long unique duplicate search.
This commit is contained in:
parent
d18ef804bb
commit
27980b0f83
@ -6500,8 +6500,7 @@ static int check_duplicate_long_entries_update(TABLE *table, handler *h, uchar *
|
|||||||
with respect to fields in hash_str
|
with respect to fields in hash_str
|
||||||
*/
|
*/
|
||||||
uint reclength= (uint) (table->record[1] - table->record[0]);
|
uint reclength= (uint) (table->record[1] - table->record[0]);
|
||||||
if (!table->update_handler)
|
table->clone_handler_for_update();
|
||||||
table->clone_handler_for_update();
|
|
||||||
for (uint i= 0; i < table->s->keys; i++)
|
for (uint i= 0; i < table->s->keys; i++)
|
||||||
{
|
{
|
||||||
keyinfo= table->key_info + i;
|
keyinfo= table->key_info + i;
|
||||||
@ -6546,6 +6545,8 @@ int handler::ha_write_row(uchar *buf)
|
|||||||
|
|
||||||
if (table->s->long_unique_table)
|
if (table->s->long_unique_table)
|
||||||
{
|
{
|
||||||
|
if (this->inited == RND)
|
||||||
|
table->clone_handler_for_update();
|
||||||
handler *h= table->update_handler ? table->update_handler : table->file;
|
handler *h= table->update_handler ? table->update_handler : table->file;
|
||||||
if ((error= check_duplicate_long_entries(table, h, buf)))
|
if ((error= check_duplicate_long_entries(table, h, buf)))
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
|
@ -9014,6 +9014,8 @@ void re_setup_keyinfo_hash(KEY *key_info)
|
|||||||
*/
|
*/
|
||||||
void TABLE::clone_handler_for_update()
|
void TABLE::clone_handler_for_update()
|
||||||
{
|
{
|
||||||
|
if (this->update_handler)
|
||||||
|
return;
|
||||||
handler *update_handler= NULL;
|
handler *update_handler= NULL;
|
||||||
if (!s->long_unique_table)
|
if (!s->long_unique_table)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user