MySQL 5.7 Reference Manual
xviii
18.2.1 RANGE Partitioning ...................................................................................... 2527
18.2.2 LIST Partitioning ........................................................................................... 2531
18.2.3 COLUMNS Partitioning ................................................................................. 2534
18.2.4 HASH Partitioning ........................................................................................ 2541
18.2.5 KEY Partitioning ........................................................................................... 2544
18.2.6 Subpartitioning ............................................................................................. 2546
18.2.7 How MySQL Partitioning Handles NULL ........................................................ 2549
18.3 Partition Management ............................................................................................. 2553
18.3.1 Management of RANGE and LIST Partitions .................................................. 2554
18.3.2 Management of HASH and KEY Partitions ..................................................... 2560
18.3.3 Exchanging Partitions and Subpartitions with Tables ....................................... 2561
18.3.4 Maintenance of Partitions ............................................................................. 2568
18.3.5 Obtaining Information About Partitions ........................................................... 2570
18.4 Partition Pruning ..................................................................................................... 2572
18.5 Partition Selection ................................................................................................... 2575
18.6 Restrictions and Limitations on Partitioning ............................................................... 2581
18.6.1 Partitioning Keys, Primary Keys, and Unique Keys ......................................... 2587
18.6.2 Partitioning Limitations Relating to Storage Engines ....................................... 2590
18.6.3 Partitioning Limitations Relating to Functions ................................................. 2591
18.6.4 Partitioning and Locking ............................................................................... 2592
19 Stored Programs and Views ............................................................................................... 2595
19.1 Defining Stored Programs ....................................................................................... 2596
19.2 Using Stored Routines (Procedures and Functions) ................................................... 2597
19.2.1 Stored Routine Syntax .................................................................................. 2597
19.2.2 Stored Routines and MySQL Privileges ......................................................... 2598
19.2.3 Stored Routine Metadata .............................................................................. 2599
19.2.4 Stored Procedures, Functions, Triggers, and LAST_INSERT_ID() .................... 2599
19.3 Using Triggers ........................................................................................................ 2599
19.3.1 Trigger Syntax and Examples ....................................................................... 2600
19.3.2 Trigger Metadata .......................................................................................... 2603
19.4 Using the Event Scheduler ...................................................................................... 2604
19.4.1 Event Scheduler Overview ............................................................................ 2604
19.4.2 Event Scheduler Configuration ...................................................................... 2605
19.4.3 Event Syntax ............................................................................................... 2607
19.4.4 Event Metadata ............................................................................................ 2607
19.4.5 Event Scheduler Status ................................................................................ 2608
19.4.6 The Event Scheduler and MySQL Privileges .................................................. 2609
19.5 Using Views ........................................................................................................... 2611
19.5.1 View Syntax ................................................................................................. 2612
19.5.2 View Processing Algorithms .......................................................................... 2612
19.5.3 Updatable and Insertable Views .................................................................... 2614
19.5.4 The View WITH CHECK OPTION Clause ...................................................... 2616
19.5.5 View Metadata ............................................................................................. 2617
19.6 Access Control for Stored Programs and Views ........................................................ 2617
19.7 Binary Logging of Stored Programs ......................................................................... 2619
20 INFORMATION_SCHEMA Tables ....................................................................................... 2625
20.1 The INFORMATION_SCHEMA CHARACTER_SETS Table ....................................... 2628
20.2 The INFORMATION_SCHEMA COLLATIONS Table ................................................. 2628
20.3 The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY
Table ............................................................................................................................. 2629
20.4 The INFORMATION_SCHEMA COLUMNS Table ..................................................... 2629
20.5 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table .................................. 2630
20.6 The INFORMATION_SCHEMA ENGINES Table ....................................................... 2631
20.7 The INFORMATION_SCHEMA EVENTS Table ........................................................ 2631
20.8 The INFORMATION_SCHEMA FILES Table ............................................................ 2635
20.9 The INFORMATION_SCHEMA GLOBAL_STATUS and SESSION_STATUS Tables .... 2637
20.10 The INFORMATION_SCHEMA GLOBAL_VARIABLES and SESSION_VARIABLES
Tables ............................................................................................................................ 2638