~knielsen/ourdelta/bug_484127_484120_2

« back to all changes in this revision

Viewing changes to mysql/5.0/percona_maintained/innodb_io_pattern.patch

  • Committer: Arjen Lentz
  • Date: 2009-10-01 11:15:22 UTC
  • mfrom: (54.1.31 ourdelta-5.0.86)
  • Revision ID: arjen@openquery.com-20091001111522-3qbkgich9qfmzhyo
Tags: mysql-5.0.86-d9
Merge from ourdelta-5.0.86 work tree, preparing 5.0.86-d9 ourdelta build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -r 5060df9888d7 include/mysql_com.h
2
 
--- a/include/mysql_com.h       Tue Feb 17 22:33:54 2009 -0800
3
 
+++ b/include/mysql_com.h       Tue Feb 17 22:33:58 2009 -0800
4
 
@@ -121,6 +121,9 @@
5
 
 #define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
 
1
diff -r d4826c0a98c2 include/mysql_com.h
 
2
--- a/include/mysql_com.h       Wed Jul 29 09:58:58 2009 -0700
 
3
+++ b/include/mysql_com.h       Wed Jul 29 10:00:12 2009 -0700
 
4
@@ -122,6 +122,9 @@
6
5
 #define REFRESH_DES_KEY_FILE   0x40000L
7
6
 #define REFRESH_USER_RESOURCES 0x80000L
8
 
+
 
7
 
9
8
+/* TRUNCATE INFORMATION_SCHEMA.INNODB_IO_PATTERN */
10
9
+#define REFRESH_INNODB_IO_PATTERN      0x1000000L
11
 
 
 
10
+
12
11
 #define CLIENT_LONG_PASSWORD   1       /* new more secure passwords */
13
12
 #define CLIENT_FOUND_ROWS      2       /* Found instead of affected rows */
14
 
diff -r 5060df9888d7 innobase/buf/buf0buf.c
15
 
--- a/innobase/buf/buf0buf.c    Tue Feb 17 22:33:54 2009 -0800
16
 
+++ b/innobase/buf/buf0buf.c    Tue Feb 17 22:33:58 2009 -0800
17
 
@@ -653,6 +653,9 @@
 
13
 #define CLIENT_LONG_FLAG       4       /* Get all column flags */
 
14
diff -r d4826c0a98c2 innobase/buf/buf0buf.c
 
15
--- a/innobase/buf/buf0buf.c    Wed Jul 29 09:58:58 2009 -0700
 
16
+++ b/innobase/buf/buf0buf.c    Wed Jul 29 10:00:12 2009 -0700
 
17
@@ -654,6 +654,9 @@
18
18
        }
19
19
 
20
20
        buf_pool->page_hash = hash_create(2 * max_size);
24
24
 
25
25
        buf_pool->n_pend_reads = 0;
26
26
 
27
 
@@ -1966,6 +1969,9 @@
 
27
@@ -1967,6 +1970,9 @@
28
28
        ulint           io_type;
29
29
        ulint           read_page_no;
30
30
        
34
34
        ut_ad(block);
35
35
 
36
36
        ut_a(block->state == BUF_BLOCK_FILE_PAGE);
37
 
@@ -2067,6 +2073,26 @@
 
37
@@ -2068,6 +2074,26 @@
38
38
                buf_pool->n_pages_read++;
39
39
 
40
40
                rw_lock_x_unlock_gen(&(block->lock), BUF_IO_READ);
61
61
 
62
62
 #ifdef UNIV_DEBUG
63
63
                if (buf_debug_prints) {
64
 
@@ -2082,6 +2108,26 @@
 
64
@@ -2083,6 +2109,26 @@
65
65
                buf_flush_write_complete(block);
66
66
 
67
67
                rw_lock_s_unlock_gen(&(block->lock), BUF_IO_WRITE);
88
88
 
89
89
                buf_pool->n_pages_written++;
90
90
 
91
 
@@ -2656,3 +2702,58 @@
 
91
@@ -2657,3 +2703,58 @@
92
92
 return buf_pool_get_nth_block(buf_pool, i);
93
93
 
94
94
 }
