~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to mysql-test/t/explain.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# Test of different EXPLAIN's
 
2
# Test of different EXPLAINs
3
3
 
4
4
--disable_warnings
5
5
drop table if exists t1;
157
157
SELECT @@session.sql_mode INTO @old_sql_mode;
158
158
SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
159
159
 
160
 
# EXPLAIN EXTENDED (with subselect). used to crash. should give NOTICE.
161
 
--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS
 
160
# EXPLAIN EXTENDED (with subselect). used to crash.
 
161
# This is actually a valid query for this sql_mode,
 
162
# but it was transformed in such a way that it failed, see
 
163
# Bug#12329653 - EXPLAIN, UNION, PREPARED STATEMENT, CRASH, SQL_FULL_GROUP_BY
162
164
EXPLAIN EXTENDED SELECT 1 FROM t1
163
165
                          WHERE f1 > ALL( SELECT t.f1 FROM t1,t1 AS t );
164
 
SHOW WARNINGS;
165
166
 
166
167
SET SESSION sql_mode=@old_sql_mode;
167
168
 
228
229
 
229
230
DROP TABLE t1;
230
231
 
 
232
--echo #
 
233
--echo # Bug#56814 Explain + subselect + fulltext crashes server
 
234
--echo #
 
235
 
 
236
CREATE TABLE t1(f1 VARCHAR(6) NOT NULL,
 
237
FULLTEXT KEY(f1),UNIQUE(f1));
 
238
INSERT INTO t1 VALUES ('test');
 
239
 
 
240
EXPLAIN SELECT 1 FROM t1
 
241
WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a ON (MATCH(t1.f1) AGAINST (""))
 
242
WHERE t1.f1 GROUP BY t1.f1));
 
243
 
 
244
PREPARE stmt FROM
 
245
'EXPLAIN SELECT 1 FROM t1
 
246
 WHERE 1 > ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
 
247
 ON (MATCH(t1.f1) AGAINST (""))
 
248
 WHERE t1.f1 GROUP BY t1.f1))';
 
249
 
 
250
EXECUTE stmt;
 
251
EXECUTE stmt;
 
252
 
 
253
DEALLOCATE PREPARE stmt;
 
254
 
 
255
PREPARE stmt FROM
 
256
'EXPLAIN SELECT 1 FROM t1
 
257
 WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a
 
258
 ON (MATCH(t1.f1) AGAINST (""))
 
259
 WHERE t1.f1 GROUP BY t1.f1))';
 
260
 
 
261
EXECUTE stmt;
 
262
EXECUTE stmt;
 
263
 
 
264
DEALLOCATE PREPARE stmt;
 
265
 
 
266
DROP TABLE t1;
 
267
 
231
268
--echo End of 5.1 tests.