• unknown's avatar
    Fix for bug#18437 "Wrong values inserted with a before update trigger on · ac957070
    unknown authored
    NDB table".
    
    SQL-layer was not marking fields which were used in triggers as such. As
    result these fields were not always properly retrieved/stored by handler
    layer. So one might got wrong values or lost changes in triggers for NDB,
    Federated and possibly InnoDB tables.
    This fix solves the problem by marking fields used in triggers
    appropriately.
    
    Also this patch contains the following cleanup of ha_ndbcluster code:
    
    We no longer rely on reading LEX::sql_command value in handler in order
    to determine if we can enable optimization which allows us to handle REPLACE
    statement in more efficient way by doing replaces directly in write_row()
    method without reporting error to SQL-layer.
    Instead we rely on SQL-layer informing us whether this optimization
    applicable by calling handler::extra() method with
    HA_EXTRA_WRITE_CAN_REPLACE flag.
    As result we no longer apply this optimzation in cases when it should not
    be used (e.g. if we have on delet...
    ac957070
sql_load.cc 35.4 KB