1 diff -ruN a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
2 --- a/innobase/btr/btr0sea.c 2009-08-27 18:42:17.000000000 +0900
3 +++ b/innobase/btr/btr0sea.c 2009-08-27 18:43:11.000000000 +0900
4 @@ -1077,6 +1077,124 @@
7 /************************************************************************
8 +Drops a page hash index based on index */
11 +btr_search_drop_page_hash_index_on_index(
12 +/*=====================================*/
13 + dict_index_t* index) /* in: record descriptor */
16 + hash_table_t* table;
28 + mem_heap_t* heap = NULL;
31 + rw_lock_x_lock(&btr_search_latch);
32 + mutex_enter(&buf_pool->mutex);
34 + table = btr_search_sys->hash_index;
36 + block = UT_LIST_GET_LAST(buf_pool->LRU);
38 + while (block != NULL) {
39 + if (block->index == index && block->is_hashed) {
40 + page = block->frame;
42 + /* from btr_search_drop_page_hash_index() */
43 + n_fields = block->curr_n_fields;
44 + n_bytes = block->curr_n_bytes;
46 + ut_a(n_fields + n_bytes > 0);
48 + n_recs = page_get_n_recs(page);
50 + /* Calculate and cache fold values into an array for fast deletion
51 + from the hash index */
53 + folds = mem_alloc(n_recs * sizeof(ulint));
57 + rec = page_get_infimum_rec(page);
58 + rec = page_rec_get_next(rec);
60 + tree_id = btr_page_get_index_id(page);
62 + ut_a(0 == ut_dulint_cmp(tree_id, index->id));
68 + while (!page_rec_is_supremum(rec)) {
69 + /* FIXME: in a mixed tree, not all records may have enough
71 + offsets = rec_get_offsets(rec, index, offsets,
72 + n_fields + (n_bytes > 0), &heap);
73 + ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0));
74 + fold = rec_fold(rec, offsets, n_fields, n_bytes, tree_id);
76 + if (fold == prev_fold && prev_fold != 0) {
81 + /* Remove all hash nodes pointing to this page from the
84 + folds[n_cached] = fold;
87 + rec = page_rec_get_next(rec);
91 + for (i = 0; i < n_cached; i++) {
93 + ha_remove_all_nodes_to_page(table, folds[i], page);
96 + ut_a(index->search_info->ref_count > 0);
97 + index->search_info->ref_count--;
99 + block->is_hashed = FALSE;
100 + block->index = NULL;
102 + if (UNIV_UNLIKELY(block->n_pointers)) {
104 + ut_print_timestamp(stderr);
106 +" InnoDB: Corruption of adaptive hash index. After dropping\n"
107 +"InnoDB: the hash index to a page of %s, still %lu hash nodes remain.\n",
108 + index->name, (ulong) block->n_pointers);
114 + block = UT_LIST_GET_PREV(LRU, block);
117 + mutex_exit(&buf_pool->mutex);
118 + rw_lock_x_unlock(&btr_search_latch);
120 + if (UNIV_LIKELY_NULL(heap)) {
121 + mem_heap_free(heap);
125 +/************************************************************************
126 Drops a page hash index when a page is freed from a fseg to the file system.
127 Drops possible hash index if the page happens to be in the buffer pool. */
129 diff -ruN a/innobase/dict/dict0boot.c b/innobase/dict/dict0boot.c
130 --- a/innobase/dict/dict0boot.c 2009-07-07 21:53:58.000000000 +0900
131 +++ b/innobase/dict/dict0boot.c 2009-08-27 18:42:59.000000000 +0900
134 /*-------------------------*/
135 table = dict_mem_table_create("SYS_TABLES", DICT_HDR_SPACE, 8, FALSE);
136 + table->n_mysql_handles_opened = 1; /* for pin */
138 dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0, 0);
139 dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0, 0);
142 /*-------------------------*/
143 table = dict_mem_table_create("SYS_COLUMNS", DICT_HDR_SPACE, 7, FALSE);
144 + table->n_mysql_handles_opened = 1; /* for pin */
146 dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY,0,0,0);
147 dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4, 0);
150 /*-------------------------*/
151 table = dict_mem_table_create("SYS_INDEXES", DICT_HDR_SPACE, 7, FALSE);
152 + table->n_mysql_handles_opened = 1; /* for pin */
154 dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY, 0,0,0);
155 dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0, 0);
158 /*-------------------------*/
159 table = dict_mem_table_create("SYS_FIELDS", DICT_HDR_SPACE, 3, FALSE);
160 + table->n_mysql_handles_opened = 1; /* for pin */
162 dict_mem_table_add_col(table, "INDEX_ID", DATA_BINARY, 0,0,0);
163 dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4, 0);
164 diff -ruN a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c
165 --- a/innobase/dict/dict0crea.c 2009-07-07 21:53:58.000000000 +0900
166 +++ b/innobase/dict/dict0crea.c 2009-08-27 18:42:59.000000000 +0900
167 @@ -1178,6 +1178,9 @@
168 /* Foreign constraint system tables have already been
169 created, and they are ok */
171 + table1->n_mysql_handles_opened = 1; /* for pin */
172 + table2->n_mysql_handles_opened = 1; /* for pin */
174 mutex_exit(&(dict_sys->mutex));
177 @@ -1267,6 +1270,11 @@
181 + table1 = dict_table_get_low("SYS_FOREIGN");
182 + table2 = dict_table_get_low("SYS_FOREIGN_COLS");
183 + table1->n_mysql_handles_opened = 1; /* for pin */
184 + table2->n_mysql_handles_opened = 1; /* for pin */
186 row_mysql_unlock_data_dictionary(trx);
188 trx_free_for_mysql(trx);
189 diff -ruN a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
190 --- a/innobase/dict/dict0dict.c 2009-07-07 21:53:58.000000000 +0900
191 +++ b/innobase/dict/dict0dict.c 2009-08-27 18:43:11.000000000 +0900
193 mutex_enter(&(dict_sys->mutex));
195 table = dict_table_get_on_id_low(table_id, trx);
197 + dict_table_LRU_trim(table);
199 mutex_exit(&(dict_sys->mutex));
203 table = dict_table_get_low(table_name);
205 + dict_table_LRU_trim(table);
207 mutex_exit(&(dict_sys->mutex));
211 table->n_mysql_handles_opened++;
214 + dict_table_LRU_trim(table);
216 mutex_exit(&(dict_sys->mutex));
219 @@ -1267,20 +1273,64 @@
220 too much space. Currently not used! */
223 -dict_table_LRU_trim(void)
224 -/*=====================*/
225 +dict_table_LRU_trim(
226 +/*================*/
227 + dict_table_t* self)
230 dict_table_t* prev_table;
231 + dict_foreign_t* foreign;
233 + ulint n_have_parent;
234 + ulint cached_foreign_tables;
239 #ifdef UNIV_SYNC_DEBUG
240 ut_ad(mutex_own(&(dict_sys->mutex)));
241 #endif /* UNIV_SYNC_DEBUG */
244 + n_removed = n_have_parent = 0;
245 table = UT_LIST_GET_LAST(dict_sys->table_LRU);
247 + while ( srv_dict_size_limit && table
248 + && ((dict_sys->table_hash->n_cells
249 + + dict_sys->table_id_hash->n_cells
250 + + dict_sys->col_hash->n_cells) * sizeof(hash_cell_t)
251 + + dict_sys->size) > srv_dict_size_limit ) {
252 + prev_table = UT_LIST_GET_PREV(table_LRU, table);
254 + if (table == self || table->n_mysql_handles_opened)
257 + cached_foreign_tables = 0;
258 + foreign = UT_LIST_GET_FIRST(table->foreign_list);
259 + while (foreign != NULL) {
260 + if (foreign->referenced_table)
261 + cached_foreign_tables++;
262 + foreign = UT_LIST_GET_NEXT(foreign_list, foreign);
265 + /* TODO: use table->mem_fix also, if it becomes exact. */
267 + if (cached_foreign_tables == 0) {
268 + dict_table_remove_from_cache(table);
274 + table = prev_table;
277 + if ( srv_dict_size_limit && n_have_parent && n_removed
278 + && ((dict_sys->table_hash->n_cells
279 + + dict_sys->table_id_hash->n_cells
280 + + dict_sys->col_hash->n_cells) * sizeof(hash_cell_t)
281 + + dict_sys->size) > srv_dict_size_limit )
284 while (table && (dict_sys->size >
285 buf_pool_get_max_size() / DICT_POOL_PER_VARYING)) {
287 @@ -1292,6 +1342,7 @@
294 /**************************************************************************
295 @@ -1565,6 +1616,10 @@
296 #ifdef UNIV_SYNC_DEBUG
297 ut_ad(mutex_own(&(dict_sys->mutex)));
298 #endif /* UNIV_SYNC_DEBUG */
299 + /* remove all entry of the index from adaptive hash index,
300 + because removing from adaptive hash index needs dict_index */
301 + if (srv_use_adaptive_hash_indexes && srv_dict_size_limit)
302 + btr_search_drop_page_hash_index_on_index(index);
304 /* We always create search info whether or not adaptive
305 hash index is enabled or not. */
306 diff -ruN a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
307 --- a/innobase/ibuf/ibuf0ibuf.c 2009-08-27 18:42:17.000000000 +0900
308 +++ b/innobase/ibuf/ibuf0ibuf.c 2009-08-27 18:42:59.000000000 +0900
310 sprintf(buf, "SYS_IBUF_TABLE_%lu", (ulong) space);
311 /* use old-style record format for the insert buffer */
312 table = dict_mem_table_create(buf, space, 2, FALSE);
313 + table->n_mysql_handles_opened = 1; /* for pin */
315 dict_mem_table_add_col(table, "PAGE_NO", DATA_BINARY, 0, 0, 0);
316 dict_mem_table_add_col(table, "TYPES", DATA_BINARY, 0, 0, 0);
317 diff -ruN a/innobase/include/btr0sea.h b/innobase/include/btr0sea.h
318 --- a/innobase/include/btr0sea.h 2009-07-07 21:54:00.000000000 +0900
319 +++ b/innobase/include/btr0sea.h 2009-08-27 18:43:11.000000000 +0900
321 /*============================*/
322 page_t* page); /* in: index page, s- or x-latched */
323 /************************************************************************
324 +Drops a page hash index based on index */
327 +btr_search_drop_page_hash_index_on_index(
328 +/*=====================================*/
329 + dict_index_t* index); /* in: record descriptor */
330 +/************************************************************************
331 Drops a page hash index when a page is freed from a fseg to the file system.
332 Drops possible hash index if the page happens to be in the buffer pool. */
334 diff -ruN a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
335 --- a/innobase/include/dict0dict.h 2009-07-07 21:54:01.000000000 +0900
336 +++ b/innobase/include/dict0dict.h 2009-08-27 18:42:59.000000000 +0900
338 const char* ptr, /* in: scan from */
339 const char* string);/* in: look for this */
342 +dict_table_LRU_trim(
343 +/*================*/
344 + dict_table_t* self);
346 /* Buffers for storing detailed information about the latest foreign key
347 and unique key errors */
348 extern FILE* dict_foreign_err_file;
349 diff -ruN a/innobase/include/dict0dict.ic b/innobase/include/dict0dict.ic
350 --- a/innobase/include/dict0dict.ic 2009-07-07 21:54:01.000000000 +0900
351 +++ b/innobase/include/dict0dict.ic 2009-08-27 18:42:59.000000000 +0900
354 HASH_SEARCH(name_hash, dict_sys->table_hash, table_fold, table,
355 ut_strcmp(table->name, table_name) == 0);
357 + /* make young in table_LRU */
359 + UT_LIST_REMOVE(table_LRU, dict_sys->table_LRU, table);
360 + UT_LIST_ADD_FIRST(table_LRU, dict_sys->table_LRU, table);
370 + /* make young in table_LRU */
371 + UT_LIST_REMOVE(table_LRU, dict_sys->table_LRU, table);
372 + UT_LIST_ADD_FIRST(table_LRU, dict_sys->table_LRU, table);
374 /* lock_push(trx, table, LOCK_DICT_MEM_FIX) */
377 diff -ruN a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
378 --- a/innobase/include/srv0srv.h 2009-08-27 18:42:17.000000000 +0900
379 +++ b/innobase/include/srv0srv.h 2009-08-27 18:42:59.000000000 +0900
381 extern uint srv_read_ahead;
382 extern uint srv_adaptive_checkpoint;
384 +extern ulint srv_dict_size_limit;
386 extern volatile ibool srv_io_pattern;
387 extern ulong srv_io_pattern_trace;
388 extern ulong srv_io_pattern_trace_running;
390 ulint innodb_data_writes;
391 ulint innodb_data_written;
392 ulint innodb_data_reads;
393 + ulint innodb_dict_tables;
394 ulint innodb_buffer_pool_pages_total;
395 ulint innodb_buffer_pool_pages_data;
396 ulint innodb_buffer_pool_pages_dirty;
397 diff -ruN a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
398 --- a/innobase/srv/srv0srv.c 2009-08-27 18:42:17.000000000 +0900
399 +++ b/innobase/srv/srv0srv.c 2009-08-27 18:42:59.000000000 +0900
401 uint srv_read_ahead = 3; /* 1: random 2: linear 3: Both */
402 uint srv_adaptive_checkpoint = 0; /* 0: none 1: reflex 2: estimate */
404 +ulint srv_dict_size_limit = 0;
406 volatile ibool srv_io_pattern = FALSE;
407 ulint srv_io_pattern_trace = 0;
408 ulint srv_io_pattern_trace_running = 0;
409 @@ -1953,6 +1955,7 @@
410 export_vars.innodb_data_reads= os_n_file_reads;
411 export_vars.innodb_data_writes= os_n_file_writes;
412 export_vars.innodb_data_written= srv_data_written;
413 + export_vars.innodb_dict_tables= (dict_sys ? UT_LIST_GET_LEN(dict_sys->table_LRU) : 0);
414 export_vars.innodb_buffer_pool_read_requests= buf_pool->n_page_gets;
415 export_vars.innodb_buffer_pool_write_requests= srv_buf_pool_write_requests;
416 export_vars.innodb_buffer_pool_wait_free= srv_buf_pool_wait_free;
417 diff -ruN a/mysql-test/r/innodb_dict_size_limit.result b/mysql-test/r/innodb_dict_size_limit.result
418 --- /dev/null 1970-01-01 09:00:00.000000000 +0900
419 +++ b/mysql-test/r/innodb_dict_size_limit.result 2009-08-27 18:42:59.000000000 +0900
421 +DROP TABLE IF EXISTS `test_5`;
422 +DROP TABLE IF EXISTS `test_4`;
423 +DROP TABLE IF EXISTS `test_3`;
424 +DROP TABLE IF EXISTS `test_2`;
425 +DROP TABLE IF EXISTS `test_1`;
426 +SET storage_engine=InnoDB;
427 +SET GLOBAL innodb_dict_size_limit=1;
429 +CREATE TABLE `test_1` (`a` int, `b` int, PRIMARY KEY (`a`));
430 +CREATE TABLE `test_2` (`a` int, `b` int, PRIMARY KEY (`a`));
431 +CREATE TABLE `test_3` (`a` int, `b` int, PRIMARY KEY (`a`));
432 +CREATE TABLE `test_4` (`a` int, `b` int, PRIMARY KEY (`a`));
433 +CREATE TABLE `test_5` (`a` int, `b` int, PRIMARY KEY (`a`));
434 +ALTER TABLE `test_5` ADD CONSTRAINT FOREIGN KEY(`b`) REFERENCES `test_4`(`a`);
435 +ALTER TABLE `test_4` ADD CONSTRAINT FOREIGN KEY(`b`) REFERENCES `test_3`(`a`);
436 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
438 +Innodb_dict_tables 9
440 +SELECT * FROM `test_1`;
442 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
444 +Innodb_dict_tables 8
445 +SELECT * FROM `test_3`;
447 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
449 +Innodb_dict_tables 11
451 +SELECT * FROM `test_2`;
453 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
455 +Innodb_dict_tables 8
456 +SELECT * FROM `test_1`;
459 +SELECT * FROM `test_4`;
461 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
463 +Innodb_dict_tables 9
464 +SELECT * FROM `test_3`;
466 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
468 +Innodb_dict_tables 10
469 +SET GLOBAL innodb_dict_size_limit=0;
471 +SELECT * FROM `test_2`;
473 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
475 +Innodb_dict_tables 11
476 +DROP TABLE `test_5`;
477 +DROP TABLE `test_4`;
478 +DROP TABLE `test_3`;
479 +DROP TABLE `test_2`;
480 +DROP TABLE `test_1`;
481 diff -ruN a/mysql-test/t/innodb_dict_size_limit.test b/mysql-test/t/innodb_dict_size_limit.test
482 --- /dev/null 1970-01-01 09:00:00.000000000 +0900
483 +++ b/mysql-test/t/innodb_dict_size_limit.test 2009-08-27 18:42:59.000000000 +0900
486 +# Test for new variable innodb_dict_size_limit;
488 +-- source include/have_innodb.inc
491 +DROP TABLE IF EXISTS `test_5`;
492 +DROP TABLE IF EXISTS `test_4`;
493 +DROP TABLE IF EXISTS `test_3`;
494 +DROP TABLE IF EXISTS `test_2`;
495 +DROP TABLE IF EXISTS `test_1`;
498 +SET storage_engine=InnoDB;
499 +SET GLOBAL innodb_dict_size_limit=1;
503 +CREATE TABLE `test_1` (`a` int, `b` int, PRIMARY KEY (`a`));
504 +CREATE TABLE `test_2` (`a` int, `b` int, PRIMARY KEY (`a`));
505 +CREATE TABLE `test_3` (`a` int, `b` int, PRIMARY KEY (`a`));
506 +CREATE TABLE `test_4` (`a` int, `b` int, PRIMARY KEY (`a`));
507 +CREATE TABLE `test_5` (`a` int, `b` int, PRIMARY KEY (`a`));
509 +ALTER TABLE `test_5` ADD CONSTRAINT FOREIGN KEY(`b`) REFERENCES `test_4`(`a`);
510 +ALTER TABLE `test_4` ADD CONSTRAINT FOREIGN KEY(`b`) REFERENCES `test_3`(`a`);
512 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
515 +SELECT * FROM `test_1`;
517 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
519 +SELECT * FROM `test_3`;
521 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
524 +SELECT * FROM `test_2`;
526 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
528 +SELECT * FROM `test_1`;
530 +SELECT * FROM `test_4`;
531 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
533 +SELECT * FROM `test_3`;
534 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
536 +SET GLOBAL innodb_dict_size_limit=0;
538 +SELECT * FROM `test_2`;
540 +SHOW GLOBAL STATUS LIKE 'Innodb_dict_tables';
542 +DROP TABLE `test_5`;
543 +DROP TABLE `test_4`;
544 +DROP TABLE `test_3`;
545 +DROP TABLE `test_2`;
546 +DROP TABLE `test_1`;
548 diff -ruN a/patch_info/innodb_dict_size_limit.info b/patch_info/innodb_dict_size_limit.info
549 --- /dev/null 1970-01-01 09:00:00.000000000 +0900
550 +++ b/patch_info/innodb_dict_size_limit.info 2009-08-27 18:42:59.000000000 +0900
552 +File=innodb_dict_size_limit.patch
553 +Name=Limit dictionary cache size
557 +Comment=Variable innodb_dict_size_limit in bytes
561 diff -ruN a/sql/ha_innodb.cc b/sql/ha_innodb.cc
562 --- a/sql/ha_innodb.cc 2009-08-27 18:42:17.000000000 +0900
563 +++ b/sql/ha_innodb.cc 2009-08-27 18:42:59.000000000 +0900
565 (char*) &export_vars.innodb_dblwr_pages_written, SHOW_LONG},
567 (char*) &export_vars.innodb_dblwr_writes, SHOW_LONG},
569 + (char*) &export_vars.innodb_dict_tables, SHOW_LONG},
571 (char*) &export_vars.innodb_log_waits, SHOW_LONG},
572 {"log_write_requests",
573 diff -ruN a/sql/ha_innodb.h b/sql/ha_innodb.h
574 --- a/sql/ha_innodb.h 2009-08-27 18:42:17.000000000 +0900
575 +++ b/sql/ha_innodb.h 2009-08-27 18:42:59.000000000 +0900
577 extern ulong srv_enable_unsafe_group_commit;
578 extern uint srv_read_ahead;
579 extern uint srv_adaptive_checkpoint;
580 +extern ulong srv_dict_size_limit;
581 extern ulong srv_show_locks_held;
582 extern ulong srv_show_verbose_locks;
583 extern ulong srv_io_pattern_trace;
584 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
585 --- a/sql/mysqld.cc 2009-08-27 18:42:17.000000000 +0900
586 +++ b/sql/mysqld.cc 2009-08-27 18:42:59.000000000 +0900
587 @@ -5101,6 +5101,7 @@
588 OPT_INNODB_ADAPTIVE_CHECKPOINT,
589 OPT_INNODB_READ_IO_THREADS,
590 OPT_INNODB_WRITE_IO_THREADS,
591 + OPT_INNODB_DICT_SIZE_LIMIT,
592 OPT_INNODB_ADAPTIVE_HASH_INDEX,
594 OPT_INNODB_USE_LEGACY_CARDINALITY_ALGORITHM
595 @@ -5464,6 +5465,10 @@
596 "Number of background write I/O threads in InnoDB.",
597 (gptr*) &innobase_write_io_threads, (gptr*) &innobase_write_io_threads,
598 0, GET_LONG, REQUIRED_ARG, 8, 1, 64, 0, 0, 0},
599 + {"innodb_dict_size_limit", OPT_INNODB_DICT_SIZE_LIMIT,
600 + "Limit the allocated memory for dictionary cache. (0: unlimited)",
601 + (gptr*) &srv_dict_size_limit, (gptr*) &srv_dict_size_limit, 0,
602 + GET_ULONG, REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 0 ,0},
603 {"innodb_io_pattern_trace", OPT_INNODB_IO_PATTERN_TRACE,
604 "Create/Drop the internal hash table for IO pattern tracing.",
605 (gptr*) &srv_io_pattern_trace, (gptr*) &srv_io_pattern_trace,
606 diff -ruN a/sql/set_var.cc b/sql/set_var.cc
607 --- a/sql/set_var.cc 2009-08-27 18:42:17.000000000 +0900
608 +++ b/sql/set_var.cc 2009-08-27 18:42:59.000000000 +0900
610 sys_var_enum sys_innodb_adaptive_checkpoint("innodb_adaptive_checkpoint",
611 &srv_adaptive_checkpoint,
612 &innodb_adaptive_checkpoint_typelib, fix_innodb_adaptive_checkpoint);
613 +sys_var_long_ptr sys_innodb_dict_size_limit("innodb_dict_size_limit",
614 + &srv_dict_size_limit);
615 sys_var_long_ptr sys_innodb_show_locks_held(
616 "innodb_show_locks_held",
617 &srv_show_locks_held);
619 &sys_innodb_read_ahead,
620 &sys_innodb_enable_unsafe_group_commit,
621 &sys_innodb_adaptive_checkpoint,
622 + &sys_innodb_dict_size_limit,
623 &sys_innodb_show_locks_held,
624 &sys_innodb_show_verbose_locks,
625 &sys_innodb_io_pattern_trace,
626 @@ -1084,6 +1087,7 @@
627 {sys_innodb_adaptive_checkpoint.name, (char*) &sys_innodb_adaptive_checkpoint, SHOW_SYS},
628 {"innodb_read_io_threads", (char*) &innobase_read_io_threads, SHOW_LONG},
629 {"innodb_write_io_threads", (char*) &innobase_write_io_threads, SHOW_LONG},
630 + {sys_innodb_dict_size_limit.name, (char*) &sys_innodb_dict_size_limit, SHOW_SYS},
631 {sys_innodb_io_pattern_trace.name, (char*) &sys_innodb_io_pattern_trace, SHOW_SYS},
632 {sys_innodb_io_pattern_trace_running.name, (char*) &sys_innodb_io_pattern_trace_running, SHOW_SYS},
633 {sys_innodb_io_pattern_size_limit.name, (char*) &sys_innodb_io_pattern_size_limit, SHOW_SYS},