1
by brian
clean slate |
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 |
--replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#" |
|
33 |
eval
|
|
34 |
SELECT *, |
|
35 |
LEFT( table_comment, |
|
36 |
IF(INSTR(table_comment,$innodb_pattern) = 0 |
|
37 |
AND INSTR(table_comment,$ndb_pattern) = 0, |
|
38 |
LENGTH(table_comment), |
|
39 |
INSTR(table_comment,$innodb_pattern) |
|
40 |
+ INSTR(table_comment,$ndb_pattern) - 1)) |
|
41 |
AS "user_comment", |
|
42 |
'-----------------------------------------------------' AS "Separator" |
|
43 |
FROM information_schema.tables |
|
44 |
$my_where |
|
45 |
ORDER BY table_schema,table_name; |
|
46 |
--horizontal_results |
|
47 |