~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/t/randgen_queries.test

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
key (`col_enum_key` )) ENGINE=innodb;
46
46
set AUTOCOMMIT=OFF;
47
47
 
48
 
#
49
 
select table_schema, 
 
48
# bookkeeping query in Executor/Drizzle.pm in randgen
 
49
select SQL_BIG_RESULT table_schema, 
50
50
       table_name, 
51
51
       CASE WHEN table_type = 'STANDARD' THEN 'table' 
52
52
            WHEN table_type = 'FUNCTION' then 'function' 
53
53
       ELSE 'misc' END, 
54
54
       column_name,
55
 
       CASE WHEN IS_USED_IN_PRIMARY = 'TRUE' THEN 'primary' 
56
 
             WHEN IS_INDEXED = 'TRUE' THEN 'indexed' 
 
55
       CASE WHEN IS_USED_IN_PRIMARY = 'YES' THEN 'primary' 
 
56
             WHEN IS_INDEXED = 'YES' THEN 'indexed' 
57
57
       ELSE 'indexed' END 
58
58
       FROM data_dictionary.tables INNER JOIN
59
 
            data_dictionary.columns USING(table_schema, table_name) limit 20;
 
59
            data_dictionary.columns USING(table_schema, table_name) ORDER BY table_schema, table_name limit 20;
 
60
# end bookkeeping test
 
61
 
 
62
# bookkeeping query in Executor/Drizzle.pm in randgen - variant 1
 
63
# test of non-DATA_DICTIONARY / INFORMATION_SCHEMA tables
 
64
CREATE SCHEMA randgen_query_test;
 
65
USE randgen_query_test;
 
66
CREATE TABLE t1 (a INT);
 
67
CREATE TABLE t2 LIKE t1;
 
68
CREATE TABLE t3 LIKE t1;
 
69
CREATE TABLE t4 (b CHAR(500));
 
70
CREATE TABLE t5 LIKE t4;
 
71
 
 
72
select SQL_BIG_RESULT table_schema,
 
73
       table_name,
 
74
       CASE WHEN table_type = 'STANDARD' THEN 'table'
 
75
            WHEN table_type = 'FUNCTION' then 'function'
 
76
       ELSE 'misc' END,
 
77
       column_name,
 
78
       CASE WHEN IS_USED_IN_PRIMARY = 'YES' THEN 'primary'
 
79
             WHEN IS_INDEXED = 'YES' THEN 'indexed'
 
80
       ELSE 'indexed' END
 
81
       FROM data_dictionary.tables INNER JOIN
 
82
            data_dictionary.columns USING(table_schema, table_name) WHERE table_schema NOT IN ('DATA_DICTIONARY','INFORMATION_SCHEMA')
 
83
       ORDER BY table_schema, table_name limit 20;
 
84
 
 
85
DROP SCHEMA randgen_query_test;
 
86
USE test;
 
87
# end bookkeeping test
60
88
 
61
89
 
62
90
select AVG(`col_int_key`) + AVG(`col_int`) AS average1,
63
91
                        (SUM(`col_int_key`) + SUM(`col_int`)) / COUNT(*) AS average2,
64
92
                        COUNT(*) AS count FROM t1;
65
93
 
 
94
--sorted_result
66
95
select collation_name,character_set_name FROM data_dictionary.collations;
67
96
--replace_column 1 ####.##.####
 
97
--sorted_result
68
98
select COUNT(*) from data_dictionary.tables;
 
99
 
 
100
DROP TABLE t1;