Commit graph

1205 commits

Author SHA1 Message Date
mhansson/martin@linux-st28.site
8b65423d9d Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848
2007-12-21 14:52:39 +01:00
mhansson/martin@linux-st28.site
fe93176c30 Merge linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848-gca
into  linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848-gca
2007-12-20 14:19:52 +01:00
gluh@eagle.(none)
d504588e79 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-12-13 16:10:57 +04:00
gluh@eagle.(none)
4f5868114a Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-12-13 15:56:04 +04:00
gluh@eagle.(none)
e039595029 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-12-13 14:52:49 +04:00
mhansson/martin@linux-st28.site
867a786549 Bug#32848: Data type conversion bug in union subselects in MySQL 5.0.38
There were two problems when inferring the correct field types resulting from
UNION queries.
- If the type is NULL for all corresponding fields in the UNION, the resulting 
  type would be NULL, while the type is BINARY(0) if there is just a single 
  SELECT NULL.
- If one SELECT in the UNION uses a subselect, a temporary table is created
  to represent the subselect, and the result type defaults to a STRING type,
  hiding the fact that the type was unknown(just a NULL value).
Fixed by remembering whenever a field was created from a NULL value and pass
type NULL to the type coercion if that is the case, and creating a string field
as result of UNION only if the type would otherwise be NULL.
2007-12-11 20:15:03 +01:00
igor@olga.mysql.com
c04d3727dc Fixed bug #27545.
Both arguments of the function NAME_CONST must be constant expressions.
This constraint is checked in the Item_name_const::fix_fields method. 
Yet if the argument of the function was not a constant expression no
error message was reported. As a result the client hanged waiting for a
response.
Now the function Item_name_const::fix_fields reports an error message
when any of the additional context conditions imposed on the function
NAME_CONST is not satisfied.
2007-12-07 23:36:58 -08:00
ramil/ram@ramil.myoffice.izhnet.ru
6164613f18 Merge mysql.com:/home/ram/work/b32559/b32559.5.0
into  mysql.com:/home/ram/work/b32559/b32559.5.1
2007-11-29 10:23:30 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
ac034767c0 Fix for bug #32559: connection hangs on query with name_const
Problem: passing a non-constant name to the NAME_CONST function results in a crash.

Fix: check the NAME_CONST name argument; return fake item type if we got
non-constant argument(s).
2007-11-27 09:36:43 +04:00
gkodinov/kgeorge@magare.gmz
b35e378f6b Merge magare.gmz:/home/kgeorge/mysql/work/B32400-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32400-5.1-opt
2007-11-23 14:41:47 +02:00
gkodinov/kgeorge@magare.gmz
846cbf3cd0 Bug #32400: Complex SELECT query returns correct result
only on some occasions

Referencing an element from the SELECT list in a WHERE 
clause is not permitted. The namespace of the WHERE
clause is the table columns only. This was not enforced
correctly when resolving outer references in sub-queries.

