diff options
author | Timothy Smith <timothy.smith@sun.com> | 2008-08-20 16:18:33 -0600 |
---|---|---|
committer | Timothy Smith <timothy.smith@sun.com> | 2008-08-20 16:18:33 -0600 |
commit | 9eb2ebd4d1584bc2a297c7172666f9550a0ecfdb (patch) | |
tree | 7b36e428d5318b8a5aab2120ccd83b5a7746aaf4 /storage/innobase/ha | |
parent | c8fad67da792333af8cbc6b659dffa6d742f35a3 (diff) | |
download | mariadb-git-9eb2ebd4d1584bc2a297c7172666f9550a0ecfdb.tar.gz |
Cherry-pick some changes from innodb-5.1-ss2545 snapshot. Includes fixes for
Bug#37531, Bug#36941, Bug#36941, Bug#36942, Bug#38185.
Also include test case from Bug 34300 which was left out from earlier snapshot
(5.1-ss2387).
Also include fix for Bug #29507, "TRUNCATE shows to many rows effected", since
the fix for Bug 37531 depends on it.
Diffstat (limited to 'storage/innobase/ha')
-rw-r--r-- | storage/innobase/ha/ha0ha.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/storage/innobase/ha/ha0ha.c b/storage/innobase/ha/ha0ha.c index 7f241140050..077497493b4 100644 --- a/storage/innobase/ha/ha0ha.c +++ b/storage/innobase/ha/ha0ha.c @@ -331,11 +331,20 @@ ha_print_info( FILE* file, /* in: file where to print */ hash_table_t* table) /* in: hash table */ { +#ifdef UNIV_DEBUG +/* Some of the code here is disabled for performance reasons in production +builds, see http://bugs.mysql.com/36941 */ +#define PRINT_USED_CELLS +#endif /* UNIV_DEBUG */ + +#ifdef PRINT_USED_CELLS hash_cell_t* cell; ulint cells = 0; - ulint n_bufs; ulint i; +#endif /* PRINT_USED_CELLS */ + ulint n_bufs; +#ifdef PRINT_USED_CELLS for (i = 0; i < hash_get_n_cells(table); i++) { cell = hash_get_nth_cell(table, i); @@ -345,10 +354,14 @@ ha_print_info( cells++; } } +#endif /* PRINT_USED_CELLS */ + + fprintf(file, "Hash table size %lu", + (ulong) hash_get_n_cells(table)); - fprintf(file, - "Hash table size %lu, used cells %lu", - (ulong) hash_get_n_cells(table), (ulong) cells); +#ifdef PRINT_USED_CELLS + fprintf(file, ", used cells %lu", (ulong) cells); +#endif /* PRINT_USED_CELLS */ if (table->heaps == NULL && table->heap != NULL) { |