147
147
+       }
148
148
+       mutex_exit(&(buf_pool->mutex));
149
149
+}
150
 
diff -r 5060df9888d7 innobase/include/buf0buf.h
151
 
--- a/innobase/include/buf0buf.h        Tue Feb 17 22:33:54 2009 -0800
152
 
+++ b/innobase/include/buf0buf.h        Tue Feb 17 22:33:58 2009 -0800
 
150
diff -r d4826c0a98c2 innobase/include/buf0buf.h
 
151
--- a/innobase/include/buf0buf.h        Wed Jul 29 09:58:58 2009 -0700
 
152
+++ b/innobase/include/buf0buf.h        Wed Jul 29 10:00:12 2009 -0700
153
153
@@ -709,6 +709,18 @@
154
154
 void buf_pool_dump(void);
155
155
 buf_block_t* buf_pool_get_nth_block_no_inline(buf_pool_t* pool, ulint i);  
195
195
 /* States of a control block */
196
196
 #define        BUF_BLOCK_NOT_USED      211     /* is in the free list */
197
197
 #define BUF_BLOCK_READY_FOR_USE        212     /* when buf_get_free_block returns
198
 
diff -r 5060df9888d7 innobase/include/buf0types.h
199
 
--- a/innobase/include/buf0types.h      Tue Feb 17 22:33:54 2009 -0800
200
 
+++ b/innobase/include/buf0types.h      Tue Feb 17 22:33:58 2009 -0800
 
198
diff -r d4826c0a98c2 innobase/include/buf0types.h
 
199
--- a/innobase/include/buf0types.h      Wed Jul 29 09:58:58 2009 -0700
 
200
+++ b/innobase/include/buf0types.h      Wed Jul 29 10:00:12 2009 -0700
201
201
@@ -12,6 +12,8 @@
202
202
 typedef        struct buf_block_struct         buf_block_t;
203
203
 typedef        struct buf_pool_struct          buf_pool_t;
207
207
 /* The 'type' used of a buffer frame */
208
208
 typedef        byte    buf_frame_t;
209
209
 
210
 
diff -r 5060df9888d7 innobase/include/srv0srv.h
211
 
--- a/innobase/include/srv0srv.h        Tue Feb 17 22:33:54 2009 -0800
212
 
+++ b/innobase/include/srv0srv.h        Tue Feb 17 22:33:58 2009 -0800
213
 
@@ -145,6 +145,11 @@
214
 
 extern ulint   srv_flush_neighbor_pages;
 
210
diff -r d4826c0a98c2 innobase/include/srv0srv.h
 
211
--- a/innobase/include/srv0srv.h        Wed Jul 29 09:58:58 2009 -0700
 
212
+++ b/innobase/include/srv0srv.h        Wed Jul 29 10:00:12 2009 -0700
 
213
@@ -146,6 +146,11 @@
 
214
 extern ulint   srv_enable_unsafe_group_commit;
215
215
 extern uint    srv_read_ahead;
216
 
 extern ulint   srv_adaptive_checkpoint;
 
216
 extern uint    srv_adaptive_checkpoint;
217
217
+
218
218
+extern volatile ibool srv_io_pattern;
219
219
+extern ulong   srv_io_pattern_trace;
222
222
 /*-------------------------------------------*/
223
223
 
224
224
 extern ulint   srv_n_rows_inserted;
225
 
diff -r 5060df9888d7 innobase/srv/srv0srv.c
226
 
--- a/innobase/srv/srv0srv.c    Tue Feb 17 22:33:54 2009 -0800
227
 
+++ b/innobase/srv/srv0srv.c    Tue Feb 17 22:33:58 2009 -0800
228
 
@@ -344,6 +344,11 @@
 
225
diff -r d4826c0a98c2 innobase/srv/srv0srv.c
 
226
--- a/innobase/srv/srv0srv.c    Wed Jul 29 09:58:58 2009 -0700
 
