Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Critical
 - 
    Resolution: Fixed
 - 
    5.5.27, 5.3.9
 - 
    None
 - 
    None
 
Description
If add to setup_without_group call of condition virtual method it will kill server during virew.test:
					--- sql/sql_select.cc	2012-08-31 22:23:30 +0000
			 | 
		
					+++ sql/sql_select.cc	2012-10-15 12:36:35 +0000
			 | 
		
					@@ -564,6 +564,7 @@ inline int setup_without_group(THD *thd,
			 | 
		
					 
			 | 
		
					   thd->lex->allow_sum_func&= ~(1 << thd->lex->current_select->nest_level);
			 | 
		
					   res= setup_conds(thd, tables, leaves, conds);
			 | 
		
					+  DBUG_PRINT("info", ("type %u", (uint)((*conds) ? (*conds)->type(): 0)));
			 | 
		
					 
			 | 
		
					   /* it's not wrong to have non-aggregated columns in a WHERE */
			 | 
		
					   thd->lex->current_select->set_non_agg_field_used(saved_non_agg_field_used);
			 | 
		
The problematic test suite is
					--echo #
			 | 
		
					--echo # LP bug #793386: unexpected 'Duplicate column name ''' error
			 | 
		
					--echo #                 at the second execution of a PS using a view 
			 | 
		
					--echo #
			 | 
		
| 
					 | 
		
					CREATE TABLE t1 (f1 int, f2 int, f3 int, f4 int);
			 | 
		
| 
					 | 
		
					CREATE VIEW v1 AS
			 | 
		
					  SELECT t.f1, t.f2, s.f3, s.f4 FROM t1 t, t1 s
			 | 
		
					    WHERE t.f4 >= s.f2 AND s.f3 < 0;
			 | 
		
| 
					 | 
		
					PREPARE stmt1 FROM 
			 | 
		
					 "SELECT s.f1 AS f1, s.f2 AS f2, s.f3 AS f3, t.f4 AS f4
			 | 
		
					    FROM v1 AS t LEFT JOIN v1 AS s ON t.f4=s.f4 WHERE t.f2 <> 1225";
			 | 
		
					EXECUTE stmt1;
			 | 
		
					EXECUTE stmt1;
			 | 
		
| 
					 | 
		
					DEALLOCATE PREPARE stmt1;
			 | 
		
| 
					 | 
		
					DROP VIEW v1;
			 | 
		
					DROP TABLE t1;
			 |