Commit graph

13988 commits

Author SHA1 Message Date
unknown
4fc6d3b2b6 Merge polly.(none):/home/kaa/src/maint/bug26788/my50-bug26788
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


mysql-test/t/type_float.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
mysql-test/r/insert.result:
  SCCS merged
mysql-test/t/insert.test:
  SCCS merged
2007-12-01 10:48:41 +03:00
unknown
1615f83804 Fix for bug #26788 "mysqld (debug) aborts when inserting specific
numbers into char fields" and bug #12860 "Difference in zero padding of
exponent between Unix and Windows"

Rewrote the code that determines what 'precision' argument should be
passed to sprintf() to fit the string representation of the input number
into the field.
We get finer control over conversion by pre-calculating the exponent, so
we are able to determine which conversion format, 'e' or 'f', will be
used by sprintf().
We also remove the leading zero from the exponent on Windows to make it
compatible with the sprintf() output on other platforms.


mysql-test/r/insert.result:
  Added test cases for bug #26788 and bug #31152.
mysql-test/t/cast.test:
  Removed --replace_result, since the result is now correct on Windows.
mysql-test/t/insert.test:
  Added test cases for bug #26788 and bug #31152.
mysql-test/t/type_float.test:
  Removed --replace_result, since the result is now correct on Windows.
mysql-test/t/variables.test:
  Removed --replace_result, since the result is now correct on Windows.
sql/field.cc:
  Rewrote the code that determines what 'precision' argument should be
  passed to sprintf() to fit the string representation of the input number
  into the field.
  We get finer control over conversion by pre-calculating the exponent, so
  we are able to determine which conversion format, 'e' or 'f', will be
  used by sprintf().
2007-12-01 10:05:59 +03:00
unknown
8a3e1a5568 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/misc/mysql/24907/50-24907


sql/sql_select.cc:
  Auto merged
2007-11-17 19:13:27 +01:00
unknown
748446b99c Bug#24907: unpredictable (display) precission, if input precission increases
Server failed in assert() when we tried to create a DECIMAL() temp field
with a scale of more than the allowed 30. Now we limit the scale to the
allowed maximum. A truncation warning is thrown as necessary.


mysql-test/r/type_newdecimal.result:
  Show that out of range DECIMAL temp fields will no longer
  stop the server with an assert.
mysql-test/t/type_newdecimal.test:
  Show that out of range DECIMAL temp fields will no longer
  stop the server with an assert.
sql/sql_select.cc:
  When creating DECIMAL() temp field, ascertain we stay within allowed
  limits. If not, truncate and warn.
2007-11-17 19:05:31 +01:00
unknown
122bb7e2f7 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b32137/b32137.5.0
2007-11-10 18:57:32 +04:00
unknown
f56e68929a manual merge. 2007-11-10 18:27:57 +04:00
unknown
775f84186a Bug#30630 mysql-test-run all tests fail with MySQL 5.0.41 & 5.0.45 on Mac OS X Server 10.5
mysql-test/mysql-test-run.pl:
  Also check for euid == 0
2007-11-01 19:40:27 +01:00
unknown
0704e39fb3 Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
2007-11-01 16:55:16 +01:00
unknown
8eb11f8405 Bug#27753 enable mysql-test-run.pl to ignore tests based on wildcard
- Fix problem in first implementation


mysql-test/lib/mtr_cases.pl:
  Prepend a ^ to the regex only if _all_ charactersin the pattern are normal
2007-11-01 11:02:28 +01:00
unknown
71f9931d60 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b30654/b30654.5.0
2007-10-31 11:01:06 +04:00
unknown
2611e8ec0c Fix for bug #30654: mysqlcheck fails during upgrade of tables whose
names include backticks or blank

Problem: mysqlcheck doesn't escape backtick characters in the table names.

Fix: escape them.


client/mysqlcheck.c:
  Fix for bug #30654: mysqlcheck fails during upgrade of tables whose 
  names include backticks or blank
    - escape backtick characters in the table names.
mysql-test/r/mysqlcheck.result:
  Fix for bug #30654: mysqlcheck fails during upgrade of tables whose 
  names include backticks or blank
    - test result.
mysql-test/t/mysqlcheck.test:
  Fix for bug #30654: mysqlcheck fails during upgrade of tables whose 
  names include backticks or blank
    - test case.