227
+++ b/innobase/srv/srv0srv.c    Wed Jul 29 10:00:12 2009 -0700
 
228
@@ -352,6 +352,11 @@
229
229
 
230
230
 uint   srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
231
 
 ulint  srv_adaptive_checkpoint = 0; /* 0:disable 1:enable */
 
231
 uint   srv_adaptive_checkpoint = 0; /* 0: none  1: reflex  2: estimate */
232
232
+
233
233
+volatile ibool srv_io_pattern = FALSE;
234
234
+ulint   srv_io_pattern_trace = 0;
237
237
 /*-------------------------------------------*/
238
238
 ulong  srv_n_spin_wait_rounds  = 20;
239
239
 ulong  srv_n_free_tickets_to_enter = 500;
240
 
diff -r 5060df9888d7 mysql-test/r/information_schema.result
241
 
--- a/mysql-test/r/information_schema.result    Tue Feb 17 22:33:54 2009 -0800
242
 
+++ b/mysql-test/r/information_schema.result    Tue Feb 17 22:33:58 2009 -0800
 
240
diff -r d4826c0a98c2 mysql-test/r/information_schema.result
 
241
--- a/mysql-test/r/information_schema.result    Wed Jul 29 09:58:58 2009 -0700
 
242
+++ b/mysql-test/r/information_schema.result    Wed Jul 29 10:00:12 2009 -0700
243
243
@@ -59,6 +59,7 @@
244
244
 USER_PRIVILEGES
245
245
 USER_STATISTICS
296
296
 KEY_COLUMN_USAGE       information_schema.KEY_COLUMN_USAGE     1
297
297
 PROCESSLIST    information_schema.PROCESSLIST  1
298
298
 PROFILING      information_schema.PROFILING    1
299
 
diff -r 5060df9888d7 mysql-test/r/information_schema_db.result
300
 
--- a/mysql-test/r/information_schema_db.result Tue Feb 17 22:33:54 2009 -0800
301
 
+++ b/mysql-test/r/information_schema_db.result Tue Feb 17 22:33:58 2009 -0800
 
299
diff -r d4826c0a98c2 mysql-test/r/information_schema_db.result
 
300
--- a/mysql-test/r/information_schema_db.result Wed Jul 29 09:58:58 2009 -0700
 
301
+++ b/mysql-test/r/information_schema_db.result Wed Jul 29 10:00:12 2009 -0700
302
302
@@ -28,6 +28,7 @@
303
303
 USER_PRIVILEGES
304
304
 USER_STATISTICS
307
307
 show tables from INFORMATION_SCHEMA like 'T%';
308
308
 Tables_in_information_schema (T%)
309
309
 TABLES
310
 
diff -r 5060df9888d7 mysql-test/r/mysqlshow.result
311
 
--- a/mysql-test/r/mysqlshow.result     Tue Feb 17 22:33:54 2009 -0800
312
 
+++ b/mysql-test/r/mysqlshow.result     Tue Feb 17 22:33:58 2009 -0800
 
310
diff -r d4826c0a98c2 mysql-test/r/mysqlshow.result
 
311
--- a/mysql-test/r/mysqlshow.result     Wed Jul 29 09:58:58 2009 -0700
 
312
+++ b/mysql-test/r/mysqlshow.result     Wed Jul 29 10:00:12 2009 -0700
313
313
@@ -102,6 +102,7 @@
314
314
 | USER_PRIVILEGES                       |
315
315
 | USER_STATISTICS                       |
326
326
 +---------------------------------------+
327
327
 Wildcard: inf_rmation_schema
328
328
 +--------------------+
329
 
diff -r 5060df9888d7 patch_info/innodb_io_pattern.info
 
329
diff -r d4826c0a98c2 patch_info/innodb_io_pattern.info
330
330
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
331
 
+++ b/patch_info/innodb_io_pattern.info Tue Feb 17 22:33:58 2009 -0800
 
