mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
A fix and a test case for Bug#12713 "Error in a stored function called from
a SELECT doesn't cause ROLLBACK of statem". The idea of the fix is to ensure that we always commit the current statement at the end of dispatch_command(). In order to not issue redundant disc syncs, an optimization of the two-phase commit protocol is implemented to bypass the two phase commit if the transaction is read-only.
This commit is contained in:
@@ -264,7 +264,7 @@ const char *set_thd_proc_info(THD *thd, const char *info,
|
||||
extern "C"
|
||||
void **thd_ha_data(const THD *thd, const struct handlerton *hton)
|
||||
{
|
||||
return (void **) thd->ha_data + hton->slot;
|
||||
return (void **) &thd->ha_data[hton->slot].ha_ptr;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@@ -2513,7 +2513,7 @@ bool select_dumpvar::send_data(List<Item> &items)
|
||||
suv->update();
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(thd->is_error());
|
||||
}
|
||||
|
||||
bool select_dumpvar::send_eof()
|
||||
|
Reference in New Issue
Block a user