~longbow/percona-server/test51_log_slow_global_control_default

« back to all changes in this revision

Viewing changes to patches/innodb_stats.patch

  • Committer: Oleg Tsarev
  • Date: 2011-08-09 13:35:34 UTC
  • Revision ID: oleg.tsarev@percona.com-20110809133534-9nyixnbuxjx5kfgd
run "make regenerate" for remove patches applying warnings and unify patches format

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#!!! notice !!!
6
6
# Any small change to this file in the main branch
7
7
# should be done or reviewed by the maintainer!
8
 
diff -ruN a/storage/innodb_plugin/dict/dict0boot.c b/storage/innodb_plugin/dict/dict0boot.c
9
 
--- a/storage/innodb_plugin/dict/dict0boot.c    2010-08-27 16:11:12.152990021 +0900
10
 
+++ b/storage/innodb_plugin/dict/dict0boot.c    2010-08-27 16:16:49.202982244 +0900
 
8
--- a/storage/innodb_plugin/dict/dict0boot.c
 
9
+++ b/storage/innodb_plugin/dict/dict0boot.c
11
10
@@ -263,6 +263,29 @@
12
11
        /* Get the dictionary header */
13
12
        dict_hdr = dict_hdr_get(&mtr);
101
100
 
102
101
        mutex_exit(&(dict_sys->mutex));
103
102
 }
104
 
diff -ruN a/storage/innodb_plugin/dict/dict0crea.c b/storage/innodb_plugin/dict/dict0crea.c
105
 
--- a/storage/innodb_plugin/dict/dict0crea.c    2010-08-27 16:11:12.152990021 +0900
106
 
+++ b/storage/innodb_plugin/dict/dict0crea.c    2010-08-27 16:16:49.205982429 +0900
 
103
--- a/storage/innodb_plugin/dict/dict0crea.c
 
104
+++ b/storage/innodb_plugin/dict/dict0crea.c
107
105
@@ -508,6 +508,56 @@
108
106
 }
109
107
 
280
278
        }
281
279
 
282
280
        if (node->state == INDEX_CREATE_INDEX_TREE) {
283
 
@@ -1179,6 +1318,66 @@
284
 
                return(NULL);
285
 
        }
 
281
@@ -1185,6 +1324,66 @@
 
282
 }
286
283
 
287
 
+       thr->run_node = que_node_get_parent(node);
288
 
+
289
 
+       return(thr);
290
 
+}
291
 
+
292
 
+/****************************************************************//**
 
284
 /****************************************************************//**
293
285
+*/
294
286
+UNIV_INTERN
295
287
+que_thr_t*
344
336
+               return(NULL);
345
337
+       }
346
338
+
347
 
        thr->run_node = que_node_get_parent(node);
348
 
 
349
 
        return(thr);
350
 
diff -ruN a/storage/innodb_plugin/dict/dict0dict.c b/storage/innodb_plugin/dict/dict0dict.c
351
 
--- a/storage/innodb_plugin/dict/dict0dict.c    2010-08-27 16:11:12.155144214 +0900
352
 
+++ b/storage/innodb_plugin/dict/dict0dict.c    2010-08-27 16:16:49.213982476 +0900
 
339
+       thr->run_node = que_node_get_parent(node);
 
340
+
 
341
+       return(thr);
 
342
+}
 
343
+
 
344
+/****************************************************************//**
 
345
 Creates the foreign key constraints system tables inside InnoDB
 
346
 at database creation or database start if they are not found or are
 
347
 not of the right form.
 
348
--- a/storage/innodb_plugin/dict/dict0dict.c
 
349
+++ b/storage/innodb_plugin/dict/dict0dict.c
353
350
@@ -739,7 +739,7 @@
354
351
                print an error message and return without doing
355
352
                anything. */
814
811
 
815
812
        dict_table_stats_lock(table, RW_S_LATCH);
816
813
 
817
 
diff -ruN a/storage/innodb_plugin/dict/dict0load.c b/storage/innodb_plugin/dict/dict0load.c
818
 
--- a/storage/innodb_plugin/dict/dict0load.c    2010-08-04 02:24:19.000000000 +0900
819
 
