Commit 56b3bc32 authored by unknown's avatar unknown
Browse files

bug#24303 Wrong result for UPDATE IGNORE for NDB table: Refinement, only read...

bug#24303  Wrong result for UPDATE IGNORE for NDB table: Refinement, only read all fields for UPDATE IGNORE with pk (check if UPDATE command and pk in write_set)


parent a25410c3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -3835,10 +3835,13 @@ int ha_ndbcluster::extra(enum ha_extra_function operation)
    DBUG_PRINT("info", ("HA_EXTRA_IGNORE_DUP_KEY"));
    DBUG_PRINT("info", ("Ignoring duplicate key"));
    m_ignore_dup_key= TRUE;
    if (table_share->primary_key != MAX_KEY)
    if (current_thd->lex->sql_command == SQLCOM_UPDATE &&
	table_share->primary_key != MAX_KEY &&
	bitmap_is_set(table->write_set, table_share->primary_key))
    {
      /*
	Table has a primary key
	An UPDATE and table has a primary key that is 
	about to be updated
	We need to read all fields for UPDATE IGNORE of pk
	since this is implemented as delete+insert
      */