1
# Copyright (C) 2009 Sun Microsystems, Inc. All rights reserved.
2
# Use is subject to license terms.
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; version 2 of the License.
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
18
# Note: usage of date/time columns has been removed
19
# for the time being. Feel free to experiment to
20
# add them back in later. This would require altering
21
# the gendata file, conf/drizzle/drizzle.zz
23
# meant to be run with the gendata file: conf/drizzle/drizzle.zz
27
SELECT select_option outer_select_item
29
WHERE subquery_expression outer_logical_expr outer_condition_top
30
outer_having outer_order_by ;
36
OUTR . field_name AS X |
37
aggregate_function OUTR . field_name ) AS X;
41
COUNT(DISTINCT | COUNT( |
44
STD( | STDDEV_POP( | STDDEV_SAMP( |
46
VAR_POP( | VAR_SAMP( | VARIANCE( |
49
aggregate_function_disabled_unpredictable_value:
53
outer_table_name AS OUTR |
54
outer_table_name AS OUTR2 LEFT JOIN outer_table_name AS OUTR ON ( outer_join_condition );
57
OUTR2 . int_field_name arithmetic_operator OUTR . int_field_name |
58
OUTR2 . char_field_name arithmetic_operator OUTR . char_field_name ;
61
ORDER BY OUTR . field_name , OUTR . `pk` ;
64
| GROUP BY OUTR . field_name ;
67
| HAVING X arithmetic_operator value;
69
outer_having_disabled_bug38072:
70
| HAVING X arithmetic_operator value ;
77
WHERE inner_condition_top
81
SELECT select_option inner_select_item
85
| ORDER BY INNR . field_name ;
88
INNR . int_field_name AS Y ;
91
inner_table_name AS INNR |
92
inner_table_name AS INNR2 LEFT JOIN inner_table_name AS INNR ON ( inner_join_condition );
95
INNR2 . int_field_name arithmetic_operator INNR . int_field_name |
96
INNR2 . char_field_name arithmetic_operator INNR . char_field_name ;
99
outer_condition_bottom |
100
( outer_condition_bottom logical_operator outer_condition_bottom ) |
101
outer_condition_bottom logical_operator outer_condition_bottom ;
103
outer_condition_bottom:
107
field_name null_operator |
108
int_field_name int_expression |
109
char_field_name char_expression ;
112
arithmetic_operator digit ;
116
arithmetic_operator _varchar(1);
121
inner_condition_bottom logical_operator inner_condition_bottom |
122
inner_condition_bottom logical_operator outer_condition_bottom ;
124
inner_condition_bottom:
126
INNR . int_field_name arithmetic_operator INNR . int_field_name |
127
INNR . char_field_name arithmetic_operator INNR . char_field_name ;
129
null_operator: IS NULL | IS NOT NULL ;
132
AND | OR | OR NOT | XOR | AND NOT ;
135
= | > | < | <> | >= | <= ;
138
OUTR . int_field_name IN ( SELECT select_option INNR . int_field_name AS Y select_inner_body ) |
139
OUTR . char_field_name IN ( SELECT select_option INNR . char_field_name AS Y select_inner_body ) |
140
( OUTR . int_field_name , OUTR . int_field_name ) IN ( SELECT select_option INNR . int_field_name AS X , INNR . int_field_name AS Y select_inner_body ) |
141
( OUTR . char_field_name , OUTR . char_field_name ) IN ( SELECT select_option INNR . char_field_name AS X , INNR . char_field_name AS Y select_inner_body ) ;
144
int_field_name | char_field_name ;
147
`pk` | `col_int_key` | `col_int` |
148
`col_bigint` | `col_bigint_key` |
149
`col_int_not_null` | `col_int_not_null_key` ;
152
`col_char_10` | `col_char_10_key` | `col_text_not_null` | `col_text_not_null_key` |
153
`col_text_key` | `col_text` | `col_char_10_not_null_key` | `col_char_10_not_null` |
154
`col_char_1024` | `col_char_1024_key` | `col_char_1024_not_null` | `col_char_1024_not_null_key` ;
156
char_field_name_disabled:
157
# need to explore enum more before enabling this
158
`col_enum` | `col_enum_key` | `col_enum_not_null` | `col_enum_not_null_key` ;
161
AA | BB | AA | BB | C | D | CC | DD | A ;
164
BB | CC | DD | BB | CC | DD | C | D | A ;
166
value: _digit | _date | _time | _datetime | _varchar(1) | NULL ;