+++ b/storage/innodb_plugin/dict/dict0load.c    2010-08-27 16:16:49.218982387 +0900
 
814
--- a/storage/innodb_plugin/dict/dict0load.c
 
815
+++ b/storage/innodb_plugin/dict/dict0load.c
820
816
@@ -223,7 +223,7 @@
821
817
 
822
818
                        if (dict_table_get_first_index(table)) {
826
822
                        }
827
823
 
828
824
                        dict_table_print_low(table);
829
 
diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
830
 
--- a/storage/innodb_plugin/handler/ha_innodb.cc        2010-08-27 16:15:55.192417748 +0900
831
 
+++ b/storage/innodb_plugin/handler/ha_innodb.cc        2010-08-27 16:16:49.233984845 +0900
 
825
--- a/storage/innodb_plugin/handler/ha_innodb.cc
 
826
+++ b/storage/innodb_plugin/handler/ha_innodb.cc
832
827
@@ -190,6 +190,7 @@
833
828
 static my_bool innobase_rollback_on_timeout            = FALSE;
834
829
 static my_bool innobase_create_status_file             = FALSE;
995
990
 i_s_innodb_patches
996
991
 mysql_declare_plugin_end;
997
992
 
998
 
diff -ruN a/storage/innodb_plugin/handler/i_s.cc b/storage/innodb_plugin/handler/i_s.cc
999
 
--- a/storage/innodb_plugin/handler/i_s.cc      2010-08-27 16:13:11.075059060 +0900
1000
 
+++ b/storage/innodb_plugin/handler/i_s.cc      2010-08-27 16:16:49.253982474 +0900
 
993
--- a/storage/innodb_plugin/handler/i_s.cc
 
994
+++ b/storage/innodb_plugin/handler/i_s.cc
1001
995
@@ -45,6 +45,7 @@
1002
996
 #include "btr0btr.h" /* for btr_page_get_index_id */
1003
997
 #include "trx0rseg.h" /* for trx_rseg_struct */
1354
1348
+       STRUCT_FLD(system_vars, NULL),
1355
1349
+       STRUCT_FLD(__reserved1, NULL)
1356
1350
+};
1357
 
diff -ruN a/storage/innodb_plugin/handler/i_s.h b/storage/innodb_plugin/handler/i_s.h
1358
 
--- a/storage/innodb_plugin/handler/i_s.h       2010-08-27 15:59:21.754987936 +0900
1359
 
+++ b/storage/innodb_plugin/handler/i_s.h       2010-08-27 16:16:49.255984731 +0900
 
1351
--- a/storage/innodb_plugin/handler/i_s.h
 
1352
+++ b/storage/innodb_plugin/handler/i_s.h
1360
1353
@@ -38,5 +38,7 @@
1361
1354
 extern struct st_mysql_plugin  i_s_innodb_cmpmem_reset;
1362
1355
 extern struct st_mysql_plugin  i_s_innodb_patches;
1365
1358
+extern struct st_mysql_plugin  i_s_innodb_index_stats;
1366
1359
 
1367
1360
 #endif /* i_s_h */
1368
 
diff -ruN a/storage/innodb_plugin/handler/innodb_patch_info.h b/storage/innodb_plugin/handler/innodb_patch_info.h
1369
 
--- a/storage/innodb_plugin/handler/innodb_patch_info.h 2010-08-27 16:15:55.197404531 +0900
1370
 
+++ b/storage/innodb_plugin/handler/innodb_patch_info.h 2010-08-27 16:16:49.249142399 +0900
 
1361
--- a/storage/innodb_plugin/handler/innodb_patch_info.h
 
1362
+++ b/storage/innodb_plugin/handler/innodb_patch_info.h
1371
1363
@@ -35,5 +35,6 @@
1372
1364
 {"innodb_expand_import","convert .ibd file automatically when import tablespace","the files are generated by xtrabackup export mode.","http://www.percona.com/docs/wiki/percona-xtradb"},
1373
1365
 {"innodb_dict_size_limit","Limit dictionary cache size","Variable innodb_dict_size_limit in bytes","http://www.percona.com/docs/wiki/percona-xtradb"},
