Commit graph

54 commits

Author SHA1 Message Date
bell@sanja.is.com.ua
28207ede02 (SCRUM)
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)
2003-07-03 02:30:52 +03:00
bell@sanja.is.com.ua
7b77c5a2d3 merged 2003-06-25 23:52:15 +03:00
bell@sanja.is.com.ua
01217497b5 merging 2003-05-26 15:52:19 +03:00
bell@sanja.is.com.ua
1a064a43a7 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-top-4.1
2003-05-26 09:28:56 +03:00
monty@mashka.mysql.fi
6aa8929cf3 After merge fixes
Added initialization of all important global variables
2003-05-21 21:39:58 +03:00
bell@sanja.is.com.ua
3a30eda921 fixed memory overrun (bug 380) 2003-05-17 10:05:07 +03:00
bell@sanja.is.com.ua
1915632163 subselect transformation moved in after-fix_field place
removed "of is null" if it is possible
  (this cset should be SCRUM related, but not approved as scrum task yet)
2003-05-14 21:51:33 +03:00
Sinisa@sinisa.nasamreza.org
3ca1a152eb Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.
2003-04-26 15:12:14 +03:00
Sinisa@sinisa.nasamreza.org
47f67214d9 A fix for a crashing bug in EXPLAIN on derived tables with a join. 2003-04-10 21:05:28 +03:00
monty@narttu.mysql.fi
e7288f279e After merge fixes
Don't create temporary objects with no table name
2003-03-17 15:05:04 +02:00
Sinisa@sinisa.nasamreza.org
ffa8a47b6d three bug fixes and major code cleanup 2003-03-06 17:02:10 +02:00
Sinisa@sinisa.nasamreza.org
410cbef6b3 Code clean-up 2003-02-15 16:05:58 +02:00
Sinisa@sinisa.nasamreza.org
5acf83802d fix a bug in derived tables
UNION's bug fixes and code clean-up
2003-02-13 17:56:01 +02:00
monty@mashka.mysql.fi
3695c64111 Merge work:/home/bk/mysql-4.1 into mashka.mysql.fi:/home/my/mysql-4.1 2003-02-12 23:18:00 +02:00
monty@mashka.mysql.fi
e327393e9d Fixed a lot of wrong memory references as reported by valgrind
Portability fixes
Added new client function: mysql_get_server_version()
New server help code (From Victor Vagin)
Fixed wrong usage of binary()
Disabled RTREE usage for now.
2003-02-12 21:55:37 +02:00
venu@myvenu.com
0516b2bfee Windows compile fixups (To be verified by respective devs) 2003-02-04 18:50:48 -08:00
bell@sanja.is.com.ua
214036a7f6 improving of fields list creation in derived tables and unions
fixed length of fields created in fubselect
fixed resolving fields of reduced in derived table subselect
2003-01-29 19:42:39 +02:00
bell@sanja.is.com.ua
760e22f0bb after merge fix of 577 task (SCRUM, pre commit to be able to merge with static tables optimization fix)
fixed derived tables with subselect inside
2003-01-26 21:30:35 +02:00
bell@sanja.is.com.ua
44d8a8cdab merging 2003-01-25 13:19:46 +02:00
bell@sanja.is.com.ua
d56e23f64e fixed subselects with temporary tables (SCRUM)
fixed memory leacks
2003-01-25 02:25:52 +02:00
Sinisa@sinisa.nasamreza.org
3e302c524e A small fix for privilege system as reported by HF. 2003-01-21 14:50:55 +02:00
monty@mashka.mysql.fi
22aaac013b Fixed that derived tables are properly droped 2003-01-07 11:45:06 +02:00
bell@sanja.is.com.ua
7c0a074614 merging 2002-12-31 12:55:03 +02:00
bell@sanja.is.com.ua
1dd7cb52ae support of subselect without FROM reducing (SCRUM)
fixed bug of calling setup_fields without correct lex->current_select pointer in mysql_derived
more correct creation of reference in Item_field::fix_field
2002-12-26 01:28:59 +02:00
Sinisa@sinisa.nasamreza.org
5988ae5ca5 Many fixes.
I still have to make a test case for :

UPDATE from sub-select with derived table
2002-12-24 13:58:07 +02:00
Sinisa@sinisa.nasamreza.org
f9d38ef2f8 Adding comments as per Monty's request. 2002-12-14 15:13:25 +02:00
Sinisa@sinisa.nasamreza.org
a918a6a7a9 derived tables with UNION's ...
Scrum task !!!!!
2002-12-12 16:09:06 +02:00
monty@mashka.mysql.fi
35ff08c2af After merge fixes
Added THD to add_to_xxx_list() functions for faster parsing.
2002-12-06 21:11:27 +02:00
Sinisa@sinisa.nasamreza.org
25586e477a some bug fixes and tests for those.
I am pushing now, because :