331
+++ b/patch_info/innodb_io_pattern.info Wed Jul 29 10:00:12 2009 -0700
332
332
@@ -0,0 +1,8 @@
333
333
+File=innodb_io_pattern.patch
334
334
+Name=Information schema table of InnoDB IO counts for each datafile pages
338
338
+Comment=INFORMATION_SCHEMA.INNODB_IO_PATTERN
339
339
+2008-12-01
340
340
+YK: fix for mysql-test
341
 
diff -r 5060df9888d7 sql/ha_innodb.cc
342
 
--- a/sql/ha_innodb.cc  Tue Feb 17 22:33:54 2009 -0800
343
 
+++ b/sql/ha_innodb.cc  Tue Feb 17 22:33:58 2009 -0800
344
 
@@ -1569,6 +1569,8 @@
 
341
diff -r d4826c0a98c2 sql/ha_innodb.cc
 
342
--- a/sql/ha_innodb.cc  Wed Jul 29 09:58:58 2009 -0700
 
343
+++ b/sql/ha_innodb.cc  Wed Jul 29 10:00:12 2009 -0700
 
344
@@ -1583,6 +1583,8 @@
345
345
         pthread_cond_init(&commit_cond, NULL);
346
346
        innodb_inited= 1;
347
347
 
350
350
        /* If this is a replication slave and we needed to do a crash recovery,
351
351
        set the master binlog position to what InnoDB internally knew about
352
352
        how far we got transactions durable inside InnoDB. There is a
353
 
@@ -6535,6 +6537,28 @@
 
353
@@ -6551,6 +6553,28 @@
354
354
 }
355
355
 
356
356
 /****************************************************************************
379
379
 Implements the SHOW INNODB STATUS command. Sends the output of the InnoDB
380
380
 Monitor to the client. */
381
381
 
382
 
diff -r 5060df9888d7 sql/ha_innodb.h
383
 
--- a/sql/ha_innodb.h   Tue Feb 17 22:33:54 2009 -0800
384
 
+++ b/sql/ha_innodb.h   Tue Feb 17 22:33:58 2009 -0800
385
 
@@ -244,6 +244,9 @@
386
 
 extern ulong srv_adaptive_checkpoint;
 
382
diff -r d4826c0a98c2 sql/ha_innodb.h
 
383
--- a/sql/ha_innodb.h   Wed Jul 29 09:58:58 2009 -0700
 
384
+++ b/sql/ha_innodb.h   Wed Jul 29 10:00:12 2009 -0700
 
385
@@ -245,6 +245,9 @@
 
386
 extern uint srv_adaptive_checkpoint;
387
387
 extern ulong srv_show_locks_held;
388
388
 extern ulong srv_show_verbose_locks;
389
389
+extern ulong srv_io_pattern_trace;
390
390
+extern ulong srv_io_pattern_trace_running;
391
391
+extern ulong srv_io_pattern_size_limit;
392
 
 }
393
392
 
394
 
 bool innobase_init(void);
395
 
@@ -270,6 +273,9 @@
396
 
 bool innodb_I_S_buffer_pool_content(THD* thd, TABLE_LIST *tables);
 