1375
1367
+{"innodb_stats","Additional features about InnoDB statistics/optimizer","","http://www.percona.com/docs/wiki/percona-xtradb"},
1376
1368
 {NULL, NULL, NULL, NULL}
1377
1369
 };
1378
 
diff -ruN a/storage/innodb_plugin/include/dict0boot.h b/storage/innodb_plugin/include/dict0boot.h
1379
 
--- a/storage/innodb_plugin/include/dict0boot.h 2010-08-04 02:24:19.000000000 +0900
1380
 
+++ b/storage/innodb_plugin/include/dict0boot.h 2010-08-27 16:16:49.260982522 +0900
 
1370
--- a/storage/innodb_plugin/include/dict0boot.h
 
1371
+++ b/storage/innodb_plugin/include/dict0boot.h
1381
1372
@@ -101,6 +101,7 @@
1382
1373
 #define DICT_COLUMNS_ID                ut_dulint_create(0, 2)
1383
1374
 #define DICT_INDEXES_ID                ut_dulint_create(0, 3)
1417
1408
 #ifndef UNIV_NONINL
1418
1409
 #include "dict0boot.ic"
1419
1410
 #endif
1420
 
diff -ruN a/storage/innodb_plugin/include/dict0crea.h b/storage/innodb_plugin/include/dict0crea.h
1421
 
--- a/storage/innodb_plugin/include/dict0crea.h 2010-08-04 02:24:19.000000000 +0900
1422
 
+++ b/storage/innodb_plugin/include/dict0crea.h 2010-08-27 16:16:49.262982080 +0900
 
1411
--- a/storage/innodb_plugin/include/dict0crea.h
 
1412
+++ b/storage/innodb_plugin/include/dict0crea.h
1423
1413
@@ -53,6 +53,14 @@
1424
1414
        dict_index_t*   index,  /*!< in: index to create, built as a memory data
1425
1415
                                structure */
1473
1463
 
1474
1464
 #ifndef UNIV_NONINL
1475
1465
 #include "dict0crea.ic"
1476
 
diff -ruN a/storage/innodb_plugin/include/dict0dict.h b/storage/innodb_plugin/include/dict0dict.h
1477
 
--- a/storage/innodb_plugin/include/dict0dict.h 2010-08-27 16:11:12.177142545 +0900
1478
 
+++ b/storage/innodb_plugin/include/dict0dict.h 2010-08-27 16:16:49.263981911 +0900
 
1466
--- a/storage/innodb_plugin/include/dict0dict.h
 
1467
+++ b/storage/innodb_plugin/include/dict0dict.h
1479
1468
@@ -1057,10 +1057,18 @@
1480
1469
 dict_update_statistics(
1481
1470
 /*===================*/
1504
1493
 };
1505
1494
 #endif /* !UNIV_HOTBACKUP */
1506
1495
 
1507
 
diff -ruN a/storage/innodb_plugin/include/que0que.h b/storage/innodb_plugin/include/que0que.h
1508
 
--- a/storage/innodb_plugin/include/que0que.h   2010-08-04 02:24:19.000000000 +0900
1509
 
+++ b/storage/innodb_plugin/include/que0que.h   2010-08-27 16:16:49.266982471 +0900
 
1496
--- a/storage/innodb_plugin/include/que0que.h
 
1497
+++ b/storage/innodb_plugin/include/que0que.h
1510
1498
@@ -495,6 +495,8 @@
1511
1499
 #define QUE_NODE_CALL          31
1512
1500
 #define QUE_NODE_EXIT          32
1516
1504
 /* Query thread states */
1517
1505
 #define QUE_THR_RUNNING                1
1518
1506
 #define QUE_THR_PROCEDURE_WAIT 2
1519
 
diff -ruN a/storage/innodb_plugin/include/row0mysql.h b/storage/innodb_plugin/include/row0mysql.h
1520
 
--- a/storage/innodb_plugin/include/row0mysql.h 2010-08-04 02:24:19.000000000 +0900
1521
 
