Commit graph

705 commits

Author SHA1 Message Date
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
monty@mishka.local
83f90e060e Better bug fix for:
#9728  'Decreased functionality in "on duplicate key update
#8147  'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE'

This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part
2005-06-27 16:46:41 +03:00
evgen@moonbone.local
5c8e3341d3 Bug #9728 fix merge 2005-06-23 01:02:43 +04:00
evgen@moonbone.local
6b9df50c5e item.h:
Fix for fix for bug#9728 decreased functionality in "on duplicate key update"
  Have to return false to set flag for whole expression.
2005-06-22 22:58:44 +04:00
evgen@moonbone.local
2235ea9593 Fix bug #9728 decreased functionality in "on duplicate key update"
Remove changes made by bug fix #8147. They strips list of insert_table_list to
only insert table, which results in error reported in bug #9728.
Added flag to Item to resolve ambigous fields reported in bug #8147.
2005-06-22 07:18:42 +04:00
evgen@moonbone.local
30a0ad3a68 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/mysql-5.0-bug-11298
2005-06-22 04:48:25 +04:00
evgen@moonbone.local
5097c6825e Fix bug#11298 insert into select from VIEW produces incorrect result
when using ORDER BY

Insert were inserting data from last record fetched instead of inserting from 
temporary table.

