~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/funcs_1/r/is_tables_ndb.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
DROP DATABASE IF EXISTS test1;
 
2
DROP DATABASE IF EXISTS test2;
 
3
CREATE DATABASE test1;
 
4
CREATE DATABASE test2;
 
5
CREATE TABLE test1.t1  (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
 
6
CREATE TABLE test1.t2  (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
 
7
CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
 
8
SELECT *,
 
9
LEFT( table_comment,
 
10
IF(INSTR(table_comment,'InnoDB free') = 0
 
11
AND INSTR(table_comment,'number_of_replicas') = 0,
 
12
LENGTH(table_comment),
 
13
INSTR(table_comment,'InnoDB free')
 
14
+ INSTR(table_comment,'number_of_replicas') - 1))
 
15
AS "user_comment",
 
16
'-----------------------------------------------------' AS "Separator"
 
17
FROM information_schema.tables
 
18
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
 
19
ORDER BY table_schema,table_name;
 
20
TABLE_CATALOG   NULL
 
21
TABLE_SCHEMA    test1
 
22
TABLE_NAME      t1
 
23
TABLE_TYPE      BASE TABLE
 
24
ENGINE  ndbcluster
 
25
VERSION 10
 
26
ROW_FORMAT      Dynamic
 
27
TABLE_ROWS      #TBLR#
 
28
AVG_ROW_LENGTH  #ARL#
 
29
DATA_LENGTH     #DL#
 
30
MAX_DATA_LENGTH #MDL#
 
31
INDEX_LENGTH    #IL#
 
32
DATA_FREE       #DF#
 
33
AUTO_INCREMENT  NULL
 
34
CREATE_TIME     #CRT#
 
35
UPDATE_TIME     #UT#
 
36
CHECK_TIME      #CT#
 
37
TABLE_COLLATION latin1_swedish_ci
 
38
CHECKSUM        NULL
 
39
CREATE_OPTIONS  #CO#
 
40
TABLE_COMMENT   #TC#
 
41
user_comment    
 
42
Separator       -----------------------------------------------------
 
43
TABLE_CATALOG   NULL
 
44
TABLE_SCHEMA    test1
 
45
TABLE_NAME      t2
 
46
TABLE_TYPE      BASE TABLE
 
47
ENGINE  ndbcluster
 
48
VERSION 10
 
49
ROW_FORMAT      Dynamic
 
50
TABLE_ROWS      #TBLR#
 
51
AVG_ROW_LENGTH  #ARL#
 
52
DATA_LENGTH     #DL#
 
53
MAX_DATA_LENGTH #MDL#
 
54
INDEX_LENGTH    #IL#
 
55
DATA_FREE       #DF#
 
56
AUTO_INCREMENT  NULL
 
57
CREATE_TIME     #CRT#
 
58
UPDATE_TIME     #UT#
 
59
CHECK_TIME      #CT#
 
60
TABLE_COLLATION latin1_swedish_ci
 
61
CHECKSUM        NULL
 
62
CREATE_OPTIONS  #CO#
 
63
TABLE_COMMENT   #TC#
 
64
user_comment    
 
65
Separator       -----------------------------------------------------
 
66
TABLE_CATALOG   NULL
 
67
TABLE_SCHEMA    test2
 
68
TABLE_NAME      t1
 
69
TABLE_TYPE      BASE TABLE
 
70
ENGINE  ndbcluster
 
71
VERSION 10
 
72
ROW_FORMAT      Dynamic
 
73
TABLE_ROWS      #TBLR#
 
74
AVG_ROW_LENGTH  #ARL#
 
75
DATA_LENGTH     #DL#
 
76
MAX_DATA_LENGTH #MDL#
 
77
INDEX_LENGTH    #IL#
 
78
DATA_FREE       #DF#
 
79
AUTO_INCREMENT  NULL
 
80
CREATE_TIME     #CRT#
 
81
UPDATE_TIME     #UT#
 
82
CHECK_TIME      #CT#
 
83
TABLE_COLLATION latin1_swedish_ci
 
84
CHECKSUM        NULL
 
85
CREATE_OPTIONS  #CO#
 
86
TABLE_COMMENT   #TC#
 
87
user_comment    
 
88
Separator       -----------------------------------------------------
 
89
SHOW TABLES FROM test1;
 
90
Tables_in_test1
 
91
t1
 
92
t2
 
93
SHOW TABLES FROM test2;
 
94
Tables_in_test2
 
95
t1
 
96
DROP   USER testuser1@localhost;
 
97
CREATE USER testuser1@localhost;
 
98
GRANT SELECT ON test1.* TO testuser1@localhost;
 
99
# Establish connection testuser1 (user=testuser1)
 
100
SELECT *,
 
101
LEFT( table_comment,
 
102
IF(INSTR(table_comment,'InnoDB free') = 0
 
103
AND INSTR(table_comment,'number_of_replicas') = 0,
 
104
LENGTH(table_comment),
 
105
INSTR(table_comment,'InnoDB free')
 
106
+ INSTR(table_comment,'number_of_replicas') - 1))
 
107
AS "user_comment",
 
108
'-----------------------------------------------------' AS "Separator"
 
109
FROM information_schema.tables
 
110
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
 
111
ORDER BY table_schema,table_name;
 
112
TABLE_CATALOG   NULL
 
113
TABLE_SCHEMA    test1
 
114
TABLE_NAME      t1
 
115
TABLE_TYPE      BASE TABLE
 
116
ENGINE  ndbcluster
 
117
VERSION 10
 
118
ROW_FORMAT      Dynamic
 
119
TABLE_ROWS      #TBLR#
 
120
AVG_ROW_LENGTH  #ARL#
 
121
DATA_LENGTH     #DL#
 
122
MAX_DATA_LENGTH #MDL#
 
123
INDEX_LENGTH    #IL#
 
124
DATA_FREE       #DF#
 
125
AUTO_INCREMENT  NULL
 
126
CREATE_TIME     #CRT#
 
127
UPDATE_TIME     #UT#
 
128
CHECK_TIME      #CT#
 
129
TABLE_COLLATION latin1_swedish_ci
 
130
CHECKSUM        NULL
 
131
CREATE_OPTIONS  #CO#
 
132
TABLE_COMMENT   #TC#
 
133
user_comment    
 
134
Separator       -----------------------------------------------------
 
135
TABLE_CATALOG   NULL
 
136
TABLE_SCHEMA    test1
 
137
TABLE_NAME      t2
 
138
TABLE_TYPE      BASE TABLE
 
139
ENGINE  ndbcluster
 
140
VERSION 10
 
141
ROW_FORMAT      Dynamic
 
142
TABLE_ROWS      #TBLR#
 
143
AVG_ROW_LENGTH  #ARL#
 
144
DATA_LENGTH     #DL#
 
145
MAX_DATA_LENGTH #MDL#
 
146
INDEX_LENGTH    #IL#
 
147
DATA_FREE       #DF#
 
148
AUTO_INCREMENT  NULL
 
149
CREATE_TIME     #CRT#
 
150
UPDATE_TIME     #UT#
 
151
CHECK_TIME      #CT#
 
152
TABLE_COLLATION latin1_swedish_ci
 
153
CHECKSUM        NULL
 
154
CREATE_OPTIONS  #CO#
 
155
TABLE_COMMENT   #TC#
 
156
user_comment    
 
157
Separator       -----------------------------------------------------
 
158
SHOW TABLES FROM test1;
 
159
Tables_in_test1
 
160
t1
 
161
t2
 
162
SHOW TABLES FROM test2;
 
163
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2'
 
164
# Switch to connection default and close connection testuser1
 
165
DROP USER testuser1@localhost;
 
166
DROP DATABASE test1;
 
167
DROP DATABASE test2;