From 4643820397ae1ac92e8112b17e258e41d8ff7009 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Apr 2003 18:42:43 +0300 Subject: ha_innodb.h, ha_innodb.cc: Make InnoDB to restore old active_index value after a table scan: MySQL may assume that a scan does NOT change active_index; this partially fixes bug 241 of UPDATE ... ORDER BY ... but it still remains that MySQL actually ignores the ORDER BY for both MyISAM and InnoDB tables log0recv.c: Use fflush to make sure report of a corrupt log record is printed to .err log before mysqld crashes innobase/log/log0recv.c: Use fflush to make sure report of a corrupt log record is printed to .err log before mysqld crashes sql/ha_innodb.cc: Make InnoDB to restore old active_index value after a table scan: MySQL may assume that a scan does NOT change active_index; this partially fixes bug 241 of UPDATE ... ORDER BY ... but it still remains that MySQL actually ignores the ORDER BY for both MyISAM and InnoDB tables sql/ha_innodb.h: Make InnoDB to restore old active_index value after a table scan: MySQL may assume that a scan does NOT change active_index; this partially fixes bug 241 of UPDATE ... ORDER BY ... but it still remains that MySQL actually ignores the ORDER BY for both MyISAM and InnoDB tables --- sql/ha_innodb.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sql/ha_innodb.h') diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h index 8031fa0aa29..08eeac6baeb 100644 --- a/sql/ha_innodb.h +++ b/sql/ha_innodb.h @@ -58,7 +58,15 @@ class ha_innobase: public handler ulong start_of_scan; /* this is set to 1 when we are starting a table scan but have not yet fetched any row, else 0 */ - + uint active_index_before_scan; + /* since a table scan in InnoDB is + always done through an index, a table + scan may change active_index; but + MySQL may assume that active_index + after a table scan is the same as + before; we store the value here so + that we can restore the value after + a scan */ uint last_match_mode;/* match mode of the latest search: ROW_SEL_EXACT, ROW_SEL_EXACT_PREFIX, or undefined */ -- cgit v1.2.1