Commit graph

495 commits

Author SHA1 Message Date
monty@mysql.com
49a3334889 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-06-19 13:00:36 +03:00
monty@mysql.com
860661a2dc unsigned char -> uchar
Added missing copyright
Indentation and prototype fixes
Fixed compiler warning
2006-06-19 12:45:34 +03:00
evgen@moonbone.local
79c91f6214 Manually merged 2006-06-18 14:56:35 +04:00
evgen@moonbone.local
592e080643 Merge moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-06-17 01:57:25 +04:00
evgen@moonbone.local
b8b9738e0b item_strfunc.cc:
Fix for bug#16716 for --ps-protocol mode.
item_cmpfunc.cc:
  Fix for a memory allocation/freeing problem in agg_cmp_type() after fix
for bug#16377. Few language corrections.
2006-06-16 23:46:37 +04:00
serg@serg.mylan
d00b56549c String::set(double) and set(longlong) -> set_real() and set_int()
fix Field::store(double) being used instead of store(longlong)

NB: overloading functions is evil
2006-06-16 12:17:20 +02:00
evgen@moonbone.local
b669852866 Merge moonbone.local:/work/15351-bug-4.1-mysql
into moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
2006-06-15 14:57:53 +04:00
evgen@moonbone.local
e35a0ca4b7 Manually merged 2006-06-14 23:54:08 +04:00
evgen@moonbone.local
d027dd7c0d Fixed bug#15962: CONCAT() in UNION may lead to a data trucation.
To calculate its max_length the CONCAT() function is simply sums max_lengths
of its arguments but when the collation of an argument differs from the 
collation of the CONCAT() max_length will be wrong. This may lead to a data
truncation when a tmp table is used, in UNIONS for example.

The Item_func_concat::fix_length_and_dec() function now recalculates the 
max_length of an argument when the mbmaxlen of the argument differs from the
mbmaxlen of the CONCAT().
2006-06-07 01:10:23 +04:00
evgen@moonbone.local
766b4a8c7f Fixed bug#15351: Wrong collation used for comparison of md5() and sha()
argument can lead to a wrong result.

md5() and sha() functions treat their arguments as case sensitive strings.
But when they are compared their arguments were compared as a case
insensitive strings which leads to two functions with different arguments
and thus different results to being identical. This can lead to a wrong
decision made in the range optimizer and thus lead to a wrong result set.

Item_func_md5::fix_length_and_dec() and Item_func_sha::fix_length_and_dec()
functions now set binary collation on their arguments.
2006-05-28 22:01:38 +04:00
evgen@moonbone.local
40ea30253f Fixed bug#16716: subselect in concat() may lead to a wrong result.
The Item_func_concat::val_str() function tries to make as less re-allocations
as possible. This results in appending strings returned by 2nd and next
arguments to the string returned by 1st argument if the buffer for the first
argument has enough free space. A constant subselect is evaluated only once 
and its result is stored in an Item_cache_str. In the case when the first
argument of the concat() function is such a subselect Item_cache_str returns
the stored value and Item_func_concat::val_str() append values of other
arguments to it. But for the next row the value in the Item_cache_str isn't
restored because the subselect is a constant one and it isn't evaluated second
time. This results in appending string values of 2nd and next arguments to the 
result of the previous Item_func_concat::val_str() call.

