~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/randgen_queries.result

  • Committer: Monty Taylor
  • Date: 2010-03-11 18:27:20 UTC
  • mfrom: (1333 staging)
  • mto: This revision was merged to the branch mainline in revision 1348.
  • Revision ID: mordred@inaugust.com-20100311182720-hd1h87y6cb1b1mp0
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1;
 
2
show variables like 'version';
 
3
Variable_name   Value
 
4
version ####.##.####
 
5
select version();
 
6
version()
 
7
####.##.####
 
8
select database();
 
9
database()
 
10
test
 
11
CREATE TABLE `t1` (
 
12
`col_bigint` bigint,
 
13
`col_text` text,
 
14
`col_char` char (1),
 
15
`col_enum` enum ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'),
 
16
`col_int` int,
 
17
`col_char_not_null` char (1) not null,
 
18
`col_int_not_null_key` int not null,
 
19
`col_text_not_null` text not null,
 
20
`col_enum_not_null_key` enum ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') not null,
 
21
`col_int_key` int,
 
22
`col_char_key` char (1),
 
23
`col_enum_not_null` enum ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') not null,
 
24
`col_text_not_null_key` text not null,
 
25
pk integer auto_increment,
 
26
`col_bigint_key` bigint,
 
27
`col_int_not_null` int not null,
 
28
`col_bigint_not_null` bigint not null,
 
29
`col_bigint_not_null_key` bigint not null,
 
30
`col_char_not_null_key` char (1) not null,
 
31
`col_text_key` text,
 
32
`col_enum_key` enum ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'),
 
33
/*Indices*/
 
34
key (`col_int_not_null_key` ),
 
35
key (`col_enum_not_null_key` ),
 
36
key (`col_int_key` ),
 
37
key (`col_char_key` ),
 
38
key (`col_text_not_null_key`  (255)),
 
39
primary key (pk),
 
40
key (`col_bigint_key` ),
 
41
key (`col_bigint_not_null_key` ),
 
42
key (`col_char_not_null_key` ),
 
43
key (`col_text_key`  (255)),
 
44
key (`col_enum_key` )) ENGINE=innodb;
 
45
Warnings:
 
46
Warning 1071    Specified key was too long; max key length is 767 bytes
 
47
Warning 1071    Specified key was too long; max key length is 767 bytes
 
48
set AUTOCOMMIT=OFF;
 
49
select table_schema, 
 
50
table_name, 
 
51
'STANDARD',
 
52
#       CASE WHEN table_type = 'STANDARD' THEN 'table' 
 
53
#            WHEN table_type = 'VIEW' THEN 'view' 
 
54
#            WHEN table_type = 'FUNCTION' then 'view' 
 
55
#       ELSE 'misc' END, 
 
56
column_name,
 
57
CASE WHEN IS_USED_IN_PRIMARY = 'TRUE' THEN 'primary' 
 
58
#      WHEN column_key = 'MUL' THEN 'indexed' 
 
59
#      WHEN column_key = 'UNI' THEN 'indexed' 
 
60
ELSE 'indexed' END 
 
61
FROM data_dictionary.index_parts;
 
62
table_schema    table_name      STANDARD        column_name     CASE WHEN IS_USED_IN_PRIMARY = 'TRUE' THEN 'primary' 
 
63
#      WHEN column_key = 'MUL' THEN 'indexed' 
 
64
#      WHEN column_key = 'UNI' THEN 'indexed' 
 
65
ELSE 'indexed' END 
 
66
 
 
67
test    t1      STANDARD        pk      primary
 
68
test    t1      STANDARD        col_int_not_null_key    indexed
 
69
test    t1      STANDARD        col_enum_not_null_key   indexed
 
70
test    t1      STANDARD        col_int_key     indexed
 
71
test    t1      STANDARD        col_char_key    indexed
 
72
test    t1      STANDARD        col_text_not_null_key   indexed
 
73
test    t1      STANDARD        col_bigint_key  indexed
 
74
test    t1      STANDARD        col_bigint_not_null_key indexed
 
75
test    t1      STANDARD        col_char_not_null_key   indexed
 
76
test    t1      STANDARD        col_text_key    indexed
 
77
test    t1      STANDARD        col_enum_key    indexed
 
78
select AVG(`col_int_key`) + AVG(`col_int`) AS average1,
 
79
(SUM(`col_int_key`) + SUM(`col_int`)) / COUNT(*) AS average2,
 
80
COUNT(*) AS count FROM t1;
 
81
average1        average2        count
 
82
NULL    NULL    0
 
83
select collation_name,character_set_name FROM data_dictionary.collations;
 
84
collation_name  character_set_name
 
85
utf8_general_ci utf8_general_ci
 
86
utf8_bin        utf8_general_ci
 
87
utf8_unicode_ci utf8_general_ci
 
88
utf8_icelandic_ci       utf8_general_ci
 
89
utf8_latvian_ci utf8_general_ci
 
90
utf8_romanian_ci        utf8_general_ci
 
91
utf8_slovenian_ci       utf8_general_ci
 
92
utf8_polish_ci  utf8_general_ci
 
93
utf8_estonian_ci        utf8_general_ci
 
94
utf8_spanish_ci utf8_general_ci
 
95
utf8_swedish_ci utf8_general_ci
 
96
utf8_turkish_ci utf8_general_ci
 
97
utf8_czech_ci   utf8_general_ci
 
98
utf8_danish_ci  utf8_general_ci
 
99
utf8_lithuanian_ci      utf8_general_ci
 
100
utf8_slovak_ci  utf8_general_ci
 
101
utf8_spanish2_ci        utf8_general_ci
 
102
utf8_roman_ci   utf8_general_ci
 
103
utf8_persian_ci utf8_general_ci
 
104
utf8_esperanto_ci       utf8_general_ci
 
105
utf8_hungarian_ci       utf8_general_ci
 
106
utf8_sinhala_ci utf8_general_ci
 
107
binary  binary
 
108
select COUNT(*) from data_dictionary.tables;
 
109
COUNT(*)
 
110
33