* I have a fix for crashing bug
* Sanja will destroy my changes in sub-select test ... ;)
2002-11-30 19:53:31 +02:00
Sinisa@sinisa.nasamreza.org
a968d7c2ea many bug fixes 2002-11-30 18:46:24 +02:00
Sinisa@sinisa.nasamreza.org
481bcd5750 many bug fixes 2002-11-29 14:49:07 +02:00
Sinisa@sinisa.nasamreza.org
8a53d1ca6a adding mandatory aliases for derived tables as per SQL-99
doing it in sql_yacc.yy does not work
this commit contains fixes for other tests
there are fixes in subselect test which will have to be changed
once fix_fields is fixed to work with aliased derived tables
2002-11-28 19:19:21 +02:00
bell@sanja.is.com.ua
aa8af5d6f4 reverse order in global select list allow to avoid recursion in derived tables 2002-11-27 01:12:16 +02:00
Sinisa@sinisa.nasamreza.org
dd556e1439 A fix for a bug with derived tables within subselect
within derived tables within ......
2002-11-26 16:49:55 +02:00
Sinisa@sinisa.nasamreza.org
5a38621cc2 Merge sinisa@work.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2002-11-16 14:31:48 +02:00
bell@sanja.is.com.ua
7f4ee30de1 Fixed bugs pointed by "Crash with 'big' derivated table in MySQL-4.1" bugreport
- fixed switching from heap to MyISAM table
 - fixed error handler
2002-11-16 00:01:48 +02:00
Sinisa@sinisa.nasamreza.org
014073b013 A fix for the bug when MyISAM tmp table has to be created in order
to resolve derived table.

Will make a test case for this quite soon.
2002-11-15 19:58:07 +02:00
Sinisa@sinisa.nasamreza.org
7bd4fb813a some code cleanup as per CTO's instructions plus a small bug fix with
a corresponding test case....
2002-11-12 14:40:32 +02:00
Sinisa@sinisa.nasamreza.org
408d7b2d4c Merge sinisa@work.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2002-11-11 14:05:57 +02:00
Sinisa@sinisa.nasamreza.org
89adb79aad small bug fix 2002-11-11 14:04:50 +02:00
bell@sanja.is.com.ua
063ffd2d67 prevent using expernal fields in derived tables 2002-11-11 10:49:41 +02:00
Sinisa@sinisa.nasamreza.org
d96c670c70 Some code optimisations related to EXPLAIN of derived tables and the
resulting code cleanup in our main loop.
2002-11-09 15:40:46 +02:00
bell@sanja.is.com.ua
45f098bf60 moved similar code to function
onversion with check
2002-11-04 22:12:45 +02:00
Sinisa@sinisa.nasamreza.org
5fbd7b63c5 changes for mysqladmin debug
and a bug fix for derived tables
2002-10-30 16:52:12 +02:00
bell@sanja.is.com.ua
199f667c19 merging 2002-10-04 14:15:59 +03:00
monty@mashka.mysql.fi
d69250a969 Fixes and code cleanups after merge with 4.0.3
Warning handling and initial prepared statement handling (last not complete yet)
Changed a lot of functions that returned 0/1 to my_bool type.
GRANT handling now uses read/write locks instead of mutex
Change basic net functions to use THD instead of NET
(needed for 4.1 protocol)
Use my_sprintf instead of sprintf() + strlen()
Added alloc_query() to be able to chare query initialization code with
prepared statements.
Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID()

Note that the following test fails (will be fixed ASAP):
sub_select, union, rpl_rotate_logs and rpl_mystery22
2002-10-02 13:33:08 +03:00
bell@sanja.is.com.ua
46a22a5be7 new EXPLAIN
fixed bug in mysql-test/create-test-result
fixed bug in union-subselect engine
2002-09-26 23:08:22 +03:00
bell@sanja.is.com.ua
b07aaeb295 subselect with union
new error handling
Item_ref bug fixed
2002-09-03 09:50:36 +03:00
bell@sanja.is.com.ua
1684cfbc28 merging 2002-05-28 22:43:10 +03:00
bell@sanja.is.com.ua
55718d0f07 derived table with * bug fixed 2002-05-28 20:49:17 +03:00