The Item_func_concat::val_str() function now checks whether the first argument 
is a constant one and if so it doesn't append values of 2nd and next arguments
to the string value returned by it.
2006-05-26 01:24:14 +04:00
tomas@poseidon.ndb.mysql.com
6cb699d208 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-05-16 10:37:40 +02:00
tnurnberg@mysql.com
ab69fac55d Merge mysql.com:/home/mysql-4.1-10418
into  mysql.com:/home/mysql-5.0-10418
2006-05-12 10:27:20 +02:00
tnurnberg@mysql.com
21f4e8aadb Bug#10418: LOAD_FILE does not behave like in manual if file does not exist
load_file() string-function should return NULL rather than throw an error if
the file doesn't exist, as per the manual.
2006-05-08 04:37:58 +02:00
aelkin@mysql.com
3363effa52 Merge mysql.com:/home/elkin/MySQL/BARE/5.0
into  mysql.com:/home/elkin/MySQL/MERGE/5.1-new
2006-04-25 20:05:15 +03:00
cmiller@zippy.(none)
9ae7dd9e35 Merge zippy.(none):/home/cmiller/work/mysql/merge/jimw_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new
2006-04-24 16:17:50 -04:00
aelkin@mysql.com
c5219d0d67 Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/4.1
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0
2006-04-23 12:32:39 +03:00
ramil@mysql.com
2398882097 Fix for bug #18643: crazy UNCOMPRESS(). 2006-04-13 16:19:21 +05:00
monty@mysql.com
cbd420a0c1 Remove compiler warnings
Add missing DBUG_RETURN
Fixed stack overflow in NdbBlob (found by ndb_gis.test)
Fixed access to freed memory in ndb_cluster_real_free_share()
2006-03-29 17:04:00 +03: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
guilhem@mysql.com
e485f8e12c Fixes to the replication mixed mode (patch approved by Monty):
- detect the need for row-based binlogging not at execution stage but earlier at parsing stage; needed for example for CREATE TABLE SELECT UUID().
- more tests of this mixed mode.
2006-03-13 15:34:30 +01:00
guilhem@mysql.com
0071749595 WL#2977 and WL#2712 global and session-level variable to set the binlog format (row/statement),
and new binlog format called "mixed" (which is statement-based except if only row-based is correct,
in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release):
SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default;
the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha.
It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE
TEMPORARY TABLE was not binlogged so temp table is not known on slave),  or if NDB is enabled (because
NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below).
The added tests test the possibility or impossibility to SET, their effects, and the mixed mode,
including in prepared statements and in stored procedures and functions.
Caveats:
a) The mixed mode will not work for stored functions: in mixed mode, a stored function will
always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()).
b) for the same reason, changing the thread's binlog format inside a stored function is
refused with an error message.
c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask
Dmitri).
Additionally, as the binlog format is now changeable by each user for his session, I remove the implication
which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1
(not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically
set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled
phantom protection).
Plus fixes for compiler warnings.
2006-02-25 22:21:03 +01:00
jimw@mysql.com
38aafce1ef Merge mysql.com:/home/jimw/my/mysql-5.0-14676
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-02-17 08:32:50 -08:00
konstantin@mysql.com
4d272aba67 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2006-01-11 17:49:56 +03:00
konstantin@mysql.com
9105d06dd6 A fix for Bug#13944 "libmysqlclient exporting sha1_result function":
rename sha1_* to mysql_sha1_*
2006-01-11 17:31:52 +03:00
igor@rurik.mysql.com
09e6597015 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-12-02 20:42:36 -08: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
jimw@mysql.com
69cf72710d Fix possible corruption of results from SUBSTRING_INDEX(). (Bug #14676) 2005-11-23 16:49:07 -08:00
igor@rurik.mysql.com
7b1b69a6e7 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-11-22 23:00:57 -08: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
bell@sanja.is.com.ua
806f9e24ff Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
2005-11-20 20:47:07 +02: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
igor@rurik.mysql.com
c136e9c43b Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
2005-10-15 14:32:37 -07:00
kent@mysql.com
5b448a8d9f Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-tmp
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
2005-10-13 12:09:39 +02: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
jimw@mysql.com
77fbc72f47 Handle errors returned by system crypt() in ENCRYPT(). (Bug #13619) 2005-10-06 16:15:53 -07:00
jimw@mysql.com
3cd331c29f Merge mysql.com:/home/jimw/my/mysql-5.0-13361
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-09-23 10:03:29 -07:00
dlenev@mysql.com
87dcb3c6f5 Fix for bug #13407 "Remote connecting crashes server" and couple of similar
problems which were introduced during work on WL#2787 "Add view definer/owner
to the view definition (.frm) to check privileges on used tables and stored
routines when using a VIEW."

In some cases it is better to use value from Security_context::host_or_ip
instead of value from Security_context::host since the latter can be NULL
in certain situations (When we can't resolve hostname or we have not done
this yet).
2005-09-22 23:03:53 +04:00
jimw@mysql.com
90d6195f04 Fix handling of NULL values in decimal fields in FORMAT(). (Bug #13361) 2005-09-22 11:40:22 -07:00
bell@sanja.is.com.ua
3f66053a50 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner5-5.0
2005-09-20 21:27:28 +03:00
bell@sanja.is.com.ua
c1b185f5ff WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.)
Part 2 postreview fixes.
2005-09-20 21:20:38 +03:00
bar@mysql.com
1d12ac8849 Bug#10504
Character set does not support traditional mode
ctype_utf8.result, ctype_utf8.test:
  adding test case.
password.c, mysql_com.h
  Changeing octet2hex availability from static to public.
item_strfunc.cc:
  Result string is now checked to be well-formed.
  Warning/error is generated, depending on sql_mode.
2005-09-16 10:24:37 +05:00
bell@sanja.is.com.ua
aec371f910 WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
jimw@mysql.com
1d997477aa Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-31 15:24:06 -07:00
jimw@mysql.com
663d0bbdfb Fix crash in DES_DECRYPT(NULL). (Bug #12757) 2005-08-25 12:34:42 -07:00
sergefp@mysql.com
c085c9a3b7 Undo the test cset that shouldn't have been pushed (ChangeSet@1.1988, 2005-08-16 00:03:50+04:00, aivanov@mysql.com
)
2005-08-18 18:26:30 +04:00
aivanov@mysql.com
405f03f389 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/alexi/mysql-5.0
2005-08-16 00:03:50 +04:00
bar@mysql.com
4a071b4833 item_strfunc.cc:
After merge change.
  4.1 method was replaced in 5.0.
2005-08-12 18:13:42 +05:00
bar@mysql.com
1b50f35ab2 Merge mysql.com:/usr/home/bar/mysql-4.1.b12351
into  mysql.com:/usr/home/bar/mysql-5.0
2005-08-12 17:10:00 +05:00