2007-10-30 12:51:57 +04:00
unknown
2fa9b3c9a3 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31137/b31137.5.0
2007-10-29 20:43:57 +04:00
unknown
016c6f615e Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b30782/b30782.5.0


sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
2007-10-29 13:42:02 +04:00
unknown
42894ed0b8 Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE,
JOIN, and ORDER BY

Problem: improper maximum length calculation of the CASE function leads to 
decimal value truncation (storing/retrieving decimal field values).

Fix: accurately calculate maximum length/unsigned flag/decimals parameters 
of the CASE function.


mysql-test/r/case.result:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - test result.
mysql-test/t/case.test:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - test case.
sql/item_cmpfunc.cc:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - accurately calculate Item_func_case::max_length/unsigned_flag/decimals.
sql/item_cmpfunc.h:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - accurately calculate Item_func_case::max_length/unsigned_flag/decimals.
2007-10-29 12:20:21 +04:00
unknown
d7d93cf548 Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.

Problem: if a partial unique key followed by a non-partial one we declare
the second one as a primary key.

Fix: sort non-partial unique keys before partial ones.


include/my_base.h:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - sort unique keys that don't contain partial segments before other keys:
        set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
        use it in the sort_keys();
mysql-test/r/innodb_mysql.result:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test result.
mysql-test/r/key.result:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test result.
mysql-test/t/innodb_mysql.test:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test case.
mysql-test/t/key.test:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test case.
sql/sql_table.cc:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - sort unique keys that don't contain partial segments before other keys:
        set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
        use it in the sort_keys();
sql/structs.h:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - sort unique keys that don't contain partial segments before other keys:
        set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
        use it in the sort_keys();
2007-10-26 15:37:38 +05:00
unknown
4de3fdd716 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31615/b31615.5.0


sql/set_var.cc:
  Auto merged
