Commit graph

794 commits

Author SHA1 Message Date
konstantin@mysql.com
75454b0a1d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/work/mysql-4.1-4912
2004-08-21 02:08:20 +04: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
b267ce4bb4 sql_select.cc: compilation failure fixed 2004-08-20 20:10:49 +02:00
dlenev@brandersnatch.localdomain
b4105df897 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into brandersnatch.localdomain:/home/dlenev/src/mysql-4.1-bg4302
2004-08-20 19:30:45 +04:00
dlenev@brandersnatch.localdomain
c8882165f3 Fix for bug#4302 "ambiguos order by when renamed column is identical to another in result"
When in find_item_in_list() we are looking for item we should take into account unaliased 
names of the fields but only if item with such aliased name is not found.
Also we should ignore aliases when looking for fully specified field.
2004-08-20 17:53:46 +04:00
serg@serg.mylan
a29c9d3707 Bug #4769 - ft in subqueries 2004-08-19 18:40:15 +02:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
vva@eagle.mysql.r18.ru
3681594d08 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_4358/mysql-4.0
2004-08-13 02:25:50 +05:00
vva@eagle.mysql.r18.ru
5406709672 fixed Bug #4358 Problem with HAVING clause that uses alias
from the select list and TEXT field 

make setup_copy_fields to insert Item_copy_string for blobs in 
the beginning of the copy_funcs (push_back instead of push_front)

the thing is that Item_copy_string::copy for function can call 
Item_copy_string::val_int for blob via Item_ref.
But if Item_copy_string::copy for blob isn't called before, 
it's value will be wrong.