+++ b/storage/innodb_plugin/include/row0mysql.h 2010-08-27 16:16:49.271982518 +0900
 
1507
--- a/storage/innodb_plugin/include/row0mysql.h
 
1508
+++ b/storage/innodb_plugin/include/row0mysql.h
1522
1509
@@ -376,6 +376,22 @@
1523
1510
                                        then checked for not being too
1524
1511
                                        large. */
1542
1529
 Scans a table create SQL string and adds to the data dictionary
1543
1530
 the foreign key constraints declared in the string. This function
1544
1531
 should be called after the indexes for a table have been created.
1545
 
diff -ruN a/storage/innodb_plugin/include/srv0srv.h b/storage/innodb_plugin/include/srv0srv.h
1546
 
--- a/storage/innodb_plugin/include/srv0srv.h   2010-08-27 16:15:55.197989840 +0900
1547
 
+++ b/storage/innodb_plugin/include/srv0srv.h   2010-08-27 16:16:49.285142419 +0900
 
1532
--- a/storage/innodb_plugin/include/srv0srv.h
 
1533
+++ b/storage/innodb_plugin/include/srv0srv.h
1548
1534
@@ -197,6 +197,9 @@
1549
1535
 extern ibool   srv_innodb_status;
1550
1536
 
1555
1541
 
1556
1542
 extern ibool   srv_use_doublewrite_buf;
1557
1543
 extern ibool   srv_use_checksums;
1558
 
diff -ruN a/storage/innodb_plugin/que/que0que.c b/storage/innodb_plugin/que/que0que.c
1559
 
--- a/storage/innodb_plugin/que/que0que.c       2010-08-04 02:24:20.000000000 +0900
1560
 
+++ b/storage/innodb_plugin/que/que0que.c       2010-08-27 16:16:49.291984923 +0900
 
1544
--- a/storage/innodb_plugin/que/que0que.c
 
1545
+++ b/storage/innodb_plugin/que/que0que.c
1561
1546
@@ -622,11 +622,21 @@
1562
1547
 
1563
1548
                que_graph_free_recursive(cre_ind->ind_def);
1598
1583
        } else if (type == QUE_NODE_ROW_PRINTF) {
1599
1584
                thr = row_printf_step(thr);
1600
1585
        } else {
1601
 
diff -ruN a/storage/innodb_plugin/row/row0ins.c b/storage/innodb_plugin/row/row0ins.c
1602
 
--- a/storage/innodb_plugin/row/row0ins.c       2011-02-12 04:20:43.000000000 +0900
1603
 
+++ b/storage/innodb_plugin/row/row0ins.c       2011-03-30 15:57:54.000000000 +0900
 
1586
--- a/storage/innodb_plugin/row/row0ins.c
 
1587
+++ b/storage/innodb_plugin/row/row0ins.c
1604
1588
@@ -2020,6 +2020,8 @@
1605
1589
        }
1606
1590
 
