summaryrefslogtreecommitdiff
path: root/storage/innobase/handler
diff options
context:
space:
mode:
authorTimothy Smith <timothy.smith@sun.com>2009-01-12 23:28:56 +0100
committerTimothy Smith <timothy.smith@sun.com>2009-01-12 23:28:56 +0100
commit9eddf5762ccdad9a11d2c8ebaeba2dca1d78a583 (patch)
treeb97417beb4eea92504d9c1b03c019a8d31a72713 /storage/innobase/handler
parent897d00ce89e6eb2ef9c0f1688ccc6e4498527fd0 (diff)
downloadmariadb-git-9eddf5762ccdad9a11d2c8ebaeba2dca1d78a583.tar.gz
Applying InnoDB snapshot innodb-5.1-ss3603
Detailed description of changes: r2981 | marko | 2008-11-07 14:54:10 +0200 (Fri, 07 Nov 2008) | 6 lines branches/5.1: row_mysql_store_col_in_innobase_format(): Correct a misleading comment. In the UTF-8 encoding, ASCII takes 1 byte per character, while the "latin1" character set (normally ISO-8859-1, but in MySQL it actually refers to the Windows Code Page 1252 a.k.a. CP1252, WinLatin1) takes 1 to 3 bytes (1 to 2 bytes for the ISO-8859-1 subset). r3114 | calvin | 2008-11-14 20:31:48 +0200 (Fri, 14 Nov 2008) | 8 lines branches/5.1: fix bug#40386: Not flushing query cache after truncate ha_statistics.records can not be 0 unless the table is empty, set to 1 instead. The original problem of bug 29507 is fixed in the server. Additional test was done with the fix of bug 29507 in the server. Approved by: Heikki (on IM)
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r--storage/innobase/handler/ha_innodb.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 03098861ecd..1fda1fe49df 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -6022,11 +6022,13 @@ ha_innobase::info(
n_rows++;
}
- /* Fix bug#29507: TRUNCATE shows too many rows affected.
- Do not show the estimates for TRUNCATE command. */
+ /* Fix bug#40386: Not flushing query cache after truncate.
+ n_rows can not be 0 unless the table is empty, set to 1
+ instead. The original problem of bug#29507 is actually
+ fixed in the server code. */
if (thd_sql_command(user_thd) == SQLCOM_TRUNCATE) {
- n_rows = 0;
+ n_rows = 1;
/* We need to reset the prebuilt value too, otherwise
checks for values greater than the last value written