Browse Source
			
			
			Fix LP BUG#682683
			
				
		Fix LP BUG#682683
	
		
	
			
				Analysis: The fix for LP BUG#680846 avoids evaluation of constant expressions with subqueries in the GROUP/ORDER clauses in the procedure remove_const(). The purpose of remove_const is to remove constant expressions in the GROUP/ORDER clauses. In order delay until execution the evaluation of such subqueries, they were not removed in the GROUP/ORDER clause. As a result temp table creation during execution attempted to create a column in the temp table for each constant GROUP/ORDER expression. However, the logic in create_tmp_table is to not create temp table columns for constant items. The crash was due to a group Item without a corresponding column in the temp table for GROUP BY. Solution: The patch adds back removal of constant expressions with subqueries. In order for such expressions to be evaluated, so that the server can ensure that such subquries return 1 row, the evaluation of these expressions is delayed until execution.pull/374/head
				 4 changed files with 111 additions and 7 deletions
			
			
		- 
					40mysql-test/r/subselect4.result
- 
					30mysql-test/t/subselect4.test
- 
					38sql/sql_select.cc
- 
					10sql/sql_select.h
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue