Commit graph

332 commits

Author SHA1 Message Date
bar@mysql.com
1b612b0006 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.num-conv
2005-07-14 10:46:15 +05:00
konstantin@mysql.com
bef558b7ee - a fix for Bug#11458 "Prepared statement with subselects return random
data": remove the fix for another bug (8807) that
added OUTER_REF_TABLE_BIT to all subqueries that used a placeholder
to prevent their evaluation at prepare. As this bit hanged in 
Item_subselect::used_tables_cache for ever, a constant subquery with
a placeholder was never evaluated as such, which caused wrong 
choice of the execution plan for the statement.
- to fix Bug#8807 backport a better fix from 5.0
- post-review fixes.
2005-07-13 17:38:55 +04:00
bar@mysql.com
5150fdcc04 ctype_utf8.result:
adding test case
sql_table.cc:
  sql_table.cc:
  - do not create a new item when charsets are the same
  - return ER_INVALID_DEFAULT if default value cannot
    be converted into the column character set.
item.cc:
  - Allow conversion not only to Unicode,
    but also to and from "binary".
  - Adding safe_charset_converter() for Item_num
    and Item_varbinary, returning a fixed const Item.
2005-07-13 13:00:17 +05: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
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
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
sergefp@mysql.com
47ad6a6daa Some improvement in Item_int_with_ref class comment. 2005-05-16 14:06:52 +00: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
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
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
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
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
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
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
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
sergefp@mysql.com
eeae2c4dee Comments added 2005-03-03 05:03:21 +03: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
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
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
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
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
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
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
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
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
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
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
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
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