Commit graph

177 commits

Author SHA1 Message Date
kroki/tomash@moonlight.intranet
b6bee0a394 BUG#21166: Prepared statement causes signal 11 on second execution
Changes in an item tree done by optimizer weren't properly
registered and went unnoticed, which resulted in preliminary freeing
of used memory.
2006-08-24 15:49:12 +04:00
gkodinov/kgeorge@macbook.gmz
f5b0dd6a00 Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
When executing INSERT over a view with calculated columns it was assuming all
  elements of the fields collection are actually Item_field instances.
  This may not be true when inserting into a view and that view has columns that are 
  such expressions that allow updating (like setting a collation for example).
  Corrected to access field information through the filed_for_view_update() function and 
  retrieve correctly the field info even for "update-friendly" non-Item_field items.
2006-07-25 18:42:49 +03:00
igor@olga.mysql.com
d1c109ef12 Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-19 13:44:37 -07:00
igor@olga.mysql.com
f201828dd8 Fixed bug #17526: incorrect print method
for class Item_func_trim. 
For 4.1 it caused wrong output for EXPLAIN EXTENDED commands
if expressions with the TRIM function of two arguments were used.
For 5.0 it caused an error message when trying to select
from a view with the TRIM function of two arguments.
This unexpected error message was due to the fact that the
print method for the class Item_func_trim was inherited from
the class Item_func. Yet the TRIM function does not take a list
of its arguments. Rather it takes the arguments in the form:
  [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
  [remstr FROM] str
2006-07-19 12:36:55 -07:00
evgen@moonbone.local
8394aec4e6 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-07-13 18:16:16 +04:00
igor@olga.mysql.com
f6d6ac1e0f Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-06 13:40:08 -07:00
igor@olga.mysql.com
0e3d2dafd6 Fixed bug #18243.
The implementation of the method Item_func_reverse::val_str
for the REVERSE function modified the argument of the function.
This led to wrong results for expressions that contained
REVERSE(ref) if ref occurred somewhere else in the expressions.
2006-07-06 11:11:49 -07:00
kroki@mysql.com
821b540f2e Merge mysql.com:/home/tomash/src/mysql_ab/mysql-5.0
into  mysql.com:/home/tomash/src/mysql_ab/mysql-5.0-bug20570
2006-07-04 23:55:52 +04:00
kroki@mysql.com
dbdecef495 Bug#20570: CURRENT_USER() in a VIEW with SQL SECURITY DEFINER returns
invoker name

The bug was fixed similar to how context switch is handled in
Item_func_sp::execute_impl(): we store pointer to current
Name_resolution_context in Item_func_current_user class, and use
its Security_context in Item_func_current_user::fix_fields().
2006-07-02 14:35:45 +04:00
gluh@eagle.intranet.mysql.r18.ru
b1892278c7 Bug#19599 duplication of information_schema column value in a CONCAT expr with user var
mark result string using String::mark_as_const()
which prevents CONCAT from reusing it as a buffer
for concatenation result.
2006-06-06 12:51:04 +05:00
jimw@mysql.com
7d54b004a2 Bug #13975: "same string" + 0 has 2 different results
The 'decimals' member of Item_func was being improperly initialized,
  which resulted in improper results when handling large numeric values.
2006-05-18 10:34:01 -07:00
jimw@mysql.com
80aafdd398 Bug #17043: Casting trimmed string to decimal loses precision
Results of string functions were being converted to decimals by first
  being converted to integers, resulting in a loss of precision.
2006-03-14 02:04:43 -08:00
gluh@eagle.intranet.mysql.r18.ru
33e7d20f37 Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8
calculate Item_func_format::max_length using charset->mbmaxlen
2006-03-06 12:52:38 +04:00
msvensson@neptunus.(none)
a626b51dad BUG#9535 Warning for "create table t as select uuid();"
- Set max_length of Item_func_uuid to max_length*system_charset_info->mbmaxlen
    Note! Item_func_uuid should be set to use 'ascii' charset when hex(), format(), md5()
etc will use 'ascii'
    - Comitting again, the old patch seems to have been lost.
2005-12-07 15:45:31 +01:00
bar@mysql.com
0f73558ee3 Merge mysql.com:/usr/home/bar/mysql-4.1.b10446
into  mysql.com:/usr/home/bar/mysql-5.0
2005-11-29 09:25:51 +04:00
bar@mysql.com
e6708aa0df Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.0.b14146
2005-11-25 10:08:00 +04:00
bar@mysql.com
2f72e05903 Bug#10446 Illegal mix of collations:
item_strfunc.h, item_strfunc.cc, item.cc:
  Try to convert a const item into destination 
  character set. If conversion happens without
  data loss, then cache the converted value
  and return it during val_str().
  Otherwise, if conversion loses data, return
  Illeral mix of collations error, as it happened
  previously.
ctype_recoding.result, ctype_recoding.test:
  Fixing tests accordingly.
2005-11-21 17:26:31 +04:00
guilhem@mysql.com
1379dd180f Merge mysql.com:/home/mysql_src/mysql-4.1-gca
into  mysql.com:/home/mysql_src/mysql-5.0-release
2005-11-10 15:13:12 +01:00
guilhem@mysql.com
2df7d97281 Declaring some class members public for BUG#12377:
"Item_date_add_interval needs to have the int_type member as Public".
As explained in the bug report, this change is is to help http://search.cpan.org/~philips/DBIx-MyParse-0.20/
So please keep those members public.
2005-11-10 15:12:22 +01:00
bar@mysql.com
1946d68f99 Bug#14146 CHAR(...USING ...) and CONVERT(CHAR(...) USING...) produce different results
ctype_utf8.result, ctype_utf8.test:
  Adding test case.
item_strfunc.cc:
item_strfunc.h:
  Moving the well formed checking code into a method,
  to reuse in several Item_func_xxx. Reusing the new
  method in Item_func_char and Item_func_charset_conv.
2005-11-07 12:34:19 +04:00
bar@mysql.com
a167ddc6e7 Bug#13233
select distinct char(column) fails with utf8
ctype_utf8.result, ctype_utf8.test:
  Adding test case
sql_yacc.yy:
  Adding new syntax.
item_strfunc.h:
  Fixing wrong max_length calculation.
  Also, adding CHAR(x USING charset),
  for easier migrating from 4.1 to 5.0,
  according to Monty's suggestion.
2005-10-21 14:41:56 +05:00
bar@mysql.com
7c81d7fc69 ctype_utf8.result, ctype_utf8.test:
New syntax: CHAR(x USING charset)
  Adding test case.
sql_yacc.yy:
  New syntax: CHAR(x USING charset)
  Adding new parser rule.
item_strfunc.h:
  New syntax: CHAR(x USING charset)
  Adding a new constructor.
2005-10-13 19:24:47 +05:00
monty@mysql.com
f5fdf3e87a Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
2005-10-12 00:58:22 +03:00
bell@sanja.is.com.ua
8aad35f9d2 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
2005-07-16 00:17:05 +03:00
bell@sanja.is.com.ua
6114bee47c stop evaluation constant functions in WHERE (BUG#4663)
correct value of CURRENT_USER() in SP with "security definer" (BUG#7291)
2005-07-16 00:01:44 +03:00
monty@mysql.com
86d7b02199 Merge with 4.1 2005-07-03 14:17:52 +03:00
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
igor@rurik.mysql.com
4b8f2e9bb4 func_str.test:
Added test cases for bug #11469.
item_strfunc.h:
  Fixed bug #11469: wrong implementation of the not_null_tables
  method for CONCAT_WS.
2005-06-29 02:40:25 -07:00
bell@sanja.is.com.ua
3c5286c3e2 fixed encrypt() print (BUG#7024) 2005-06-24 00:24: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
bar@mysql.com
2df945d87b Bug#8610: The ucs2_turkish_ci collation fails with upper('i')
UPPER/LOWER now can return a string with different length.

mi_test1.c:
  Adding new arguments.
Many files:
  Changeing caseup/casedn to return a result with different
  length than argument.
sql_string.h:
  Removing unused method,
mysql_priv.h:
  Removing unused method
2005-06-06 16:54:15 +05:00
msvensson@neptunus.(none)
02a3295a60 Merge neptunus.(none):/home/msvensson/mysql/bug9535
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-05-17 20:32:00 +02:00
msvensson@neptunus.(none)
e6ba48b942 BUG#9535 Warning for "create table t as select uuid();"
- Set max_length of Item_func_uuid to max_length*system_charset_info->mbmaxlen
  Note! Item_func_uuid should be set to use 'ascii' charset when hex(), format(), md5() etc will use 'ascii'
2005-05-17 20:31:26 +02:00
msvensson@neptunus.(none)
f3890e9440 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-05-10 10:49:50 +02:00
msvensson@neptunus.(none)
7133dc5a22 Remove testcode 2005-05-10 10:45:16 +02: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)
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
bar@eagle.intranet.mysql.r18.ru
2a1ad57732 Merge 2005-03-25 10:43:35 +04:00
bar@mysql.com
29ffcad226 Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered
as "x is not null" due to incorrect not_null_tables().
2005-03-24 18:10:46 +04: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
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
monty@mysql.com
422c2eb868 4.1 -> 5.0 merge 2005-02-03 13:18:30 +02:00
jimw@mysql.com
5f0c4ff140 Merge fixes for #8248, #5569. 2005-02-02 08:21:11 -08:00
jimw@mysql.com
e86457cef0 Fix QUOTE() to not reuse the input field for output, which resulted in
incorrect results when the input was a constant across a multi-row SELECT
statement. (Bug #8248)
2005-02-01 18:29:10 -08:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02: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
Sinisa@sinisa.nasamreza.org
6772f0a721 A fix for a crashing bug #7101, which occures when the
expression involving LEFT() function is used in GROUP BY
field.
2004-12-10 00:17:43 +02:00
konstantin@mysql.com
e5f4c7a0bd Rename: Item::val -> Item::val_real(). 2004-11-11 21:39:35 +03:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00