393
 /* An option to enable the fix for "Bug#43660 SHOW INDEXES/ANALYZE does
 
394
 NOT update cardinality for indexes of InnoDB table". By default we are
 
395
@@ -278,6 +281,9 @@
397
396
 bool innodb_mutex_show_status(THD* thd);
398
397
 void innodb_export_status(void);
399
 
+
 
398
 
400
399
+void innodb_io_pattern_control(void);
401
400
+void innodb_io_pattern_clear(void);
402
 
 
 
401
+
403
402
 void innobase_release_temporary_latches(THD *thd);
404
403
 
405
 
diff -r 5060df9888d7 sql/lex.h
406
 
--- a/sql/lex.h Tue Feb 17 22:33:54 2009 -0800
407
 
+++ b/sql/lex.h Tue Feb 17 22:33:58 2009 -0800
 
404
 void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset);
 
405
diff -r d4826c0a98c2 sql/lex.h
 
406
--- a/sql/lex.h Wed Jul 29 09:58:58 2009 -0700
 
407
+++ b/sql/lex.h Wed Jul 29 10:00:12 2009 -0700
408
408
@@ -244,6 +244,7 @@
409
409
   { "INNER",           SYM(INNER_SYM)},
410
410
   { "INNOBASE",                SYM(INNOBASE_SYM)},
413
413
   { "INOUT",            SYM(INOUT_SYM)},
414
414
   { "INSENSITIVE",      SYM(INSENSITIVE_SYM)},
415
415
   { "INSERT",          SYM(INSERT)},
416
 
diff -r 5060df9888d7 sql/mysqld.cc
417
 
--- a/sql/mysqld.cc     Tue Feb 17 22:33:54 2009 -0800
418
 
+++ b/sql/mysqld.cc     Tue Feb 17 22:33:58 2009 -0800
419
 
@@ -5026,6 +5026,9 @@
 
416
diff -r d4826c0a98c2 sql/mysqld.cc
 
417
--- a/sql/mysqld.cc     Wed Jul 29 09:58:58 2009 -0700
 
418
+++ b/sql/mysqld.cc     Wed Jul 29 10:00:12 2009 -0700
 
419
@@ -5029,6 +5029,9 @@
420
420
   OPT_INNODB_SYNC_SPIN_LOOPS,
421
421
   OPT_INNODB_CONCURRENCY_TICKETS,
422
422
   OPT_INNODB_THREAD_SLEEP_DELAY,
426
426
   OPT_BDB_CACHE_SIZE,
427
427
   OPT_BDB_LOG_BUFFER_SIZE,
428
428
   OPT_BDB_MAX_LOCK,
429
 
@@ -5445,6 +5448,18 @@
 
429
@@ -5461,6 +5464,18 @@
430
430
    "Number of background write I/O threads in InnoDB.",
431
431
    (gptr*) &innobase_write_io_threads, (gptr*) &innobase_write_io_threads,
432
 
    0, GET_LONG, REQUIRED_ARG, 1, 1, 64, 0, 0, 0},
 
432
    0, GET_LONG, REQUIRED_ARG, 8, 1, 64, 0, 0, 0},
433
433
+  {"innodb_io_pattern_trace", OPT_INNODB_IO_PATTERN_TRACE,
434
434
+   "Create/Drop the internal hash table for IO pattern tracing.",
435
435
+   (gptr*) &srv_io_pattern_trace, (gptr*) &srv_io_pattern_trace,
445
445
 #endif /* End HAVE_INNOBASE_DB */
