same as above
sql_lex.h:
same as above
sql_union.cc:
same as aobve
sql_select.cc:
Fixing that SQL_CALC_FOUND_ROWS work properly in UNION's in 4.1
Plus updating some fields in THD in the proper places
plus fixing a wrong result
Code clean-up
sql_union.cc, union.test, union.result:
A fix for a bug #978.
This enables that NULL's can be entered into UNION's result set,
although first SELECT columns are NOT NULL.
This is also a start of fixing UNION's properly regarding type
acceptance.
sql_select.cc:
A commit for my second July SPRINT task
It looks like samll revolution in SELECT_LEX tree, but it was only natural way to solve problem with name resolution of external fields inside subselect which belongs to global order of union
also it have following advantages:
- removed mess with current_select type conversion
- type checking/converting
- a lot of virtual methods
- fake select for union execution allocated only once (it was allocated for every subselect with union executing)
changes:
fixed bug with outer fields name resolution of subqueries which belong to global ORDER BY clause
remuved select_lex() function, now thd->lex.current_select always have type SELECT_LEX
new SELECT_LEX (fake_select_lex) will be allocated in case of UNION for using in UNION processing
fake_select_lex allocated for union hold global ORDER BY & LIMIT clauses and have linkage equal to GLOBAL_OPTIONS_TYPE
new description of SELECT_LEX tree
(SCRUM)
bmove_allign -> bmove_align
Added OLAP function ROLLUP
Split mysql_fix_privilege_tables to a script and a .sql data file
Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects.
Added table_alias_charset, for easier --lower-case-table-name handling
Better SQL_MODE handling (Setting complex options also sets sub options)
New (faster) assembler string functions for x86
Very nasty bug.
It was caused by double free()-ing memory of join->select and
join->quick.
I was able to pinpoint it only after using Valgrind.
Plus better fix for bug with TMP_TABLE_PARAM.
Plus new constructor for SELECT_LEX.
Parameters for temporary tables were created locally in the function
and it's address passed to a field in select_result, which produced
random errors when MyISAM table was created based on this bogus
address.