Make Item_ref to save data from result_field if it's available rather then
from *ref on save_in_field() call.
2005-06-22 04:45:10 +04:00
bell@sanja.is.com.ua
93d0763b70 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-06-21 20:44:18 +03:00
bell@sanja.is.com.ua
a7ca9cb38e fixed view fields names check and generation (changed after Trudy review: underlying field names treat as user set ones) (BUG#7448) 2005-06-21 20:30:48 +03:00
konstantin@mysql.com
9eb671459a A preparatory patch to help adding JOIN::transform() and move one-time
query transformations to the PREPARE stage (prepared statements).
2005-06-21 21:15:21 +04:00
bell@sanja.is.com.ua
6d030c637b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-06-17 20:30:11 +03:00
bell@sanja.is.com.ua
a11677026f fixed printing of sum(distinct ) & avg(distinct ) & cast(... as decimal) (BUG#7015, BUG#11387) 2005-06-17 17:27:47 +03:00
serg@serg.mylan
1e3eb38724 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-06-15 20:24:13 +02:00
serg@serg.mylan
01b3c70926 renamed:
Item_buff -> Cached_item
  Item_arena -> Query_arena
  TEST_ASSERT -> YYERROR_UNLESS
2005-06-15 19:58:35 +02:00
georg@lmy002.wdf.sap.corp
781a2e116b Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
2005-06-15 15:58:56 +02:00
bell@sanja.is.com.ua
303dafc538 fix of BUG#11111 fix 2005-06-15 01:57:25 +03:00
evgen@moonbone.local
bff2fd8d7b Fix 11 "fetch from view returns wrong data"
Wrong method for creating temporary field was choosen, which results in
sending int field with int header but lonlong data.

Test case is added to mysql_client_test.c because client library is required
to test the bug.
2005-06-15 01:57:40 +04:00
georg@lmy002.wdf.sap.corp
b64e6db5a4 fixes for windows 64-bit compiler warnings 2005-06-13 12:41:15 +02:00
igor@rurik.mysql.com
a2f7b552b0 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0
2005-06-07 06:00:37 -07:00
konstantin@mysql.com
ac2a9eb699 Manual merge. 2005-06-07 14:50:45 +04:00
konstantin@mysql.com
9f379d7f05 Patch two (the final one) for Bug#7306 "the server side preparedStatement
error for LIMIT placeholder".
The patch adds grammar support for LIMIT ?, ? and changes the
type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*,
so that it can point to Item_param.
2005-06-07 14:11:36 +04:00
igor@rurik.mysql.com
1d976dcb35 Merge rurik.mysql.com:/home/igor/dev/mysql-4.1-0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-06-07 03:07:42 -07:00
igor@rurik.mysql.com
90dd86907e sql_select.cc, item_buff.cc, item.h:
Fixed bug #11088: a crash for queries with GROUP BY a BLOB column
  + COUNT(DISTINCT...) due to an attempt to allocate a too large
  buffer for the BLOB field.
  Now the size of the buffer is limited by max_sort_length.
group_by.test, group_by.result:
  Added a test case for bug #11088.
2005-06-07 03:05:57 -07:00
monty@mysql.com
4b7882dc73 merge 2005-06-05 17:19:50 +03:00
monty@mysql.com
25a2c4a71e Cleanup during review
Simple optimization for 2 argument usage to function of variable arguments
Fix stack overrun when using 1+1+1+1+1+1+1+....
Update crash-me results for 5.0
Don't call post_open if pre_open() fails (optimization)
2005-06-05 17:01:20 +03:00
pem@mysql.comhem.se
5370ffc9c1 Post review fix of BUG#10969. 2005-06-03 12:56:51 +02:00
pem@mysql.comhem.se
5afef58364 Fixed BUG#10969: Stored procedures: crash if default() function
Return an error if default() is used on a local variable.
  This is actaully a side-effect of BUG#5967: Stored procedure declared
  variable used instead of column (to be fixed later), so this is really a
  workaround until that is fixed.
2005-06-01 15:42:40 +02:00
monty@mysql.com
7daf98db15 Move function from header file to make it easier to debug 2005-05-26 00:18:24 +03:00
dlenev@mysql.com
1449d44e1c Manual merge of patch fixing several trigger related bugs with main tree. 2005-05-24 22:35:41 +04:00
dlenev@brandersnatch.localdomain
007a205918 Fix for bugs:
#5860 "Multi-table UPDATE does not activate update triggers"
 #6812 "Triggers are not activated for INSERT ... SELECT"
 #8755 "Trigger is not activated by LOAD DATA".
This patch also implements proper handling of triggers for special forms
of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE. 
Also now we don't call after trigger in case when we have failed to
inserted/update or delete row. Trigger failure should stop statement
execution.

I have not properly tested handling of errors which happen inside of
triggers in this patch, since it is simplier to do this once we will be
able to access tables from triggers.
2005-05-24 22:19:33 +04:00
pem@mysql.comhem.se
3c2c8bf9a2 Fixed on BUG#6048: Stored procedure causes operating system reboot
Memory leak in locally evalutated expressions during SP execution fixed by
  reusing allocated item slots when possible.
  Note: No test case added, since the test is a stress test that tries to make
  the machine to run out of memory.
  Second attempt, now tested with debug build, valgrind build, max (optimized)
  build, with and without --debug, --vagrind and --ps-protocol.
  Errors in trigger and view test with --debug in debug build where present
  before this patch, and likewise for valgrind warnings for view test in
  valgrind build with --ps-protocol.
2005-05-23 23:43:43 +02:00
igor@rurik.mysql.com
2433210829 join_outer.test, join_outer.result:
Added test cases for bug #9938.
item.h:
  Fixed bug #9938: missing method not_null_tables for Item_ref.
2005-05-21 08:44:50 -07:00
jimw@mysql.com
ae52de495a Revert fix for Bug #6048: it introduced new problems. 2005-05-18 17:10:48 -07:00
pem@mysql.com
38c44af8b8 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-18 11:09:30 +02:00
pem@mysql.comhem.se
9472627b8a Fixed BUG#6048: Stored procedure causes operating system reboot.
Memory leak in locally evalutated expressions during SP execution fixed by
  reusing allocated item slots when possible.
  Note: No test case added, since the test is a stress test that tries to make
  the machine to run out of memory.
2005-05-18 11:07:57 +02:00
monty@mysql.com
3b3d00c4a2 Merge with 4.1 to get fix for memory leak 2005-05-16 20:21:38 +03:00
sergefp@mysql.com
47ad6a6daa Some improvement in Item_int_with_ref class comment. 2005-05-16 14:06:52 +00:00
bell@book.sanja.is.com.ua
e4fe89fab2 Merge book.sanja.is.com.ua:/Users/bell/mysql/bk/mysql-5.0
into book.sanja.is.com.ua:/Users/bell/mysql/bk/work-bug-5.0
2005-05-09 15:34:41 +03:00
msvensson@neptunus.(none)
34cec09efb Merge neptunus.(none):/home/msvensson/mysql/bug10241
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-05-09 11:26:48 +02:00
msvensson@neptunus.(none)
670eef8756 Merge neptunus.(none):/home/msvensson/mysql/bug10241
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-05-09 11:23:12 +02:00
bell@book.sanja.is.com.ua
91dccaa36f Item::fix_field need correct pointer on item reference to chnge it if itis need, so support of correct item address added to SP commands (BUG#5963)
some optimisation of IF/NOT IF ptomised to Pem
2005-05-09 01:59:10 +03:00
holyfoot@mysql.com
556504287b Merge 2005-05-05 20:10:50 +05:00
holyfoot@hf-ibm.(none)
2c8e9df232 A lot of fixes to Precision math
Mostly about precision/decimals of the results of the operations
2005-05-05 20:06:49 +05:00
konstantin@mysql.com
753959cd88 Manual merge 2005-05-05 13:47:09 +04:00
konstantin@mysql.com
15dbab1c12 A fix and test case for Bug#9777 " Empty set returned by Prepared Statement when it
should return a non empty one"
(see comments for the changed files for details).
2005-05-05 12:55:09 +04:00
msvensson@neptunus.(none)
5b5565c30a BUG#10241 cygwin port: invalid pragma interface directives
- Introduce ifdefs so we can control when to use #pragma interface on cygwin
2005-05-04 15:05:56 +02:00
konstantin@mysql.com
0b6066e77a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-root
2005-05-04 16:54:36 +04:00
konstantin@mysql.com
70a6d6c9de Post-merge fixes for Bug#9096 "select doesn't return all matched
records if prepared statements is used" (see comments to 
the changed files).
2005-05-04 16:53:10 +04:00
konstantin@mysql.com
92e4e1a3f8 Manual merge of Bug#9096 2005-05-03 19:32:29 +04:00
konstantin@mysql.com
018b8025c0 Merge mysql.com:/opt/local/work/mysql-4.1-root
into mysql.com:/opt/local/work/mysql-4.1-9096-fresh
2005-05-03 12:49:22 +04:00
konstantin@mysql.com
3589e78fda A fix and test case for Bug#9096 "select doesn't return all matched
records if prepared statements is used".
This fix changes equality evaluation method of basic constants from
by-name to by-value, thus effectively enabling use of parameter markers
in some optimizations (constants propagation, evaluation of possible
keys for query).
2005-05-03 12:47:27 +04:00
bell@sanja.is.com.ua
4681d464b1 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-test-5.0
2005-04-30 19:32:45 +03:00
bell@sanja.is.com.ua
906f56750c postreview changes 2005-04-30 19:27:22 +03:00
monty@mysql.com
28a5491d3d Merge with 4.1 2005-04-30 09:46:08 +03:00
monty@mysql.com
fbf31c4a8c CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. (Bug #7036)
Produce warnings of wrong cast of strings to signed/unsigned.
Don't block not resolved IP's if DNS server is down (Bug #8467)
Fix compiler problems with MinGW (Bug #8872)
2005-04-29 17:03:34 +03:00
bell@sanja.is.com.ua
29069ebfc6 if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
(BUG#10041)
2005-04-29 02:43:56 +03:00
igor@rurik.mysql.com
285f11064d Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-04-15 22:35:29 -07:00
igor@rurik.mysql.com
0f043429e4 subselect.result, subselect.test:
Added a test case for bug #9338.
sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
item.cc:
  Fixed bug #9338.
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field. The new method
  is used to replace the occurences of Item_field objects.
item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.
2005-04-15 20:43:45 -07:00
pem@mysql.comhem.se
6aad6835c6 Fixed BUG#9598: stored procedure call within stored procedure
overwrites IN variable
  and added error checking of variables for [IN]OUT parameters while
  rewriting the out parameter handling.
2005-04-14 14:52:35 +02:00
jimw@mysql.com
b95cb4e654 Merge 2005-04-05 19:45:34 -07:00
monty@mysql.com
9616c9a80d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-04-01 15:06:35 +03:00
monty@mysql.com
201ee3eb78 Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)
CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
ALTER TABLE now fails in STRICT mode if it generates warnings.
Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
2005-04-01 15:04:50 +03:00
bell@sanja.is.com.ua
45a79c9056 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-union_merge-5.0
2005-04-01 02:15:40 +03:00
bell@sanja.is.com.ua
1029e533df postmerge 4.1->5.0 fixes 2005-04-01 02:14:30 +03:00
msvensson@neptunus.(none)
f4e3bcc015 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-03-31 10:47:32 +02:00
bell@sanja.is.com.ua
05d4ed14e4 merge 4.1->5.0 2005-03-31 10:39:48 +03:00
msvensson@neptunus.(none)
c93ae4f8a1 Merge 2005-03-30 14:32:53 +02:00
msvensson@neptunus.(none)
382a8c0048 BUG#8807 Select crash server
- Add function Item_param::fix_fields which will update any subselect they are part of and indicate that the subsleect is not const during prepare phase, and thus should not be executed during prepare.
2005-03-30 12:14:37 +02:00
bell@sanja.is.com.ua
dcdda90a11 Merge 2005-03-30 10:27:36 +03: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
gluh@gluh.mysql.r18.ru
edb4dd5366 after merge fix 2005-03-17 18:44:24 +03:00
gluh@gluh.mysql.r18.ru
b435d6e862 Merge 4.1 -> 5.0 2005-03-17 16:51:07 +03:00
igor@rurik.mysql.com
3103b4cae5 Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2005-03-16 17:50:03 -08:00
gluh@gluh.mysql.r18.ru
41487d0b4e Fix for bug#8656: Crash with group_concat on alias in outer table
fixed result_field support of Item_ref
2005-03-16 16:44:28 +03:00
igor@rurik.mysql.com
ce6c390c39 olap.result, olap.test:
Added a test case for bug #8616.
item.h:
  Fixed bug #8616.
  Added class Item_null_result used in rollup processing.
sql_select.h, sql_select.cc:
  Fixed bug #8616.
  Added JOIN::rollup_write_data to cover rollup queries
  with DISTINCT. Modified other rollup methods.
2005-03-15 22:50:54 -08:00
konstantin@mysql.com
983c75f05e WL#926 "SUM(DISTINCT) and AVG(DISTINCT)": improvement of SUM(DISTINCT) and
implementation of AVG(DISTINCT) which utilizes the approach with Fields.
The patch implemented in October is portede to the up-to-date tree 
containing DECIMAL type.
Tests for AVG(DISTINCT) (although there is not much to test provided
that SUM(DISTINCT) works), cleanups for COUNT(DISTINCT) and GROUP_CONCAT()
will follow in another changeset.
2005-03-13 23:50:43 +03:00
bar@mysql.com
d50d213162 Merge 2005-03-05 18:20:35 +04:00
bar@mysql.com
7e8e033290 type_blob.result, func_system.result, func_str.result, ctype_collate.result:
fixing test results accordingly.
func_system.test:
  New test that illegal mix of collations does not happen anymore.
item_strfunc.h:
    safe_charset_converter() was added for system constants.
item_strfunc.cc:
  safe_charset_converter() was added for system constants.
item_func.cc, item.h, item.cc:
  Bug#8291: Illegal collation mix with USER() function.
  After discussion with PeterG and Serge, a new coercibility
  level for "system constants" was introduced, between
  COERRIBLE and IMPLICIT. Thus:
  SELECT col1 = USER() FROM t1; - is done according to col1 collation.
  SELECT 'string' = USER(); - is done according to USER() collation.
  At the same time, "nagg" and "strong" members were removed as unused.
item_create.cc:
  Version is a system constant too.
2005-03-04 14:20:49 +04:00
jimw@mysql.com
f7c01cfb76 Merged from 4.1 2005-03-03 15:01:46 -08:00
sergefp@mysql.com
eeae2c4dee Comments added 2005-03-03 05:03:21 +03:00
serg@serg.mylan
02d88c398f bug#8151 - truncate leaves a transaction open
deadlock in MYSQL_LOG::new_file()
style fixes
2005-03-02 10:38:25 +01:00
sergefp@mysql.com
d2fec05179 Fix for BUG#8562: In Item_int_with_ref::new_item() create Item_int or Item_uint
depending on ref->unsigned_flag. Item_int_with_ref can refer to both signed and 
unsigned integers.
2005-02-28 23:50:06 +03:00
monty@mysql.com
e2dc9b4099 Backport my_strntod() from 5.0
Change string->float conversion to delay division as long as possible.
This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)
2005-02-22 12:51:23 +02:00
mskold@mysql.com
b3d3f73753 Merge 2005-02-21 16:13:29 +01:00
monty@mysql.com
f3b00a0413 use dbug_print_decimal instead of DBUG_EXECUTE
Portability fix
Note: rpl_trunc_binlog fails, but Sergei has promised to fix it, so I will ignore it for now
2005-02-20 00:24:30 +02:00
monty@mysql.com
5bfcabf7cd Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-02-19 21:56:24 +02:00
monty@mysql.com
88d2e2973d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-02-19 19:00:41 +02:00
monty@mysql.com
218e00ac68 Fixed BUILD script to use --with-berkeley-db instead of --with-bdb
Lots of small fixes to multi-precision-math path
Give Note for '123.4e'
Added helper functions type 'val_string_from_real()
Don't give warnings for end space for string2decimal()
Changed storage of values for SP so that we can detect length of argument without strlen()
Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
2005-02-19 18:58:27 +02:00
georg@beethoven.site
26e3685b02 Changes and fixes for windows compilation 2005-02-18 15:17:17 +01:00
mskold@mysql.com
dc7368cf3f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-02-17 16:41:38 +01:00
igor@rurik.mysql.com
5a3806e5df Manual merge 2005-02-17 00:34:06 -08:00
igor@rurik.mysql.com
d2730b3342 item.h:
Revised the fix for bug #7098.
  Corrected the method Item_string::new_item.
sql_select.cc:
  Revised the fix for bug #7098.
  Aborted the previous modifications.
2005-02-16 22:51:32 -08:00
mskold@mysql.com
96188c81e9 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-02-16 23:16:02 +01:00
pem@mysql.comhem.se
de2b28c1ad Fixed BUG#8540: Local variable overrides an alias. 2005-02-16 16:06:41 +01:00
mskold@mysql.com
5d23cdb591 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-02-16 13:13:13 +01:00
monty@mysql.com
38d1a42481 Merge with 4.1 2005-02-15 17:12:13 +02:00
konstantin@mysql.com
f7512e756f Fix signatures of placement operator delete in places where placement
delete is declared. As we don't use exceptions placement delete is never 
called and the fix only affects numerous warnings when
compiling with MS Visual C++.
For more info see http://www.gotw.ca/gotw/010.htm.
2005-02-15 03:55:44 +03:00
mskold@mysql.com
66343612d1 Merge 2005-02-11 22:30:37 +01:00
monty@mysql.com
a1a39fab84 Merge with 4.1 2005-02-10 02:27:37 +02:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
monty@mysql.com
79ec81071a Better bugfix for "HAVING when refering to RAND()" (Bug #8216)
Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
This will ensure that any reference to these has a valid value.
Generalized the code for split_sum_func()
2005-02-08 14:41:09 +02:00
jimw@mysql.com
8c8553af81 Merge changes 2005-02-04 11:59:02 -08: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
mskold@mysql.com
7c07a2e725 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-01-21 08:43:41 +01:00
monty@mysql.com
8d616390e9 After merge fixes
Fix for BIT(X) field as string
2005-01-15 17:38:43 +02:00
jimw@mysql.com
25fde2d092 In TRADITIONAL mode, don't allow a NOT NULL field with no default be set to
DEFAULT (with no argument) or to the field's type's default by not being
listed in the list of fields being inserted. (Bug #5986)
2005-01-13 18:23:34 -08:00
mskold@mysql.com
881b3a023f Merge 2005-01-03 15:20:06 +01:00
monty@mysql.com
d71c030587 After merge fixes 2004-12-31 00:44:00 +02:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
mskold@mysql.com
4d384b61e4 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2004-12-20 14:13:41 +01:00
mskold@mysql.com
3edf243875 Condition pushdown to storage engine 2004-12-17 21:13:22 +01:00
ram@gw.mysql.r18.ru
92f89369ae bit type 2004-12-17 18:06:05 +04:00
ram@gw.mysql.r18.ru
7c31ea4d83 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1
2004-12-14 16:26:10 +04:00
bar@mysql.com
4fa867494d bug#6275 "client_test" fail in 4.1.7 make test
bug#6911 resultset metadata always return client character set
2004-12-14 15:58:30 +04:00
ram@gw.mysql.r18.ru
5c5d51c2d6 A quick fix for bug #7257: Crash in default tests: 'subselect' 2004-12-14 15:41:01 +04:00
sergefp@mysql.com
3c8f48d2e3 * Added comments and one assert
* Backport of safety measures from 5.0: make numeorous replaces:
    s/item->fix_fields()/if (!item->fixed) item->fix_fields()
2004-12-14 03:36:19 +03:00
sergefp@mysql.com
3ceb04a5d8 Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Added Item_ref::set_properties 
 * Item_ref::Item_ref now expects to get in *item either
     NULL - then fix_fields() will be called later  or 
     ptr to Item it will refer to - then an equivalent of fix_fields() call is performed
2004-12-14 01:07:06 +03:00
sergefp@mysql.com
6b14f6976f Merged fixes for BUG#6976 and BUG#7079 2004-12-13 20:25:26 +03:00
sergefp@mysql.com
03acb8155f Merged (will need a post-merge fix) 2004-12-13 20:10:07 +03:00
sergefp@mysql.com
9ed8cd701b Merging fix for BUG#6976 from 4.0 to 4.1
The problem in 4.1 was the same as in 4.0 - fix_fields() not called for created Item_ref. 
The fix is similar too - initialize Item_refs in ctor (but don't interfere with cases when 
Item_ref is used by subselects).
2004-12-13 20:06:06 +03:00
bell@sanja.is.com.ua
292c71caef comment of class edded 2004-12-13 15:05:52 +02:00
bell@sanja.is.com.ua
b9abf25a55 new reference which refer to current value not to result used for resolving outer
refernces if subqueri is not in HAVING clause (BUG#7079)
  and the same used for subquery transformetion
2004-12-11 17:13:19 +02:00
monty@mysql.com
563500994a Update results for new varchar handling
Fixed compiler warnings
String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length
2004-12-07 15:47:00 +02:00
monty@mysql.com
0de4777187 Merge with 4.1 2004-12-06 11:38:56 +02:00
serg@serg.mylan
f09429a4df protection: TRASH in delete
fixed a bug that it discovered
2004-11-28 15:53:17 +01:00
bell@sanja.is.com.ua
3c108b2a84 init values to avoid junk returning in case of null value asking without assigning value (BUG#6806) 2004-11-25 22:54:49 +02:00
bell@sanja.is.com.ua
69ec6a4592 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-join-5.0
2004-11-25 02:27:02 +02:00
bell@sanja.is.com.ua
3fa511ff54 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
2004-11-24 20:01:34 +02:00
bell@sanja.is.com.ua
6d5d5ff941 fixed problem in MacOS
correct printing of aliases
2004-11-24 19:48:30 +02:00
dlenev@brandersnatch.localdomain
d201074611 Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version)

Now instead of binding Item_trigger_field to TABLE objects during
trigger definition parsing at table open, we perform pass through
special list of all such objects in trigger. This allows easily check
all references to fields in old/new version of row in trigger during
execution of CREATE TRIGGER statement (this is more courtesy for users
since we can't check everything anyway).
We also report that such reference is bad by returning error from
Item_trigger_field::fix_fields() method (instead of setup_field())
This means that if trigger is broken we will bark during trigger
execution instead of trigger definition parsing at table open.
(i.e. now we allow to open tables with broken triggers).
2004-11-24 12:24:02 +03:00
serg@serg.mylan
ee933cd198 merged 2004-11-22 21:33:15 +01:00
bell@sanja.is.com.ua
072d38eb12 merge 2004-11-21 20:08:12 +02:00
konstantin@mysql.com
6337ea8a40 A fix and test case for Bug#6297 "prepared statement, wrong handling
of <parameter> IS NULL":
we must not only set Item::null_value in Item_param, but implement
Item_param::is_null() to work well with IS NULL/IS NOT NULL clauses.
2004-11-21 12:04:27 +03:00
brian@avenger.(none)
b5e02d3276 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into avenger.(none):/export/brian/mysql/test/5.0
2004-11-11 19:15:41 -08:00
brian@avenger.(none)
f05daf02ba Resolved merge from 4.1 -> 5.0 (mainly Guilhem's work with mysqldump) 2004-11-11 18:58:57 -08:00
bell@sanja.is.com.ua
0ef0b030a5 merge 2004-11-11 21:18:10 +02:00
konstantin@mysql.com
e5f4c7a0bd Rename: Item::val -> Item::val_real(). 2004-11-11 21:39:35 +03:00
bar@mysql.com
c51d7acfcc 1. When mixing NULL to a character string,
the result takes its charset/collation
attributes from the character string,
e.g.  SELECT func(NULL, _latin2'string')
now returns a latin2 result. This is
done by introducing a new derivation
(aka coercibility) level DERIVATION_IGNORABLE,
which is used with Item_null.
2. 'Pure' NULL is now BINARY(0), not CHAR(0).
I.e. NULL is now more typeless.
2004-11-10 14:05:28 +04:00
monty@mysql.com
87af3d9113 merge on pull 2004-11-09 04:06:44 +02:00
bell@sanja.is.com.ua
9d0bb7426a postreview fixes 2004-11-08 01:54:23 +02:00
monty@mysql.com
07f9c634ad After merge fixes 2004-11-08 01:51:10 +02:00
monty@mysql.com
071001950e Merge with 4.1 to get in latest bug fixes 2004-11-04 15:06:24 +02:00
monty@mysql.com
47bbf768d4 Fixes after merge with 4.1
FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete
2004-11-03 12:39:38 +02:00
bar@mysql.com
6a3b1d443f Many files:
Allow mixing of different character sets for more SQL functions.
item_func.h:
  Allow mixing of different character sets for more SQL functions..
2004-11-02 16:02:12 +04:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
bar@mysql.com
ea49a5181a Allow to convert to non-Unicode charset when mixing a string
constant with a column. The string is converted into the column
character set. It conversion doesn't lose data, then operation
is possible. Otherwise, give an error, as it was earlier.
2004-10-29 16:00:03 +05:00
monty@mysql.com
a308981257 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-10-22 19:51:04 +03:00
konstantin@mysql.com
016d5adeeb Followup to fix for bug#6050: fix valgrind warnings. 2004-10-22 20:21:55 +04:00
monty@mysql.com
3afecef4df Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)
2004-10-22 18:44:51 +03: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
igor@rurik.mysql.com
a03e5ad8e4 Merge for post-merge fixes for Item_equal patch. 2004-10-19 16:07:10 -07:00
igor@rurik.mysql.com
4c8e391718 table.h, sql_select.h:
Added the code processing on expressions for applying
  multiple equalities.
sql_select.cc:
  Post-merge fixes for Item_equal patch.
  Added the code processing on expressions for applying
  multiple equalities.
Many files:
  Post-merge fixes for Item_equal patch.
item_cmpfunc.cc:
  Post-merge fixes for Item_equal patch.
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
item.h, item.cc:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
2004-10-19 14:12:55 -07:00
konstantin@mysql.com
f063a81755 item.h:
A fix for Bug#6042 "constants propogation works olny once (prepared
  statements)": reset item->marker in Item::cleanup, as it's used
  in propogate_cond_constants. No test case as the only way I could
  come up with to show the problem is EXPLAIN, and EXPLAIN is painful
  to use in the test suite.
2004-10-12 17:33:13 +04:00
timour@mysql.com
8ab4a7a101 Merge with implementation of WL#1724. 2004-10-11 10:47:08 +03:00
konstantin@mysql.com
e08febea0c Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-hook
2004-10-10 02:39:48 +04:00
konstantin@mysql.com
daa4c2495c A fix and test case for Bug#5987 "subselect in bool function
crashes server (prepared statements)": the bug was that all boolean
items always recovered its original arguments at statement cleanup 
stage.
This collided with Item_subselect::select_transformer, which tries to 
permanently change the item tree to use a transformed subselect instead of
original one.
So we had this call sequence for prepare:
mysql_stmt_prepare -> JOIN::prepare -> 
Item_subselect::fix_fields -> the item tree gets transformed ->
Item_bool_rowready_func2::cleanup, item tree is recovered to original
state, while it shouldn't have been;
mysql_stmt_execute -> attempts to execute a broken tree -> crash.
Now instead of bluntly recovering all arguments of bool functions in 
Item_bool_rowready_func2::cleanup, we recover only those
which were changed, and do it in one place.
There still would exist a possibility for a collision with subselect
tranformation, if permanent and temporary changes were performed at the 
same stage.
But fortunately subselect transformation is always done first, so it 
doesn't conflict with the optimization done by propogate_cond_constants.
Now we have: 
mysql_stmt_prepare -> JOIN::prepare -> subselect transformation 
permanently changes the tree -> cleanup doesn't recover anything, 
because nothing was registered for recovery.
mysql_stmt_execute -> JOIN::prepare (the tree is already transformed, 
so it doesn't change), JOIN::optimize -> 
propogate_cond_constants -> temporary changes the item tree 
with constants -> JOIN::execute -> cleanup -> 
the changes done by propogate_cond_constants are recovered, as
they were registered for recovery.
2004-10-10 02:39:22 +04:00
igor@rurik.mysql.com
71f6ab7a09 Merge for Item_equal. 2004-10-09 10:34:13 -07:00
bell@sanja.is.com.ua
b2d9799b54 args_copy and cleunup() removed from Item_sum
registration changing ITEM_SUM arguments added
2004-10-09 01:01:19 +03:00
konstantin@mysql.com
234c80b689 Deployment of centralized Item change registry, step 2: Item_ref
doesn't need to have it's own recovery mechanism.
2004-10-08 19:13:09 +04:00
konstantin@mysql.com
2aa7ec0d9d A fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
crashes mysqld": implementation for a generic item tree modifications
registry. Every item tree modification which should be rolled back for
subsequent execution of a prepared statement or stored procedure should
be saved in the registry. All such modifications are rolled back at once
during cleanup stage of PS.
Actual fix for the bug just adds a call to register modifications to
convert_constant_item.
Post review fixes implemented.
2004-10-08 02:21:19 +04:00
bell@sanja.is.com.ua
a78f817d20 merge 2004-10-05 13:41:51 +03:00
monty@mishka.local
be4ca46fbe More fixes for strict mode:
More tests.
Better error messages.
Fixed bug when checking if we updated all needed columns for INSERT.
Give an error if we encounter a wrong float value during parsing.
Don't print DEFAULT for columns without a default value in SHOW CREATE/SHOW FIELDS.
Fixed UPDATE IGNORE when using STRICT mode.
2004-10-02 22:20:08 +03:00
bell@sanja.is.com.ua
cd32040889 some comments added 2004-09-25 16:05:50 +03:00
bell@sanja.is.com.ua
26589ba8ce Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-17 19:16:54 +03:00
monty@mishka.local
095f7e8740 Removed wrong warnings in test suite (This was because select_insert / select_create results was not freed.
Added thd to openfrm() for initialization of TABLE->in_use. This fixed a bug in BDB handling where table->in_use was used early
2004-09-17 03:08:23 +03:00
bell@sanja.is.com.ua
09b316f051 updateability of field with collation support (BUG#5506) 2004-09-16 23:45:20 +03:00
bar@mysql.com
7c4ab566d2 Return character strings in table, type, possible_keys, key fields
of EXPLAIN SELECT, rather than binary strings.
2004-09-16 14:47:39 +05:00
bell@sanja.is.com.ua
f797298fc5 fixed merged view fields names (BUG#5147)
support of merged VIEW over several tables added (WL#1809)
2004-09-14 19:28:29 +03:00
timour@mysql.com
e76e617e01 Implementation of the last review comments for WL#1724
"Min/Max Optimization for Queries with Group By Clause"
2004-09-10 04:45:15 +03:00
bell@sanja.is.com.ua
763c57d41f Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-show-5.0
2004-09-10 02:26:09 +03:00
bell@sanja.is.com.ua
a23857e071 post merge fixes 2004-09-10 02:22:44 +03:00
dlenev@mysql.com
c46e640009 Yet another manual merge with main tree for patch for WL#1218 "Triggers" 2004-09-09 19:52:10 +04:00
monty@mysql.com
49cd04b510 Merge on pull 2004-09-09 07:26:28 +03:00
monty@mysql.com
f2829d0386 After merge fixes of merge with 4.1 that included the new arena code.
Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset
Prefix addresses with 0x for easier comparisons of debug logs
Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
This fix changed some 'index' queries to 'range' queries in the test suite
Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
This fix removed of a lot of 'Using where' notes in the test suite.
Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
Give NOTE instead of WARNING for safe field-type conversions
2004-09-09 06:59:26 +03:00
dlenev@mysql.com
9b1bc6a4d5 Merge of changes from the main tree to tree for WL#1218 "Triggers". 2004-09-08 13:29:21 +04:00
dlenev@brandersnatch.localdomain
9ed038dd6f WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers 
from new .FRM format. 

Things to be done:
- Right placement of trigger's invocations
- Right handling of errors in triggers (including transaction rollback)
- Support for priviliges
- Right handling of DROP/RENAME table (hope that it will be handled automatically
  with merging of .TRG into .FRM file)
- Saving/restoring some information critical for trigger creation and replication
  with their definitions (e.g. sql_mode, creator, ...)
- Replication

Already has some known bugs so probably not for general review.
2004-09-07 16:29:46 +04:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
bell@sanja.is.com.ua
161662ba4c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-04 15:32:13 +03:00
monty@mysql.com
32594c9989 Print value of Item_param if it has a value (when debugging) 2004-09-04 15:02:57 +03:00
bell@sanja.is.com.ua
80a28d458a fixed printing of real constants (BUG#5160) 2004-09-01 20:30:48 +03:00
bar@mysql.com
4f32cd2b3d Move collation aggregation with superset conversion code
from Item_bool_func2 into DTCollation to make it reusable
for other types of items.
2004-09-01 13:56:33 +05:00
bell@sanja.is.com.ua
2cf1234ba2 after review patch 2004-08-31 21:10:57 +03:00
timour@mysql.com
e2cd3dd1ce WL#1724 "Min/Max Optimization for Queries with Group By Clause"
- after-review changes
- merged with the source tree from 204-08-27
2004-08-27 16:37:13 +03:00
bell@sanja.is.com.ua
b836d2ddb7 fixed updateability VIEW detection (Bug#5146)
fixed other Item_ref methods where result_field involved
2004-08-26 14:34:56 +03:00
bell@sanja.is.com.ua
8b01230e5b fix of Item_ref with result_field (BUG#5104) 2004-08-26 13:11:06 +03:00
bell@sanja.is.com.ua
5abb148d01 items for functions which is converted to constants internally to support its correct printing added (BUG#4663) 2004-08-24 18:46:27 +03:00
sergefp@mysql.com
4ddeee9d2f Fix for BUG#4488: first portion: sign aware '<' and '>' comparisons. 2004-08-11 23:08:20 +04:00
bell@sanja.is.com.ua
a27b1e54d5 fixed using VIEW fields (BUG#4617) 2004-07-23 09:20:58 +03:00
bell@sanja.is.com.ua
1e3f10a4b1 mark subquery in the FROM clause like derived and quoate all identifiers (BUG#4609) 2004-07-20 08:48:28 +03:00
bell@sanja.is.com.ua
9336d36cf8 VIEW
two TABLE_LIST copy eliminated
2004-07-16 01:15:55 +03:00
monty@mysql.com
5b3c418b48 After merge fixes
Note: The following tests fails
- fulltext (Sergei has promised to fix)
- rpl_charset (Guilhem should fix)
- rpl_timezone (Dimitray has promised to fix)

Sanja needs to check out the calling of close_thread_tables() in sp_head.cc
2004-07-15 04:19:07 +03:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
bell@sanja.is.com.ua
b8742e4a56 unused field removed 2004-06-28 20:01:11 +03:00
serg@serg.mylan
a5c8b3ee59 correct eq() method for Item_param (BUG#4233) 2004-06-26 23:55:38 +02:00
bell@sanja.is.com.ua
74b01ca387 type of parameter assignment for parameters from variables added (BUG#4280) 2004-06-25 15:16:00 +03:00
ram@gw.mysql.r18.ru
f3d11147c9 after merge fix 2004-06-22 14:48:29 +05:00
konstantin@mysql.com
7bbdb8408b Fix for bug#4105 "Server crash on attempt to prepare a statement with
character set introducer": add new item type to be returned before from 
Item_param until it's value is set.
This way items like Item_bool_func2 and udf_handler won't treat this item
as constant literal when statement is prepared.
2004-06-18 04:16:08 +04:00
bell@sanja.is.com.ua
96b470ae59 after review fix (BUG#4067) 2004-06-17 13:48:31 +03:00
ram@gw.mysql.r18.ru
6b8222d3a7 a fix (Bug #4102 Crash with a DBUG window after a request) 2004-06-16 18:43:05 +05:00
bell@sanja.is.com.ua
002364c20f new length detection for non-string in UNION (BUG#4067) 2004-06-16 16:06:30 +03:00
pem@mysql.comhem.se
26ec49f1a8 Fixed BUG#3368: Stored procedure crash if group_concat(variable). 2004-06-15 14:26:19 +02:00
konstantin@mysql.com
f3e018f833 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-4026
2004-06-09 03:22:55 +04:00
konstantin@mysql.com
dc11d3cfa1 Proposed fix for Bug#4026 "Microseconds part of TIME/DATETIME types
is broken (prepared statements)": fixed date handling in many places 
of prepared statements code.
2004-06-09 03:21:50 +04:00
sergefp@mysql.com
1e05e6cb82 Post review fixes for "SQL Syntax for Prepared Statements". 2004-06-07 12:09:10 +04:00
sergefp@mysql.com
dc38512390 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-06-01 17:29:13 +04:00
konstantin@mysql.com
eaa4d106e6 Fix for Bug#3796 "Prepared statement, select concat(<parameter>,<column>), wrong
result": new Item_param member for use in val_str()
2004-05-31 14:21:48 +04:00
pem@mysql.com
71eddc362e Merging 4.1 to 5.0. 2004-05-26 17:04:45 +02:00
pem@mysql.comhem.se
5cbe0fb8ed Added frame offset to debug pring of local SP variables. 2004-05-25 19:46:21 +02:00
sergefp@mysql.com
d7dd97089e Manually merged, requirees more merging 2004-05-25 08:15:50 +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
sergefp@mysql.com
fb17025b3e WL#1622 "SQL Syntax for Prepared Statements": Post-review fixes (1 of 2) 2004-05-21 04:27:50 +04:00
pem@mysql.com
bf45960eef Merge 4.1 -> 5.0 2004-05-07 18:52:06 +02:00
sergefp@mysql.com
7af3097e60 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-05-07 03:33:39 +04:00
monty@mysql.com
939ea71ecd Portability fixes
Change strtoll -> my_strtoll10()
Fixed bug in my_strntoul() and my_strntol() where we got different values on 32 and 64 bit systems (Bug #3472)
2004-05-07 01:43:17 +03:00
sergefp@mysql.com
67ad78cb5d Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-05-06 23:02:32 +04:00
sergefp@mysql.com
7c3376229e Make Item_param::val_int and Item_param::val_str follow the used convention and return 0 if null_value==1. 2004-05-05 20:04:25 +04:00
sergefp@mysql.com
fdfcadc735 Manual merge for WL#1622 code, will need fixes 2004-05-05 16:10:16 +04:00
dlenev@brandersnatch.localdomain
c7fbcbca7a Fix for remaining issues described in Bug #1664
"mysql_send_long_data() API call is completely broken".

Now we are resetting some members (long_data_supplied/null_value...) of Item_param to its 
initial state after each execution of prepared statement. We also manipulating 
Item_param::maybe_null/null_value only via Item_param::set_* setters which makes code a bit 
more robust.
2004-05-04 19:08:19 +04:00
sergefp@mysql.com
194027d5d8 Merged 2004-04-13 02:18:09 +04:00
monty@mysql.com
dc0d2b83c2 Added function comment 2004-04-12 01:42:39 +03:00
pem@mysql.com
dfd59e296e Merge 4.1 -> 5.0. 2004-04-07 19:07:44 +02:00
sergefp@mysql.com
1f8505d66f Post-merge fixes 2004-04-05 19:52:10 +04:00
sergefp@mysql.com
a8386d01c2 Many files:
SQL Syntax for Prepared Statements (WL#1622)
ps.test, ps.result:
  new file
2004-04-05 19:43:37 +04:00
dlenev@brandersnatch.localdomain
f38e0a935d Merge of fix for bug #2050 and bug #3307 2004-03-31 22:17:10 +04:00
dlenev@brandersnatch.localdomain
4122188cc2 Fix for Bug #3307 "FLUSH TABLES sometimes breaks prepared statement
table resolution".
Added members to Item_ident for storing original db, table and field
names since those that set later from Field have shorter life-time 
than required by prep. stmt. So we need to restore original names in 
Item_ident::cleanup(). Also now using special construnctor for creation
of Item_field from Field object that ensures that table and field name 
have big enough life-time.

"Fix" for bug #2050 "10 to 1 performance drop with server 4.1.1"
Clean ups in implementation of caching of field number in table.
Added caching of table in which field is found in find_field_in_tables().
2004-03-31 21:25:55 +04:00
dlenev@brandersnatch.localdomain
9e28b7698d "Fix" for BUG #2050 "10 to 1 performance drop with server 4.1.1".
Actually it is not a bug but right behavior observed as pefomance 
degradation after we have forced Item_field::fix_fields() to 
re-execute each time when we are executing prep stmt.

This patch implements small optimization which heals this bad 
behavior. We are caching field position in TABLE::field array in
Item's member and are using this position for speeding up field
lookups in fix_fields() in case of its re-execution.
2004-03-28 04:11:54 +04:00
monty@mysql.com
1448199bd7 Cleanups & safety fixes 2004-03-25 22:11:22 +02:00
bell@sanja.is.com.ua
d095d4753e after review changes 2004-03-20 13:36:26 +02:00
bell@sanja.is.com.ua
ede07fcdcf fixed signed numeric literal parsing 2004-03-18 18:27:03 +02:00
bell@sanja.is.com.ua
613104ad25 merge 2004-03-18 15:21:06 +02:00
bell@sanja.is.com.ua
2b45b53066 DBUG_ASSERT(fixed == 1); added to val*
small optimisation in signed_literal
2004-03-18 15:14:36 +02:00
ram@gw.mysql.r18.ru
99d374159a merge 2004-03-17 18:57:51 +04:00
ram@gw.mysql.r18.ru
757cff9f9b Code cleanup:
- added unsigned_flag= 1; to Item_uint constructors
- removed Item_uint::fix_fields()
- added a comment about fix_fields() call
2004-03-17 18:40:04 +04:00
bell@sanja.is.com.ua
8035ce40ec DBUG_ASSERT(fixed == 0) added to fix_fields() 2004-03-17 14:26:26 +02:00
ram@gw.mysql.r18.ru
f54827e5d0 Fix for the bug #3118: Subquery and order by 2004-03-16 16:28:50 +04:00
konstantin@mysql.com
e43ac76094 Fixes for bugs #2274 "mysqld gets SIGSEGV during processing of malformed
COM_EXECUTE packet" and #2795 "prepare + execute without bind_param crashes
 server" and #2473 "seg fault running tests/client_test.c": 
- length checking added to packet parser 
- default impelemntation of Item_param::set_param_func will work in
case of malformed packet.
No test cases are possible in our test suite, as there are no tests 
operating on protocol layer.
2004-03-15 20:20:47 +03:00
bar@bar.intranet.mysql.r18.ru
c93ff40c51 Bug #2959 UTF8 charset breaks joins with mixed column/string constant 2004-03-03 11:22:25 +04:00
konstantin@oak.local
8cc8b0ea5c Desperate attempt to push part of prepared statements cleanup which was
reviewed in Saint-Petersbourg (including post-review fixes).
2004-03-02 22:39:50 +03:00
lenz@kallisto.local
b8c47718d4 - removed extraneous Item_ident:: to fix a compile error on HP-UX 2004-02-27 19:08:56 +01:00
bell@sanja.is.com.ua
8a442c4e0d after review fix 2004-02-20 15:37:45 +02:00
igor@rurik.mysql.com
d24a2296bb Manual merge 2004-02-19 01:12:49 -08:00
igor@rurik.mysql.com
09fa16424a Many files:
After review fixes for Item_equal.
2004-02-18 22:21:37 -08:00
bell@sanja.is.com.ua
44b37b089a merge 2004-02-14 13:31:39 +02:00
serg@serg.mylan
01c2ca5b8a Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-02-13 15:30:00 +01:00
serg@serg.mylan
5914e5705c my_atof is deleted
strtod from mit-threads is restored and cleaned up
2004-02-13 15:27:21 +01:00
bell@sanja.is.com.ua
272bd74abb memory leacks in PS with subqueries fixed (adddition to fix of BUG#2462) 2004-02-12 03:10:26 +02:00
pem@mysql.comhem.se
f9e73c7716 Post-merge fixes. 2004-02-11 18:21:55 +01:00
pem@mysql.com
c8585f3283 Merge 4.1 into 5.0. 2004-02-10 18:44:02 +01:00
bell@sanja.is.com.ua
69e2460bd4 fixed subquery with PS (BUG#2462)
fixed UNION preparation
2004-02-08 20:14:13 +02:00
bar@bar.intranet.mysql.r18.ru
e2ffbc1a6a Indexes can be used for optimization if the operation
collation is the same with the index collation.
2004-02-02 17:50:14 +04:00