446
446
   {"isam", OPT_ISAM, "Obsolete. ISAM storage engine is no longer supported.",
447
447
    (gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 0, 0, 0,
448
 
diff -r 5060df9888d7 sql/set_var.cc
449
 
--- a/sql/set_var.cc    Tue Feb 17 22:33:54 2009 -0800
450
 
+++ b/sql/set_var.cc    Tue Feb 17 22:33:58 2009 -0800
451
 
@@ -528,6 +528,12 @@
 
448
diff -r d4826c0a98c2 sql/set_var.cc
 
449
--- a/sql/set_var.cc    Wed Jul 29 09:58:58 2009 -0700
 
450
+++ b/sql/set_var.cc    Wed Jul 29 10:00:12 2009 -0700
 
451
@@ -546,6 +546,12 @@
452
452
 sys_var_long_ptr  sys_innodb_show_verbose_locks(
453
453
                                         "innodb_show_verbose_locks",
454
454
                                         &srv_show_verbose_locks);
461
461
 sys_var_const_os_str_ptr sys_innodb_data_file_path("innodb_data_file_path", 
462
462
                                                &innobase_data_file_path);
463
463
 sys_var_const_os_str_ptr sys_innodb_data_home_dir("innodb_data_home_dir", 
464
 
@@ -901,6 +907,9 @@
 
464
@@ -926,6 +932,9 @@
465
465
   &sys_innodb_adaptive_checkpoint,
466
466
   &sys_innodb_show_locks_held,
467
467
   &sys_innodb_show_verbose_locks,
471
471
 #endif
472
472
   &sys_trust_routine_creators,
473
473
   &sys_trust_function_creators,
474
 
@@ -1047,6 +1056,9 @@
 
474
@@ -1075,6 +1084,9 @@
475
475
   {sys_innodb_adaptive_checkpoint.name, (char*) &sys_innodb_adaptive_checkpoint, SHOW_SYS},
476
476
   {"innodb_read_io_threads", (char*) &innobase_read_io_threads, SHOW_LONG},
477
477
   {"innodb_write_io_threads", (char*) &innobase_write_io_threads, SHOW_LONG},
478
478
+  {sys_innodb_io_pattern_trace.name, (char*) &sys_innodb_io_pattern_trace, SHOW_SYS},
479
479
+  {sys_innodb_io_pattern_trace_running.name, (char*) &sys_innodb_io_pattern_trace_running, SHOW_SYS},
480
480
+  {sys_innodb_io_pattern_size_limit.name, (char*) &sys_innodb_io_pattern_size_limit, SHOW_SYS},
 
481
   {sys_innodb_use_legacy_cardinality_algorithm.name,
 
482
    (char*) &sys_innodb_use_legacy_cardinality_algorithm, SHOW_SYS},
481
483
 #endif
482
 
   {sys_interactive_timeout.name,(char*) &sys_interactive_timeout,   SHOW_SYS},
483
 
   {sys_join_buffer_size.name,   (char*) &sys_join_buffer_size,     SHOW_SYS},
484
 
@@ -3160,6 +3172,19 @@
 
484
@@ -3210,6 +3222,19 @@
485
485
     thd->variables.lc_time_names= global_system_variables.lc_time_names;
486
486
 }
487
487
 
501
501
 /*
502
502
   Functions to update thd->options bits
503
503
 */
504
 
diff -r 5060df9888d7 sql/set_var.h
505
 
--- a/sql/set_var.h     Tue Feb 17 22:33:54 2009 -0800
506
 
+++ b/sql/set_var.h     Tue Feb 17 22:33:58 2009 -0800
507
 
@@ -989,6 +989,17 @@
 
504
diff -r d4826c0a98c2 sql/set_var.h
 
505
--- a/sql/set_var.h     Wed Jul 29 09:58:58 2009 -0700
 
506
+++ b/sql/set_var.h     Wed Jul 29 10:00:12 2009 -0700
 
507
@@ -1012,6 +1012,17 @@
508
508
   virtual void set_default(THD *thd, enum_var_type type);
509
509
 };
510
510
 
522
522
 /****************************************************************************
523
523
   Classes for parsing of the SET command
524
524
 ****************************************************************************/
525
 
diff -r 5060df9888d7 sql/sql_parse.cc
526
 
--- a/sql/sql_parse.cc  Tue Feb 17 22:33:54 2009 -0800
527
 
+++ b/sql/sql_parse.cc  Tue Feb 17 22:33:58 2009 -0800
528
 
@@ -8009,6 +8009,13 @@
 
525
diff -r d4826c0a98c2 sql/sql_parse.cc
 
526
--- a/sql/sql_parse.cc  Wed Jul 29 09:58:58 2009 -0700
 
527
+++ b/sql/sql_parse.cc  Wed Jul 29 10:00:12 2009 -0700
 
528
@@ -8104,6 +8104,13 @@
529
529
     }
530
530
     pthread_mutex_unlock(&LOCK_global_user_client_stats);
531
531
   }
539
539
  *write_to_binlog= tmp_write_to_binlog;
540
540
  return result;
541
541
 }
542
 
diff -r 5060df9888d7 sql/sql_show.cc
543
 
--- a/sql/sql_show.cc   Tue Feb 17 22:33:54 2009 -0800
544
 
+++ b/sql/sql_show.cc   Tue Feb 17 22:33:58 2009 -0800
545
 
@@ -32,6 +32,17 @@
546
 
 #ifdef HAVE_INNOBASE_DB
 
542
diff -r d4826c0a98c2 sql/sql_show.cc
 
543
--- a/sql/sql_show.cc   Wed Jul 29 09:58:58 2009 -0700
 