2007-10-24 21:57:51 +05:00
unknown
57d74b5c98 Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
2007-10-23 13:16:15 +02:00
unknown
5e2fc9a919 Merge pilot.mysql.com:/data/msvensson/mysql/bug30560/my50-bug30560
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
2007-10-23 13:15:35 +02:00
unknown
0c396b862e Merge mysql.com:/home/ram/work/b31615/b31615.4.1
into  mysql.com:/home/ram/work/b31615/b31615.5.0


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
2007-10-23 16:04:32 +05:00
unknown
c240ef5be6 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31349/b31349.5.0
2007-10-23 15:14:58 +05:00
unknown
5aa9c1bd6f Bug#30560 Valgrind option to mysql-test-run with spaces in cause strange error
mysql-test/mysql-test-run.pl:
  Use an array to store the valgrind options
  Deprecate --valgrind-options=s and instead use --valgrind-option(but allow
  PushBuild's) --valgrind-options=s usage.
  Make the variables local
2007-10-23 11:52:55 +02:00
unknown
fb77972470 Merge polly.(none):/home/kaa/src/maint/bug30453/my50-bug28878
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint
2007-10-23 13:31:24 +04:00
unknown
0d86a617b5 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31349/b31349.5.0
2007-10-23 14:06:26 +05:00
unknown
4e83236f4f Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines
into  anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines.merge


mysql-test/r/heap_btree.result:
  Auto merged
mysql-test/t/heap_btree.test:
  Auto merged
2007-10-19 13:04:30 -07:00
unknown
426b551bf6 Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
Problem: lying to the optimizer that a function (Item_func_inet_ntoa)
cannot return NULL values leads to unexpected results (in the case group
keys creation/comparison is broken). 

Fix: Item_func_inet_ntoa::maybe_null should be set properly.


mysql-test/r/func_misc.result:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - test case.
sql/item_strfunc.h:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - set Item_func_inet_ntoa::maybe_null flag.
2007-10-19 14:54:05 +05:00
unknown
d927461052 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


mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/udf_example.c:
  Auto merged
sql/udf_example.def:
  Auto merged
2007-10-18 16:39:55 -06:00
unknown
36c7ad3704 Merge pilot.mysql.com:/data/msvensson/mysql/tmp/my50-m-fix-win32_perl
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
2007-10-18 22:02:40 +02:00
unknown
8933fb3abd Remove unportable use of "system rm" 2007-10-18 21:48:16 +02:00
unknown
367fc73e3c Bug #29804 UDF parameters don't contain correct string length
Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself.
    
Now the *_init functions get the constant as a null terminated string with the correct length supplied too.


mysql-test/r/udf.result:
  Test case to check constants passed UDFs.
mysql-test/t/udf.test:
  Test case to check constants passed UDFs.
sql/item_func.cc:
  UDF _init functions are now passed the length of the constants, rather than the max length of the var containing the constant.
sql/udf_example.c:
  Added check_const_len functions. The check_const_len_init functions checks that lengths of constants are correctly passed.
sql/udf_example.def:
  Add new example functions to windows dll export list.
2007-10-17 17:54:11 -04:00
unknown
e8adc3f74b Fix for bug#31615: crash after set names ucs2 collate xxx
Problem: currently, UCS-2 cannot be used as a client character set.

Fix: raise an error if one attempts to set it to USC-2.


mysql-test/r/ctype_ucs.result:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - test result.
mysql-test/t/ctype_ucs.test:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - test case.
sql/set_var.cc:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - raise an error if one is going to set character_set_client to UCS-2.
sql/set_var.h:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - raise an error if one is going to set character_set_client to UCS-2.
2007-10-17 14:28:00 +05:00
unknown
d73ab388b1 Merge polly.(none):/home/kaa/src/maint/mysql-4.1-maint
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


mysql-test/r/repair.result:
  Auto merged
mysql-test/t/repair.test:
  Auto merged
2007-10-17 10:32:05 +04:00
unknown
77f287556b Fixed the test case for bug #31174 to not fail on 64-bit platforms. 2007-10-17 10:29:51 +04:00
unknown
28ef3b2a7f Implementing code review comments
mysql-test/r/sp.result:
  Added tests for coverage
mysql-test/t/sp.test:
  Added tests for coverage
sql/sql_udf.cc:
  Code cleanup
2007-10-16 11:16:31 -06:00
unknown
9ef7b5f6f0 Merge polly.(none):/home/kaa/src/maint/mysql-4.1-maint
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


myisam/sort.c:
  Auto merged
mysql-test/r/repair.result:
  Auto merged
mysql-test/t/repair.test:
  Auto merged
2007-10-16 19:20:00 +04:00
unknown
99a7866a93 Merge polly.(none):/home/kaa/src/maint/bug31174/my41-bug31174
into  polly.(none):/home/kaa/src/maint/mysql-4.1-maint
2007-10-16 19:17:00 +04:00
unknown
f1d7a96b0a Bug#28318 (CREATE FUNCTION (UDF) requires a schema) -- part II
The root cause of the issue was that the CREATE FUNCTION grammar,
for User Defined Functions, was using the sp_name rule.
The sp_name rule is intended for fully qualified stored procedure names,
like either ident.ident, or just ident but with a default database
implicitly selected.

A UDF does not have a fully qualified name, only a name (ident), and should
not use the sp_name grammar fragment during parsing.

The fix is to re-organize the CREATE FUNCTION grammar, to better separate:
- creating UDF (no definer, can have AGGREGATE, simple ident)
- creating Stored Functions (definer, no AGGREGATE, fully qualified name)

With the test case provided, another issue was exposed which is also fixed:
the DROP FUNCTION statement was using sp_name and also failing when no database
is implicitly selected, when droping UDF functions.
The fix is also to change the grammar so that DROP FUNCTION works with
both the ident.ident syntax (to drop a stored function), or just the ident
syntax (to drop either a UDF or a Stored Function, in the current database)


mysql-test/r/sp-error.result:
  Adjust test results
mysql-test/r/udf.result:
  Adjust test results
mysql-test/t/sp-error.test:
  Adjust test results
mysql-test/t/udf.test:
  Adjust test results
sql/sql_parse.cc:
  CREATE UDF FUNCTION does not use a fully qualified name.
sql/sql_yacc.yy:
  Fix grammar for CREATE / DROP FUNCTION, FOR udf
  Improve error messages for select no_such_function()
2007-10-15 19:15:38 -06:00
unknown
13afffd03b Merge pilot.mysql.com:/data/msvensson/mysql/bug11589/my50-test_latest
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint


libmysql/libmysql.c:
  Auto merged
mysql-test/r/type_float.result:
  Manual merge
mysql-test/t/type_float.test:
  Manual merge
2007-10-15 09:22:11 +02:00
unknown
4eec3b087d Fix for bug #30453: String not cast to int correctly.
Problem:

my_strntoull10rnd_8bit() handled incorrectly cases when the input
string contains a decimal point and is long enough to overrun the
'unsigned long long' type. The position of the decimal point was not
taken into account which resulted in miscalculated numbers and
truncation to appropriate SQL data type limits.

Solution:

Fix my_strntoull10rnd_8bit() to take the position of a decimal point
into account in such cases.


mysql-test/r/insert.result:
  Added a test case for bug #30453.
mysql-test/t/insert.test:
  Added a test case for bug #30453.
strings/ctype-simple.c:
  In cases when the 'unsigned long long' type is overrun by the input
  string and a decimal point has occurred, adjust the 'shift' according to
  the position of the decimal point and skip all subsequent digits.
2007-10-15 10:34:34 +04:00
unknown
4eb5506257 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31154/b31154.5.0
2007-10-15 10:40:28 +05:00
unknown
e9668a9b55 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31154/b31154.5.0
2007-10-15 10:28:58 +05:00
unknown
29b06fd022 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b30885/b30885.5.0
2007-10-15 09:57:11 +05:00
unknown
e0bdce865a Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/30951/50-30951
2007-10-12 11:54:44 +02:00
unknown
91f6d169a6 Bug#30951: makedate returns different results depending on version of mysql
makedate() will fold years below 100 into the 1970-2069 range. CS removes code
that also wrongly folded years between 100 and 200 into that range, which should
be left unchanged. Backport from 5.1.


mysql-test/r/func_sapdb.result:
  Show that makedate() works correctly for 100 <= year < 200.
mysql-test/t/func_sapdb.test:
  Show that makedate() works correctly for 100 <= year < 200.
sql-common/my_time.c:
  Remove unnecessary date magic. Syncs behaviour with 5.1+
  and manual.
2007-10-12 11:46:48 +02:00
unknown
24a567e9f6 Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
Problem: GROUP_CONCAT(DISTINCT BIT_FIELD...) uses a tree to store keys;
which are constructed using a temporary table fields,
see Item_func_group_concat::setup().
As a) we don't store null bits in the tree where the bit fields store parts 
of their data and b) there's no method to properly compare two table records
we've got problem.

