Commit graph

212 commits

Author SHA1 Message Date
bell@sanja.is.com.ua
dcdda90a11 Merge 2005-03-30 10:27:36 +03:00
serg@serg.mylan
f21f8f983f client/mysqltest.c
corrected number of fields for --enable_metadata
sql/sql_union.cc
    fixed a apparent typo in assert
2005-03-23 20:38:42 +01:00
bell@sanja.is.com.ua
4554b1f263 fixed union types merging and table related metadata (BUG#8824) 2005-03-23 08:36:48 +02:00
ramil@mysql.com
89a105abc5 a fix for --ps-protocol (bug #6089: FOUND_ROWS returns wrong values when no table/view is used) 2005-03-02 20:00:48 +04:00
gluh@gluh.mysql.r18.ru
34915f7a91 A fix: bug#6931: Date Type column problem when using UNION-Table
bug#7833:  Wrong datatype of aggregate column is returned
2005-02-04 15:31:36 +03:00
Sinisa@sinisa.nasamreza.org
477047401c fixing wrong value for "examined rows" when UNION's are used. 2005-01-18 23:13:29 +02:00
monty@mysql.com
1bd22faa05 Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
This allows use to use INSERT IGNORE ... ON DUPLICATE ...
2004-12-31 12:04:35 +02:00
bell@sanja.is.com.ua
f5e253dc2f reporting empty result added in case of max/min optimisation of ALL/ANY/SOME subqueries
fixed null processing in NOT operation used in ALL subquery (Bug #6247)
2004-11-18 18:10:07 +02:00
monty@mysql.com
b903a129e2 Simpler arena swapping code
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
2004-11-08 01:13:54 +02:00
monty@mysql.com
6fbc869d18 A lot of fixes for prepared statements (PS):
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
2004-10-26 19:30:01 +03:00
konstantin@mysql.com
e3abcb6b53 A fix and test case for Bug#6088 "FOUND_ROWS returns wrong values for
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.
2004-10-22 22:51:16 +04:00
konstantin@mysql.com
016d5adeeb Followup to fix for bug#6050: fix valgrind warnings. 2004-10-22 20:21:55 +04:00
konstantin@mysql.com
a7c52d755b A fix and test case for Bug#6050 "EXECUTE stmt reports ambiguous field
names with ident. tables fr. diff. schemata": revise all uses of
Item_field and make them prepared-statements friendly when necessary.
2004-10-22 14:47:35 +04:00
bar@mysql.com
cdd9d656b4 sql_union.cc:
Check DERIVATION_NONE only for UNIONS.
2004-10-19 11:45:33 +05:00
bar@mysql.com
47f638054e Bug #6139 UNION doesn't understand collate in the column of second select 2004-10-18 17:56:25 +05:00
monty@mysql.com
62f3cd6a31 Merge with 4.0 for 4.1 release
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied
2004-10-06 19:14:33 +03:00
Sinisa@sinisa.nasamreza.org
2ffb87f6a5 Fix for wrongly calculated Examined_rows in 4.0 UNION's. 2004-10-05 14:47:10 +03:00
ram@gw.mysql.r18.ru
f91ca0bd66 A fix (Bug #4980: union statement with () union () order by produces wrong explain). 2004-09-03 19:59:29 +05:00
konstantin@mysql.com
568c6e8526 Fix for bug#4912 "mysqld crashs in case a statement is executed
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.
2004-08-21 02:02:46 +04:00
serg@serg.mylan
11128fb672 asserting table->file->enable_indexes() in union re-execution 2004-05-21 09:31:28 +02:00
bell@sanja.is.com.ua
192eb65e26 after merge fix 2004-05-19 18:13:21 +03:00
bell@sanja.is.com.ua
bd010b1ec3 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-explain-4.1
2004-05-19 17:09:40 +03:00
Sinisa@sinisa.nasamreza.org
2d656181dc Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2004-05-15 18:30:04 +03:00
Sinisa@sinisa.nasamreza.org
0806214620 Optimising UNION ALL (WL 1687) 2004-05-15 16:13:08 +03:00
bell@sanja.is.com.ua
bb34b56bfd Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-explain-4.1
2004-05-14 15:29:23 +03:00
bell@sanja.is.com.ua
a9501fd7aa after merge fix 2004-05-14 15:28:59 +03:00
bell@sanja.is.com.ua
71a374dc13 Merge 2004-05-14 13:33:02 +03:00
bell@sanja.is.com.ua
d2fa79b291 keep old engine & JOIN if we changed subquery Item (Bug #3646) 2004-05-07 23:06:11 +03:00
bell@sanja.is.com.ua
c5d8497ee0 postreview fixes 2004-05-07 00:32:44 +03:00
bell@sanja.is.com.ua
a31452c512 fake_select_lex should be prepared during PS preparation to work correctly
item_list for fake_select will be created only once
(problem reported by valgrind in test_union2 fixed)
2004-05-07 00:08:21 +03:00
bell@sanja.is.com.ua
3aae50e8c0 EXPLAIN UNION using same routing which used for execution which allow return correct bug messages (Bug #3639)
EXPLAIN of hidden SELECT of UNION
2004-05-06 20:40:21 +03:00
bell@sanja.is.com.ua
26f0825cae merge 2004-05-05 22:30:01 +03:00
monty@mysql.com
6827fe4086 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-05-05 21:24:45 +03:00
monty@mysql.com
a5d8b846fa after merge fixes 2004-05-05 21:24:21 +03:00
bell@sanja.is.com.ua
62fca61bc4 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-ndb-4.1
2004-05-05 21:24:13 +03:00
bell@sanja.is.com.ua
c5c35c667e caching of queries with isammerge tables forbiden using general way
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
2004-05-05 21:21:41 +03:00
miguel@hegel.local
8d1480f7c5 Windows fixes for VC++ compiler compability 2004-05-05 02:59:17 -03:00
Sinisa@sinisa.nasamreza.org
ee627d2510 Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2004-05-04 23:05:37 +03:00
Sinisa@sinisa.nasamreza.org
333eadf1b2 Fix for a bug involving UNION's and SET SQL_SELECT_LIMIT 2004-05-03 19:15:26 +03:00
bell@sanja.is.com.ua
66e7ff2a8c return table list of fake_select in empty state to prevent using TABLE_LIST allocated on stack in next execution of PS (Bug #3577) 2004-05-03 13:58:01 +03:00
bell@sanja.is.com.ua
5e37c41fae new error for unsupported command in PS
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)
2004-04-08 00:16:17 +03:00
bell@sanja.is.com.ua
2f4d2a0e38 fixed brocken of client_test
fixed aggregate functions in PS (BUG#3360)
2004-04-03 11:13:51 +03:00
monty@mysql.com
447baa9011 After merge fixes + simple optimizations 2004-03-26 11:06:53 +02:00
monty@mysql.com
e0e0314d60 Merge with 4.0 2004-03-25 23:29:45 +02:00
monty@mysql.com
3b34a6a2dd Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-03-25 22:18:31 +02:00
monty@mysql.com
1448199bd7 Cleanups & safety fixes 2004-03-25 22:11:22 +02:00
bell@sanja.is.com.ua
3bf55c9a3d Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-alias-4.1
2004-03-25 14:40:36 +02:00
serg@serg.mylan
99886df867 correct support for a mix of UNION/UNION ALL in the same query.
Bug#1428
2004-03-23 14:43:24 +01:00
bell@sanja.is.com.ua
ce7798c45e fixed union with prepared statement bug found by Konstantin 2004-03-23 14:26:54 +02:00
Sinisa@sinisa.nasamreza.org
2eaa07f199 union.result:
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)
2004-03-22 16:35:15 +02:00