So all the Item_copy_string::copy for blobs should be called before 
Item_copy_string::copy for functions.
2004-08-12 20:37:31 +05: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
ingo@mysql.com
b88a47db3e bug#4497 - Serious regression if disk based TMP table is used.
Solved performance problems by enabling write buffer.
2004-08-09 11:39:26 +02:00
serg@serg.mylan
e1e1c39bda cleanup 2004-08-07 23:18:13 +02:00
serg@serg.mylan
eaaedb69a8 bug#4881 - crash in ALTER .. RENAME if rename fails 2004-08-07 18:26:59 +02:00
serg@serg.mylan
555442bf6a fixed ORDER BY ?
new tests to ensure that prepared statement *really* work
(and that MySQL not picks up some number from arbitrary location
that happens to match the parameter's value)
2004-07-21 19:17:07 +02:00
monty@mysql.com
db7efa2780 New handler::index_flags() definition to make it easy to check the full used key and a specific key part.
Added key part to optimize_range() to fix problems when using fields in key parts.
2004-07-08 15:45:25 +03:00
serg@serg.mylan
08738d2847 fowwlowup fixes for index_flags() 2004-06-30 10:40:15 +02:00
serg@serg.mylan
450e5b0119 after merge fixed 2004-06-26 14:21:32 +02:00
serg@serg.mylan
d2adc38cb6 merged 2004-06-25 23:20:46 +02:00
serg@serg.mylan
924de89305 release cursors in return_zero_rows 2004-06-25 21:43:02 +02:00
monty@mysql.com
b1d08ba2b4 Merge with 4.0 to get the latest bug patches to 4.1 2004-06-25 20:13:05 +03:00
monty@mysql.com
f6765146c1 Added missing root user to mysql.user on windows. (Bug #4242)
Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938)
Don't use default arguments for ha_rnd_init()
Simple code cleanups since last pull
2004-06-25 18:49:36 +03:00
bell@sanja.is.com.ua
4092635155 fixed EXPLAIN behaviour with prepared statements (BUG#4271) 2004-06-25 11:37:43 +03:00
serg@serg.mylan
37314708b7 merged 2004-06-24 23:29:28 +02:00
serg@serg.mylan
1c37f8e20e Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-06-24 19:47:53 +02:00
serg@serg.mylan
1ff21a9e64 bug#4089 - JOIN::join_free calling mysql_unlock w/o index_end() before 2004-06-24 19:46:50 +02:00
bell@sanja.is.com.ua
de9cefaa77 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-24 19:03:58 +03:00
ram@gw.mysql.r18.ru
21018e3420 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b4198
2004-06-24 14:33:36 +05:00
bell@sanja.is.com.ua
d3efbb9d3b 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-24 10:55:48 +03:00
serg@serg.mylan
9f45c9e399 followup to handler cleanup 2004-06-23 21:26:34 +02: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
serg@serg.mylan
c03addab79 merged 2004-06-23 12:36:07 +02:00
serg@serg.mylan
3f1c4ba745 handler interface cleanups:
more logical table/index_flags
  return  HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate
  max_keys and other limits renamed to max_supported_keys/etc
  max_keys/etc are now wrappers to max_supported_keys/etc 
  ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing
2004-06-23 12:29:05 +02:00
ram@gw.mysql.r18.ru
382ed47f5b A fix (Bug #4237: Server crash with a subquery SELECT).
Original test case was too big to add it.
Unfortunately I didn't manage to reduce it.
2004-06-23 13:40:59 +05:00
pem@mysql.comhem.se
34ddd9c515 Fixed BUG#3486: FOUND_ROWS() fails inside stored procedure [and prepared statement]. 2004-06-22 19:38:07 +02:00
ram@gw.mysql.r18.ru
b929db876d Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b4198
2004-06-22 10:58:16 +05:00
serg@sergbook.mysql.com
e2a3ca8637 use ref not range for ... WHERE key IN (val) 2004-06-21 19:42:00 +03:00
ram@gw.mysql.r18.ru
df727fbb65 a fix (bug #4198: Incorrect key file for table). 2004-06-21 15:17:07 +05:00
monty@mysql.com
d69a36d118 merge 2004-06-21 10:24:40 +03:00
dlenev@brandersnatch.localdomain
09ba29e539 WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
  
WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
function".
  
Fixed problems described in Bug #2336 (Different number of warnings 
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated 
at Field object level not in conversion functions).
  
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.
2004-06-18 10:11:31 +04:00
monty@mysql.com
fd0153304d Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173)
Fixed problem with NULL and derived tables (Bug #4097)
Cleanup of new pushed code
2004-06-18 03:02:29 +03: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
bell@sanja.is.com.ua
eeddb00234 fixed mistyping 2004-06-07 01:06:17 +03:00
monty@mysql.com
e6c5715126 after merge fixes 2004-06-02 12:13:49 +03:00
monty@mysql.com
70c2256d2f Merge with 4.0 to get fixes for netware 2004-06-02 00:09:14 +03:00
ram@gw.mysql.r18.ru
605962a938 a fix.
(Bug#3738: SQL_CALC_FOUND_ROWS ignores WHERE if LIMIT used,
 Bug#3845: wrong FOUND_ROWS result)
2004-05-28 15:01:16 +05:00
bar@bar.intranet.mysql.r18.ru
3f8996f88d 1. Some optimization when conversion is not needed.
2. One now must pass length argument into append(const char *str, uint length),
length is not calculated internally anymore.
2004-05-25 15:54:03 +05:00
dlenev@brandersnatch.localdomain
f23af5e6a2 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into brandersnatch.localdomain:/home/dlenev/src/mysql-4.1-macosx
2004-05-25 02:31:15 +04:00
dlenev@brandersnatch.localdomain
a5fab72bc4 Fix for sporadically failures of innodb.test on Darwin 7.3
which occured because we were not lowering case of file names 
for temporary tables altough handler assumes so if 
lower_case_table_names==2. Now we are lowering case for them.
2004-05-25 02:30:09 +04:00
konstantin@mysql.com
f207b33a7b Support for character set conversion in binary protocol: another go
after Monty's review.
- Item_param was rewritten.
- it turns out that we can't convert string data to character set of
  connection on the fly, because they first should be written to the binary
  log.
  To support efficient conversion we need to rewrite prepared statements
  binlogging code first.
2004-05-25 02:03:49 +04: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