File: tables2.inc

package info (click to toggle)
mysql-5.1 5.1.73-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 197,132 kB
  • ctags: 93,377
  • sloc: cpp: 579,952; ansic: 429,462; perl: 49,053; sh: 21,692; pascal: 21,272; yacc: 12,801; makefile: 4,545; xml: 4,114; sql: 3,297; lex: 1,265; asm: 1,023
file content (48 lines) | stat: -rw-r--r-- 1,822 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# suite/funcs_1/datadict/tables2.inc
#
# Auxiliary script to be sourced by suite/funcs_1/datadict/tables1.inc.
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
#                           testsuite funcs_1
#                   Create this script based on older scripts and new code.
#
################################################################################

#  8 TABLE_ROWS
#  9 AVG_ROW_LENGTH
# 10 DATA_LENGTH
# 11 MAX_DATA_LENGTH
# 12 INDEX_LENGTH
# 13 DATA_FREE
# 15 CREATE_TIME
# 16 UPDATE_TIME
# 17 CHECK_TIME
# 20 CREATE_OPTIONS
# 21 TABLE_COMMENT   User defined comment
#                    + InnoDB
#                    + NDB: "number_of_replicas: <number>" appended
#                    + InnoDB: "InnoDB free: <number_kB> kB" appended
#                      <number_kB> depends on tablespace history!
#                    The LEFT/INSTR/IF/LENGTH stuff should remove these
#                    storage engine specific part.
let $innodb_pattern = 'InnoDB free';
let $ndb_pattern    = 'number_of_replicas';
--vertical_results
# We do not unify the engine name here, because the rowformat is
# specific to the engine.
--replace_column  8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#"
eval
SELECT *,
       LEFT( table_comment,
             IF(INSTR(table_comment,$innodb_pattern) = 0
                     AND INSTR(table_comment,$ndb_pattern) = 0,
                LENGTH(table_comment),
                INSTR(table_comment,$innodb_pattern)
                     + INSTR(table_comment,$ndb_pattern) - 1))
       AS "user_comment",
       '-----------------------------------------------------' AS "Separator"
FROM information_schema.tables
$my_where
ORDER BY table_schema,table_name;
--horizontal_results