544
+++ b/sql/sql_show.cc   Wed Jul 29 10:00:12 2009 -0700
 
545
@@ -33,6 +33,17 @@
547
546
 #include "ha_innodb.h"
548
547
 #endif
549
 
+
 
548
 
550
549
+#ifdef HAVE_INNOBASE_DB
551
550
+#define INSIDE_HA_INNOBASE_CC
552
551
+extern "C" {
557
556
+/* We need to undef it in InnoDB */
558
557
+#undef byte
559
558
+#endif /* HAVE_INNOBASE_DB */
560
 
 
 
559
+
561
560
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
562
561
 static const char *grant_names[]={
563
 
@@ -4088,6 +4099,67 @@
 
562
   "select","insert","update","delete","create","drop","reload","shutdown",
 
563
@@ -4108,6 +4119,72 @@
564
564
   DBUG_RETURN(res);
565
565
 }
566
566
 
574
574
+  DBUG_ENTER("innodb_io_pattern_fill_table");
575
575
+  int returnable= 0;
576
576
+
 
577
+  /* deny access to non-superusers */
 
578
+  if (check_global_access(thd, PROCESS_ACL)) {
 
579
+    DBUG_RETURN(0);
 
580
+  }
 
581
+
577
582
+  /* We cannot use inline functions of InnoDB here */
578
583
+
579
584
+  /* !!!!!ATTENTION!!!!!: This function is not protected by mutex for performance.     */
628
633
 /*
629
634
   Find schema_tables elment by name
630
635
 
631
 
@@ -4894,6 +4966,19 @@
 
636
@@ -4914,6 +4986,19 @@
632
637
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
633
638
 };
634
639
 
648
653
 
649
654
 ST_FIELD_INFO variables_fields_info[]=
650
655
 {
651
 
@@ -5069,6 +5154,10 @@
 
656
@@ -5089,6 +5174,10 @@
652
657
    make_old_format, 0, -1, -1, 1},
653
658
   {"VIEWS", view_fields_info, create_schema_table, 
654
659
     get_all_tables, 0, get_schema_views_record, 1, 2, 0},
659
664
   {0, 0, 0, 0, 0, 0, 0, 0, 0}
660
665
 };
661
666
 
662
 
diff -r 5060df9888d7 sql/sql_yacc.yy
663
 
--- a/sql/sql_yacc.yy   Tue Feb 17 22:33:54 2009 -0800
664
 
+++ b/sql/sql_yacc.yy   Tue Feb 17 22:33:58 2009 -0800
 
667
diff -r d4826c0a98c2 sql/sql_yacc.yy
 
668
--- a/sql/sql_yacc.yy   Wed Jul 29 09:58:58 2009 -0700
 
669
+++ b/sql/sql_yacc.yy   Wed Jul 29 10:00:12 2009 -0700
665
670
@@ -685,6 +685,7 @@
666
671
 %token  INFILE
667
672
 %token  INNER_SYM
670
675
 %token  INOUT_SYM
671
676
 %token  INSENSITIVE_SYM
672
677
 %token  INSERT
673
 
@@ -8541,6 +8542,7 @@
 
678
@@ -8500,6 +8501,7 @@
674
679
         | MASTER_SYM    { Lex->type|= REFRESH_MASTER; }
675
680
        | DES_KEY_FILE  { Lex->type|= REFRESH_DES_KEY_FILE; }
676
681
        | RESOURCES     { Lex->type|= REFRESH_USER_RESOURCES; }
678
683
        | CLIENT_STATS_SYM { Lex->type|= REFRESH_CLIENT_STATS; }
679
684
        | USER_STATS_SYM { Lex->type|= REFRESH_USER_STATS; }
680
685
        | TABLE_STATS_SYM { Lex->type|= REFRESH_TABLE_STATS; }
681
 
@@ -9594,6 +9596,7 @@
 
686
@@ -9552,6 +9554,7 @@
682
687
        | ISOLATION             {}
683
688
        | ISSUER_SYM            {}
684
689
        | INNOBASE_SYM          {}