Fix: convert BIT fields to INT in the temporary table used.


mysql-test/r/func_gconcat.result:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - test result.
mysql-test/t/func_gconcat.test:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - test case.
sql/item_sum.cc:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - force the create_tmp_table() to convert BIT columns to INT 
      in order to be able to compare records containing BIT fields.
2007-10-11 17:20:34 +05:00
unknown
1c7b80dff9 Fix for bug #31174: "Repair" command on MyISAM crashes with small
myisam_sort_buffer_size.

An incorrect length of the sort buffer was used when calculating the
maximum number of keys. When myisam_sort_buffer_size is small enough,
this could result in the number of keys < number of
BUFFPEK structures which in turn led to use of uninitialized BUFFPEKs.

Fixed by correcting the buffer length calculation.


myisam/sort.c:
  Use a correct buffer length when calculating the maximum number of keys.
  Assert that for each BUFFPEK structure there is at least one
  corresponding key. Otherwise we would fail earlier and not reach
  merge_buffers().
mysql-test/r/repair.result:
  Added a test case for bug #31174.
mysql-test/t/repair.test:
  Added a test case for bug #31174.
2007-10-11 14:28:12 +04:00
unknown
c7ca2283a9 Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


mysql-test/mysql-test-run.pl:
  Auto merged
scripts/mysql_system_tables_data.sql:
  Auto merged
2007-10-10 14:12:36 -06:00
unknown
74ce197bda Merge polly.(none):/home/kaa/src/maint/bug28878/my41-bug28878
into  polly.(none):/home/kaa/src/maint/mysql-4.1-maint
2007-10-10 23:39:53 +04:00
unknown
82107254e4 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-10-10 20:44:05 +02:00
unknown
77c5085882 Cleanup sp.test.
mysql-test/r/sp.result:
  Update result file.
2007-10-10 14:42:29 +04:00
unknown
e952df911c Merge virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/bugs/28318-5.0
into  virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/mysql-5.0-runtime


sql/sql_yacc.yy:
  Auto merged
2007-10-09 20:48:37 -03:00