Fixed by not allowing references to aliases in a 
sub-query in WHERE.
2007-11-20 19:18:21 +02:00
gkodinov/kgeorge@magare.gmz
70f9ec3c8d Merge magare.gmz:/home/kgeorge/mysql/autopush/B31562-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31562-5.1-opt
2007-11-13 19:15:49 +02:00
gkodinov/kgeorge@magare.gmz
eea70871f1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31562-5.0-opt
2007-11-13 19:00:45 +02:00
gkodinov/kgeorge@magare.gmz
3384d3e96c Bug #31562: HAVING and lower case
The columns in HAVING can reference the GROUP BY and 
SELECT columns. There can be "table" prefixes when
referencing these columns. And these "table" prefixes
in HAVING use the table alias if available.
This means that table aliases are subject to the same
storage rules as table names and are dependent on 
lower_case_table_names in the same way as the table 
names are.
Fixed by :
1. Treating table aliases as table names
and make them lowercase when printing out the SQL
statement for view persistence.
2. Using case insensitive comparison for table 
aliases when requested by lower_case_table_names
2007-11-13 11:39:52 +02:00
gshchepa/uchum@gleb.loc
f457080109 Merge gleb.loc:/home/uchum/5.0-opt
into  gleb.loc:/home/uchum/5.1-opt
2007-11-11 06:07:38 +04:00
gshchepa/uchum@gleb.loc
0aabb89ee1 Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
clause returned a wrong result: the VARBINARY value was illegally padded
with zero bytes to the length of the BINARY column for the index search.
(<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.
2007-11-10 23:44:48 +04:00
gkodinov/kgeorge@magare.gmz
e8e01beee8 Merge magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.1-opt
2007-10-24 11:50:09 +03:00
sergefp@foxhole.(none)
849d0f9da4 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug31450
2007-10-23 20:03:06 +04:00
sergefp@mysql.com
28e5063d93 BUG#31450: Query causes error 1048
- Let Item::save_in_field() call set_field_to_null_with_conversions() 
  for decimal type, like this is done for the other item result types.
2007-10-23 19:24:59 +04:00
gluh@eagle.(none)
17acda6ca8 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-23 19:08:21 +05:00
gluh@eagle.(none)
237383f0fe Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-23 18:51:43 +05:00
gkodinov/kgeorge@magare.gmz
0a14d1a19b Merge magare.gmz:/home/kgeorge/mysql/work/B28687-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B28687-5.1-opt
2007-10-23 11:22:59 +03:00
gkodinov/kgeorge@magare.gmz
52b35112cf Bug #28687: Search fails on '0000-00-00' date after sql_mode change
When doing indexed search the server constructs a key image for 
faster comparison to the stored keys. While doing that it must not
perform (and stop if they fail) the additional date checks that can 
be turned on by the SQL mode because there already may be values in 
the table that don't comply with the error checks.
Fixed by ignoring these SQL mode bits while making the key image.
2007-10-22 19:32:18 +03:00
kaa@polly.(none)
d55d309380 Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550
into  polly.(none):/home/kaa/src/opt/bug28550/my51-bug28550
2007-10-21 21:49:30 +04:00
kaa@polly.(none)
349841118f Bug #28550 "Potential bugs related to the return type of the CHAR function".
Since, as of MySQL 5.0.15, CHAR() arguments larger than 255 are converted into multiple result bytes, a single CHAR() argument can now take up to 4 bytes. This patch fixes Item_func_char::fix_length_and_dec() to take this into account.
  
This patch also fixes a regression introduced by the patch for bug21513. As now we do not always have the 'name' member of Item set for Item_hex_string and Item_bin_string, an own print() method has been added to Item_hex_string so that it could correctly be printed by Item_func::print_args().
2007-10-21 21:45:31 +04:00
malff@lambda.hsd1.co.comcast.net.
2d6fbbda59 Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
2007-10-18 16:57:51 -06:00
malff@lambda.hsd1.co.comcast.net.
6fa35a5d3b Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge
2007-10-18 16:39:55 -06:00
gluh@eagle.(none)
97ce1f8cf1 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-16 14:10:07 +05:00
gluh@eagle.(none)
20baa313b5 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-16 13:19:01 +05:00
gluh@mysql.com/eagle.(none)
55a7338f39 Bug#30986 Character set introducer followed by a HEX string can return bad result(addon)
issue an error if string has illegal characters
2007-10-15 18:40:58 +05:00
holyfoot/hf@hfmain.(none)
46cbb26b04 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/31155/my51-31155
2007-10-12 15:36:51 +05:00
holyfoot/hf@hfmain.(none)
a453b2f715 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31155/my50-31155
2007-10-12 15:35:16 +05:00
holyfoot/hf@hfmain.(none)
44325614ec Merge mysql.com:/home/hf/work/31155/my50-31155
into  mysql.com:/home/hf/work/31155/my51-31155
2007-10-12 15:33:26 +05:00
gluh@eagle.(none)
16a0ecdb2b Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-11 16:13:14 +05:00
gluh@mysql.com/eagle.(none)
db39976a06 Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zero
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset
2007-10-11 16:07:10 +05:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
e908bb72e5 Fix for bug #29444: crash with partition refering to table in create-select
Problem: creating a partitioned table during name resolution for the 
partition function we search for column names in all parts of the
CREATE TABLE query. It is superfluous (and wrong) sometimes.

Fix: launch name resolution for the partition function against
the table we're creating.
2007-10-09 19:16:39 +05:00
dkatz@damien-katzs-computer.local
38d3575695 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime
2007-10-08 13:15:02 -04:00
dkatz@damien-katzs-computer.local
b2fec8877c Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.0-runtime
2007-10-08 13:10:55 -04:00
tnurnberg@sin.intern.azundris.com
00135f1ced Merge sin.intern.azundris.com:/home/tnurnberg/31253/50-31253
into  sin.intern.azundris.com:/home/tnurnberg/31253/51-31253
2007-10-05 13:00:11 +02:00
tnurnberg@sin.intern.azundris.com
455c05abcf Bug #31253: crash comparing datetime to double
convert(<invalid time>, datetime) in WHERE caused crash as function
returned (void*)NULL, but did not flag SQL NULL. It does now.
2007-10-05 12:08:38 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
16db036d82 Bug #31155 gis types in union'd select cause crash.
We use get_geometry_type() call to decide the exact type
of a geometry field to be created (POINT, POLYGON etc)
Though this function was only implemented for few items.
In the bug's case we need to call this function for the
Item_sum instance, where it was not implemented, what is
the reason of the crash.
Fixed by implementing virtual Item::get_geometry_type(),
so it can be called for any Item.
2007-10-04 12:01:28 +05:00
dkatz@damien-katzs-computer.local
07f616d6c0 Merge damien-katzs-computer.local:/Users/dkatz/bug29772/my50-bug29772
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime
2007-10-01 12:41:38 -04:00
dkatz@damien-katzs-computer.local
040e520d55 Bug #29772 Error compiling with option --without-geometry
Added #ifdef HAVE_SPATIAL around geometry related code.
2007-09-28 17:10:14 -04:00
gshchepa@devsrv-b.mysql.com
3dc13a6444 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  devsrv-b.mysql.com:/data0/gshchepa/mysql-5.1-opt
2007-09-14 21:17:07 +02:00
sergefp@mysql.com
41404ec52e BUG#27927:Partition pruning not optimal with TO_DAYS and YEAR functions
- Introduced val_int_endpoint() function which converts between func 
  argument intervals and func value intervals for monotonic functions.
- Made partition interval analyzer use part_expr->val_int_endpoint()
  to check if the edge values should be included.
2007-09-14 14:18:42 +04:00
gshchepa@devsrv-b.mysql.com
a9987ffde4 Merge devsrv-b.mysql.com:/data0/gshchepa/mysql-5.0-opt
into  devsrv-b.mysql.com:/data0/gshchepa/mysql-5.1-opt
2007-09-14 10:37:42 +02:00
gshchepa/uchum@gleb.loc
e4eadcfbdd Fixed bug #27695.
Declaring an all space column name in the SELECT FROM DUAL or in a view
leads to misleading warning message:
"Leading spaces are removed from name ' '".

The Item::set_name method has been modified to raise warnings like
"Name ' ' has become ''" in case of the truncation of an all
space identifier to an empty string identifier instead of the
"Leading spaces are removed from name ' '" warning message.
2007-09-13 18:41:50 +05:00
jani@a88-113-38-195.elisa-laajakaista.fi
b25dacbdee Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-24 15:25:02 +03:00
gshchepa@bk-internal.mysql.com
46e58466cb Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/users/gshchepa/mysql-5.1-opt
2007-08-23 21:38:24 +02:00
jani@hynda.mysql.fi
6519de0469 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-08-22 17:29:38 +03:00