Commit graph

257 commits

Author SHA1 Message Date
bell@sanja.is.com.ua
0594d6af8b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
2005-01-18 01:15:02 +02:00
reggie@bob.(none)
e1dc421a04 Bug #7966 query cache doesn't work properly with batch statements
sql_lex.cc:
  Set query to not cacheable if we are using multistatements and there are multiple statements in this query
2005-01-17 13:40:36 -06:00
bell@sanja.is.com.ua
ff3b643959 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
2005-01-16 18:36:50 +02:00
bell@sanja.is.com.ua
2ca7c0062f postreview changes 2005-01-16 18:36:13 +02:00
bell@sanja.is.com.ua
dd56d63f48 error of parsing can occur in any SELECT, so all SELECTs have to be checked 2005-01-11 11:53:39 +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
acurtis@pcgem.rdg.cyberkinetica.com
9818cadd1b WL#2274 - INSERT..SELECT..UPDATE
UPDATE clause conflicts with SELECT for use of item_list field.
  Alter UPDATE clause to use new lex field update_list
  Tests included
2004-12-13 12:26:28 +00:00
bell@sanja.is.com.ua
f20e7a82b7 now we create temporary join for all queries with subqueries to make correct cleunup of tables and avoid too early unlock (BUG#6841) 2004-11-30 21:41:12 +02:00
bell@sanja.is.com.ua
77540c8996 moved procedure list initialization (BUG#6517) 2004-11-15 14:37:40 +02:00
monty@mishka.local
57a85986ac Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mishka.local:/home/my/mysql-4.1
2004-10-14 18:06:38 +03:00
monty@mishka.local
719c88e38f true,false -> TRUE, FALSE
Simple fixes/optimization of things discovered during review of new pushed code
2004-10-14 18:03:46 +03:00
konstantin@mysql.com
5abc3de22b A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)"
crashes server." The fix makes Item_func_rand prepared-statements
aware plus it fixes the case when RAND is used in prepared
statements and replication is on (as well as several similar issues).
Until now we did not reset THD before every execution of a prepared
statement, so if some execution had set thd->time_zone_used
or thd->rand_used they would not be reset until next mysql_parse.
Some of post-review fixes done.
2004-10-14 02:53:59 +04:00
bell@sanja.is.com.ua
b1374836b3 wording fixed 2004-09-16 18:37:26 +03:00
bell@sanja.is.com.ua
97a1418d16 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-update-4.1
2004-09-16 17:47:53 +03:00
ingo@mysql.com
ce8db2bfb7 BUG#5318 - failure: 'IGNORE_SPACE' affects numeric values after DEFAULT.
Added a check to recover from IGNORE_SPACE in this situation: 
<ident-character(s)><space><dot><ident-character(s)>
The ignored space led to the false identification of the dot
as an ident separator (like "db.table").
2004-09-14 13:49:08 +02:00
bell@sanja.is.com.ua
0badc913bb check that table used in multi-update is unique added (BUG#5455) 2004-09-08 13:39:15 +03:00
konstantin@mysql.com
522a27069f Merge: manual resolve 2004-08-24 23:07:08 +04:00
konstantin@mysql.com
ae18dc3ec8 Fix for Bug#5034 "prepared "select 1 into @arg15", second
execute crashes server": we were deleting lex->result
after each execute, but prepared statements assumed that
it's left intact.
The fix adds cleanup() method to select_result hierarchy,
so that result objects can be reused.
Plus we now need to delete result objects more wisely.
2004-08-24 20:17:11 +04:00
bell@sanja.is.com.ua
3ca433e332 merge 2004-08-23 15:50:59 +03: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
bell@sanja.is.com.ua
0ce931947e skip resolving field in table list if table list is not accessable due to groupping (BUG#4814) 2004-08-13 10:01:30 +03:00
dlenev@brandersnatch.localdomain
f49d4f5350 Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
or setting of @@time_zone variable we should open and lock them with the rest of 
statement's table (so we should add them to global table list) and after that use such 
pre-opened tables for loading info about time zones.
2004-08-10 12:42:31 +04:00
bell@sanja.is.com.ua
a1b6f6db0e LEX initialization fixed 2004-07-21 22:44:12 +03:00
bell@sanja.is.com.ua
2f5c9b7aa5 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-innodb-4.1
2004-06-23 18:58:52 +03:00
bar@mysql.com
34d413a6a0 Optimization to use less memory. 2004-06-10 19:10:21 +05:00
bell@sanja.is.com.ua
98a7b49dc5 do not unlock tables early if we have subquery in HAVING clause (BUG#3984) 2004-06-09 23:32:20 +03:00
dlenev@brandersnatch.localdomain
0e6217e999 Fix for bug which caused temp_table.test fail on Darwin 7.3
The code in mysql_create_table() code assumes that if lower_case_names==2 then table alias 
should contain unchanged table name, and this was not true for temporary tables which
had 'tmp-table' constant as alias. Now we are using table name as alias for such tables.
2004-05-24 15:48:19 +04: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
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
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
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
sergefp@mysql.com
cc2eb9d5c3 Renamed MY_LEX_COLON to MY_LEX_SEMICOLON (at Serg's request) 2004-04-28 01:49:05 +04:00
sergefp@mysql.com
b8802c514d Fix for BUG#3567: Disallow several SQL statements inside a Prepared Statement. 2004-04-27 03:44:41 +04:00
magnus@neptunus.(none)
50ff8ea369 Formatting changes requested by Monty 2004-04-15 09:17:55 +02:00
monty@mysql.com
7d9a9fd93a Added missing return statement 2004-04-12 03:26:32 +03:00
bell@sanja.is.com.ua
a535342d57 after review PS fixes 2004-04-10 01:14:32 +03:00
bell@sanja.is.com.ua
56be6f3f93 merge 2004-04-08 00:19:43 +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
monty@mysql.com
42cf92ce37 Fixed many compiler warnings
Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
Set locked_in_memory properly
2004-04-05 13:56:05 +03: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
bell@sanja.is.com.ua
443870e95e fixed comments 2004-03-15 11:02:54 +02:00
bell@sanja.is.com.ua
a66b398eb8 merge 2004-02-17 11:12:55 +02:00
bell@sanja.is.com.ua
f4d1ee971b merge 2004-02-17 01:52:33 +02:00
monty@mysql.com
e9315f984d Changed wellformedlen to well_formed_len
Fixed that blobs >16M can be inserted/updated
Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE
2004-02-17 01:35:17 +02:00
bell@sanja.is.com.ua
3f86f10a57 ulternative bugfix for BUG#2508 and fix for BUG#2809 - every table has its own TABLE structure 2004-02-17 01:14:51 +02:00
bell@sanja.is.com.ua
44b37b089a merge 2004-02-14 13:31:39 +02:00