summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
Commit message (Collapse)AuthorAgeFilesLines
* Simpler arena swapping codemonty@mysql.com2004-11-081-7/+7
| | | | | | | | | Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root. This gives us the following benefits: - Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases) - Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT) - We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
* A lot of fixes for prepared statements (PS):monty@mysql.com2004-10-261-2/+7
| | | | | | | | | | | | | | | | New mysqltest that can run mysqltest with PS Added support for ZEROFILL in PS Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result() Updated test cases to support --ps-protocol (Some tests are still run using old protocol) Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2... Fixed crash in PS when using sub queries Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever" Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries) Fix for PS and SELECT ... PROCEDURE Reset all warnings when executing a new PS query group_concat(...ORDER BY) didn't work with PS Fixed problem with test suite when not using innodb
* A fix and test case for Bug#6088 "FOUND_ROWS returns wrong values forkonstantin@mysql.com2004-10-221-15/+13
| | | | | | | prepared statements when LIMIT is used" and post-review comments. The fix changes the approach we calculate the need for ORDER BY in UNION: the previous was not PS friendly, as it damaged SELECT_LEX options in case of single select.
* Followup to fix for bug#6050: fix valgrind warnings.konstantin@mysql.com2004-10-221-1/+1
|
* A fix and test case for Bug#6050 "EXECUTE stmt reports ambiguous field konstantin@mysql.com2004-10-221-3/+21
| | | | | names with ident. tables fr. diff. schemata": revise all uses of Item_field and make them prepared-statements friendly when necessary.
* sql_union.cc:bar@mysql.com2004-10-191-5/+6
| | | | Check DERIVATION_NONE only for UNIONS.
* Bug #6139 UNION doesn't understand collate in the column of second selectbar@mysql.com2004-10-181-0/+17
|
* Merge with 4.0 for 4.1 releasemonty@mysql.com2004-10-061-0/+5
|\ | | | | | | | | | | | | Noteworthy: - New HANDLER code - New multi-update-grant-check code - Table lock code in ha_innodb.cc was not applied
| * Fix for wrongly calculated Examined_rows in 4.0 UNION's.Sinisa@sinisa.nasamreza.org2004-10-051-2/+7
| |
| * A fix (Bug #4980: union statement with () union () order by produces wrong ↵ram@gw.mysql.r18.ru2004-09-031-0/+4
| | | | | | | | explain).
* | Fix for bug#4912 "mysqld crashs in case a statement is executedkonstantin@mysql.com2004-08-211-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a second time". The bug was caused by incompatibility of negations elimination algorithm and PS: during first statement execute a subtree with negation was replaced with equivalent subtree without NOTs. The problem was that although this transformation was permanent, items of the new subtree were created in execute-local memory. The patch adds means to check if it is the first execute of a prepared statement, and if this is the case, to allocate items in memory of the prepared statement. The implementation: - backports Item_arena from 5.0 - adds Item_arena::is_stmt_prepare(), Item_arena::is_first_stmt_execute(). - deletes THD::allocate_temporary_pool_for_ps_preparing(), THD::free_temporary_pool_for_ps_preparing(); they were redundant. and adds a few invariants: - thd->free_list never contains junk (= freed items) - thd->current_arena is never null. If there is no prepared statement, it points at the thd. The rest of the patch contains mainly mechanical changes and cleanups.
* | asserting table->file->enable_indexes() in union re-executionserg@serg.mylan2004-05-211-7/+10
| |
* | after merge fixbell@sanja.is.com.ua2004-05-191-1/+2
| |
* | Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1bell@sanja.is.com.ua2004-05-191-3/+7
|\ \ | | | | | | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-explain-4.1
| * \ Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1Sinisa@sinisa.nasamreza.org2004-05-151-3/+7
| |\ \ | | | | | | | | | | | | into sinisa.nasamreza.org:/mnt/work/mysql-4.1
| | * | Optimising UNION ALL (WL 1687)Sinisa@sinisa.nasamreza.org2004-05-151-3/+7
| | | |
* | | | Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1bell@sanja.is.com.ua2004-05-141-0/+29
|\ \ \ \ | |/ / / | | | | | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-explain-4.1
| * | | keep old engine & JOIN if we changed subquery Item (Bug #3646)bell@sanja.is.com.ua2004-05-071-0/+29
| |/ /
* | | after merge fixbell@sanja.is.com.ua2004-05-141-1/+1
| | |
* | | Mergebell@sanja.is.com.ua2004-05-141-6/+28
|\ \ \ | |/ / |/| |
| * | EXPLAIN UNION using same routing which used for execution which allow return ↵bell@sanja.is.com.ua2004-05-061-7/+29
| | | | | | | | | | | | | | | | | | correct bug messages (Bug #3639) EXPLAIN of hidden SELECT of UNION
* | | postreview fixesbell@sanja.is.com.ua2004-05-071-1/+2
| | |
* | | fake_select_lex should be prepared during PS preparation to work correctlybell@sanja.is.com.ua2004-05-071-18/+60
|/ / | | | | | | | | item_list for fake_select will be created only once (problem reported by valgrind in test_union2 fixed)
* | mergebell@sanja.is.com.ua2004-05-051-3/+1
|\ \
| * \ Merge bk-internal.mysql.com:/home/bk/mysql-4.1monty@mysql.com2004-05-051-3/+1
| |\ \ | | | | | | | | | | | | into mysql.com:/home/my/mysql-4.1
| | * | after merge fixesmonty@mysql.com2004-05-051-3/+1
| | | |
* | | | Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1bell@sanja.is.com.ua2004-05-051-12/+3
|\ \ \ \ | |/ / / |/| | | | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-ndb-4.1
| * | | caching of queries with isammerge tables forbiden using general waybell@sanja.is.com.ua2004-05-051-12/+3
| |/ / | | | | | | | | | | | | SQL_SELECT_LIMIT as default will be applied only for SELECT statement if there was not explicit LIMIT clause correct table list passed to class constructor of select_update
* | | Windows fixes for VC++ compiler compabilitymiguel@hegel.local2004-05-051-2/+1
|/ /
* | Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1Sinisa@sinisa.nasamreza.org2004-05-041-3/+12
|\ \ | | | | | | | | | into sinisa.nasamreza.org:/mnt/work/mysql-4.1
| * | Fix for a bug involving UNION's and SET SQL_SELECT_LIMIT Sinisa@sinisa.nasamreza.org2004-05-031-3/+12
| | |
* | | return table list of fake_select in empty state to prevent using TABLE_LIST ↵bell@sanja.is.com.ua2004-05-031-0/+5
|/ / | | | | | | allocated on stack in next execution of PS (Bug #3577)
* | new error for unsupported command in PSbell@sanja.is.com.ua2004-04-081-1/+12
| | | | | | | | | | | | | | | | | | fixed IN subselect with basic constant left expression SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406) fixed multiupdate privelege check (BUG#3408) fixed multiupdate tables check (BUG#3411) unchecked commands now is rejected by PS protocol to avoid serever crash fixed cleunup procedure to be compatible sith DO/SET (BUG#3393)
* | fixed brocken of client_test bell@sanja.is.com.ua2004-04-031-13/+0
| | | | | | | | fixed aggregate functions in PS (BUG#3360)
* | After merge fixes + simple optimizationsmonty@mysql.com2004-03-261-1/+1
| |
* | Merge with 4.0monty@mysql.com2004-03-251-0/+14
|\ \ | |/
| * union.result:Sinisa@sinisa.nasamreza.org2004-03-221-0/+10
| | | | | | | | | | | | | | | | A test case for the bug that allowed table names to be used in ORDER BY columns (But #3064) union.test: A test case for the bug that allowed table names to be used in ORDER BY columns (But #3064) sql_union.cc: A fix for a bug that allowed table names to be used in ORDER BY columns (But #3064)
* | Merge bk-internal.mysql.com:/home/bk/mysql-4.1monty@mysql.com2004-03-251-1/+8
|\ \ | | | | | | | | | into mysql.com:/home/my/mysql-4.1
| * | Cleanups & safety fixesmonty@mysql.com2004-03-251-1/+8
| | |
* | | Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1bell@sanja.is.com.ua2004-03-251-10/+23
|\ \ \ | |/ / |/| | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-alias-4.1
| * | fixed union with prepared statement bug found by Konstantinbell@sanja.is.com.ua2004-03-231-10/+23
| | |
* | | correct support for a mix of UNION/UNION ALL in the same query.serg@serg.mylan2004-03-231-1/+5
|/ / | | | | | | Bug#1428
* | after review changesbell@sanja.is.com.ua2004-03-201-5/+15
| |
* | DBUG_ASSERT(fixed == 1); added to val*bell@sanja.is.com.ua2004-03-181-1/+1
| | | | | | | | small optimisation in signed_literal
* | DBUG_ASSERT(fixed == 0) added to fix_fields()bell@sanja.is.com.ua2004-03-171-2/+7
| |
* | mergebell@sanja.is.com.ua2004-02-171-0/+6
|\ \
| * \ Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1bell@sanja.is.com.ua2004-02-101-0/+6
| |\ \ | | | | | | | | | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-prepared-4.1
| | * | fixed subquery with PS (BUG#2462)bell@sanja.is.com.ua2004-02-081-0/+6
| | | | | | | | | | | | | | | | fixed UNION preparation
* | | | ulternative bugfix for BUG#2508 and fix for BUG#2809 - every table has its ↵bell@sanja.is.com.ua2004-02-171-25/+0
| | | | | | | | | | | | | | | | own TABLE structure
* | | | merge fixesSinisa@sinisa.nasamreza.org2004-02-111-0/+4
|\ \ \ \ | |/ / / |/| | |