summaryrefslogtreecommitdiff
path: root/sql/transaction.h
diff options
context:
space:
mode:
authorArun Kuruvila <arun.kuruvila@oracle.com>2013-12-30 11:39:55 +0530
committerArun Kuruvila <arun.kuruvila@oracle.com>2013-12-30 11:39:55 +0530
commit51519388f17c213e5247c17cdecf7a0d5ec3ac3a (patch)
tree20e07dc02e20e4b09464bf1a22205d88d556c228 /sql/transaction.h
parent96ae8409e1d8a67b4011b55a7b2ec5ae0342f91a (diff)
downloadmariadb-git-51519388f17c213e5247c17cdecf7a0d5ec3ac3a.tar.gz
Bug #16324629 : SERVER CRASHES ON UPDATE/JOIN FEDERATED +
LOCAL TABLE WHEN ONLY 1 LOCAL ROW Description: When updating a federated table with UPDATE... JOIN, the server consistently crashes with Signal 11 when only 1 row exists in the local table involved in the join and that 1 row can be joined with a row in the federated table. Analysis: Interaction between the federated engine and the optimizer results in the crash. In our scenario, ie, local table having only one row, the program is following a different path because the table is treated as a constant table by the join optimizer. So in this scenario "index_read()" is happening in the prepare phase, since optimizer plan is different for constant table joins. In this case, "index_read_idx_map()" (inside handler.cc) is calling "index_read()" and inside "index_read()", matching rows are fetched and "stored_result" gets populated by calling "store_result()". And just after "index_read()", "index_end()" function is called. And in the "index_end()", its freeing the "stored_result" by calling "free_result()". So when it reaches the execution phase, in "position()" function, we are getting assertion at "DBUG_ASSERT(stored_result);". In all other scenarios (ie, table with more than 1 row), optimizer plan is different and "index_read()" is happening in the execution phase. Fix: So my fix is to have a separate ha_federated member function for "index_read_idx_map()" which will handle federated engine separately. So that position() will be called before index_end() call in constant table scenario.
Diffstat (limited to 'sql/transaction.h')
0 files changed, 0 insertions, 0 deletions