MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tables2.inc
1 # suite/funcs_1/datadict/tables2.inc
2 #
3 # Auxiliary script to be sourced by suite/funcs_1/datadict/tables1.inc.
4 #
5 # Author:
6 # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
7 # testsuite funcs_1
8 # Create this script based on older scripts and new code.
9 #
10 ################################################################################
11 
12 # 8 TABLE_ROWS
13 # 9 AVG_ROW_LENGTH
14 # 10 DATA_LENGTH
15 # 11 MAX_DATA_LENGTH
16 # 12 INDEX_LENGTH
17 # 13 DATA_FREE
18 # 15 CREATE_TIME
19 # 16 UPDATE_TIME
20 # 17 CHECK_TIME
21 # 20 CREATE_OPTIONS
22 # 21 TABLE_COMMENT User defined comment
23 # + InnoDB
24 # + NDB: "number_of_replicas: <number>" appended
25 # + InnoDB: "InnoDB free: <number_kB> kB" appended
26 # <number_kB> depends on tablespace history!
27 # The LEFT/INSTR/IF/LENGTH stuff should remove these
28 # storage engine specific part.
29 let $innodb_pattern = 'InnoDB free';
30 let $ndb_pattern = 'number_of_replicas';
31 --vertical_results
32 # We do not unify the engine name here, because the rowformat is
33 # specific to the engine.
34 --replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#"
35 eval
36 SELECT *,
37  LEFT( table_comment,
38  IF(INSTR(table_comment,$innodb_pattern) = 0
39  AND INSTR(table_comment,$ndb_pattern) = 0,
40  LENGTH(table_comment),
41  INSTR(table_comment,$innodb_pattern)
42  + INSTR(table_comment,$ndb_pattern) - 1))
43  AS "user_comment",
44  '-----------------------------------------------------' AS "Separator"
45 FROM information_schema.tables
46 $my_where
47 ORDER BY table_schema,table_name;
48 --horizontal_results