1610
1594
        {
1611
1595
                page_t* page = btr_cur_get_page(&cursor);
1612
1596
                rec_t*  first_rec = page_rec_get_next(
1613
 
diff -ruN a/storage/innodb_plugin/row/row0merge.c b/storage/innodb_plugin/row/row0merge.c
1614
 
--- a/storage/innodb_plugin/row/row0merge.c     2010-08-04 02:24:19.000000000 +0900
1615
 
+++ b/storage/innodb_plugin/row/row0merge.c     2010-08-27 16:16:49.295984498 +0900
 
1597
--- a/storage/innodb_plugin/row/row0merge.c
 
1598
+++ b/storage/innodb_plugin/row/row0merge.c
1616
1599
@@ -2021,6 +2021,8 @@
1617
1600
                "UPDATE SYS_INDEXES SET NAME=CONCAT('"
1618
1601
                TEMP_INDEX_PREFIX_STR "', NAME) WHERE ID = :indexid;\n"
1622
1605
                /* Drop the field definitions of the index. */
1623
1606
                "DELETE FROM SYS_FIELDS WHERE INDEX_ID = :indexid;\n"
1624
1607
                /* Drop the index definition and the B-tree. */
1625
 
diff -ruN a/storage/innodb_plugin/row/row0mysql.c b/storage/innodb_plugin/row/row0mysql.c
1626
 
--- a/storage/innodb_plugin/row/row0mysql.c     2010-08-04 02:24:20.000000000 +0900
1627
 
+++ b/storage/innodb_plugin/row/row0mysql.c     2010-08-27 16:16:49.304981955 +0900
 
1608
--- a/storage/innodb_plugin/row/row0mysql.c
 
1609
+++ b/storage/innodb_plugin/row/row0mysql.c
1628
1610
@@ -862,6 +862,9 @@
1629
1611
 
1630
1612
        table->stat_modified_counter = counter + 1;
1734
1716
                           "               DELETE FROM SYS_FIELDS\n"
1735
1717
                           "               WHERE INDEX_ID = index_id;\n"
1736
1718
                           "               DELETE FROM SYS_INDEXES\n"
1737
 
diff -ruN a/storage/innodb_plugin/row/row0row.c b/storage/innodb_plugin/row/row0row.c
1738
 
--- a/storage/innodb_plugin/row/row0row.c       2011-02-12 04:20:26.000000000 +0900
1739
 
+++ b/storage/innodb_plugin/row/row0row.c       2011-03-30 15:57:54.000000000 +0900
 
1719
--- a/storage/innodb_plugin/row/row0row.c
 
1720
+++ b/storage/innodb_plugin/row/row0row.c
1740
1721
@@ -345,6 +345,14 @@
1741
1722
 
1742
1723
        rec_len = rec_offs_n_fields(offsets);
1767
1748
                field = rec_get_nth_field(rec, offsets, i, &len);
1768
1749
 
1769
1750
                dfield_set_data(dfield, field, len);
1770
 
diff -ruN a/storage/innodb_plugin/row/row0upd.c b/storage/innodb_plugin/row/row0upd.c
1771
 
--- a/storage/innodb_plugin/row/row0upd.c       2011-02-12 04:20:43.000000000 +0900
1772
 
+++ b/storage/innodb_plugin/row/row0upd.c       2011-03-30 15:57:54.000000000 +0900
 
1751
--- a/storage/innodb_plugin/row/row0upd.c
 
1752
+++ b/storage/innodb_plugin/row/row0upd.c
1773
1753
@@ -439,6 +439,12 @@
1774
1754
                                0);
1775
1755
                }
1802
1782
                data = rec_get_nth_field(rec, offsets, i, &len);
1803
1783
 
1804
1784
                dfield = dtuple_get_nth_field(entry, i);
1805
 
diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c
1806
 
--- a/storage/innodb_plugin/srv/srv0srv.c       2010-08-27 16:15:55.198987678 +0900
1807
 
+++ b/storage/innodb_plugin/srv/srv0srv.c       2010-08-27 16:16:49.311984856 +0900
 
1785
--- a/storage/innodb_plugin/srv/srv0srv.c
 
1786
+++ b/storage/innodb_plugin/srv/srv0srv.c
1808
1787
@@ -369,6 +369,9 @@
1809
1788
 /* When estimating number of different key values in an index, sample
1810
1789
 this many index pages */
1815
1794
 
1816
1795
 UNIV_INTERN ibool      srv_use_doublewrite_buf = TRUE;
1817
1796
 UNIV_INTERN ibool      srv_use_checksums = TRUE;
1818
 
diff -ruN a/storage/innodb_plugin/trx/trx0rec.c b/storage/innodb_plugin/trx/trx0rec.c
1819
 
--- a/storage/innodb_plugin/trx/trx0rec.c       2011-02-12 04:20:26.000000000 +0900
1820
 
+++ b/storage/innodb_plugin/trx/trx0rec.c       2011-03-30 15:57:54.000000000 +0900
 
1797
--- a/storage/innodb_plugin/trx/trx0rec.c
 
1798
+++ b/storage/innodb_plugin/trx/trx0rec.c
1821
1799
@@ -665,14 +665,27 @@
1822
1800
        /* Save to the undo log the old values of the columns to be updated. */
1823
1801