1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#19021, Crash in ROR-index_merge optimizer:

get_best_covering_ror_intersect() was copying ror_scans starting from the 
end of the array and not from its beginning.


mysql-test/r/index_merge_innodb.result:
  Testcase for BUG#19021
mysql-test/t/index_merge_innodb.test:
  Testcase for BUG#19021
sql/opt_range.cc:
  BUG#19021: In get_best_covering_ror_intersect(), the array of pointers to
  scans to be used is [tree->ror_scans, ror_scan_mark), and not
  [ror_scan_mark, ...)
This commit is contained in:
unknown
2006-04-13 16:05:32 +04:00
parent 10633fd839
commit c89555edcc
3 changed files with 75 additions and 1 deletions

View File

@ -3176,7 +3176,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
sizeof(ROR_SCAN_INFO*)*
best_num)))
DBUG_RETURN(NULL);
memcpy(trp->first_scan, ror_scan_mark, best_num*sizeof(ROR_SCAN_INFO*));
memcpy(trp->first_scan, tree->ror_scans, best_num*sizeof(ROR_SCAN_INFO*));
trp->last_scan= trp->first_scan + best_num;
trp->is_covering= TRUE;
trp->read_cost= total_cost;