Commit graph

11328 commits

Author SHA1 Message Date
unknown
1daa54d697 Fix for:
bug #26215: mysql command line client should not strip comments
              from SQL statements
and
  bug #11230: Keeping comments when storing stored procedures

With the introduction of multiline comments support in the command line
client (mysql) in MySQL 4.1, it became impossible to preserve
client-side comments within single SQL statements or stored routines.
This feature was useful for monitoring tools and maintenance.

The patch adds a new option to the command line client
('--enable-comments', '-c') which allows to preserve SQL comments and
send them to the server for single SQL statements, and to keep comments
in the code for stored procedures / functions / triggers.

The patch is a modification of the contributed patch from bug #11230
with the following changes:
- code style changes to conform to the coding guidelines
- changed is_prefix() to my_strnncoll() to detect the DELIMITER
command, since the first one is case-sensitive and not charset-aware
- renamed t/comments-51.* to t/mysql_comments.*
- removed tests for comments in triggers since 5.0 does not have SHOW
CREATE TRIGGER (those tests will be added back in 5.1).

The test cases are only for bug #11230. No automated test case for bug
#26215 is possible due to the test suite deficiencies (though the cases
from the bug report were tested manually).


client/mysql.cc:
  Applied the contributed patch from bug11230 with the following changes:
  - code style changes to conform to the coding guidelines
  - changed is_prefix() to my_strnncoll() to detect the DELIMITER
  command, since the first one is case-sensitive and not charset-aware
  
  The patch adds a new option to the command line client which allows to
  preserve SQL comments and send them to the server to ensure better
  error reporting and to, keep comments in the code for stored procedures
  / functions / triggers.
mysql-test/r/mysql_comments.result:
  Added test cases for bug11230.
mysql-test/t/mysql_comments.sql:
  Added test cases for bug11230.
mysql-test/t/mysql_comments.test:
  Added test cases for bug11230.
2007-11-02 13:40:34 +03:00
unknown
6f97c22925 Bug#31030 - rpl000015.test fails if $MYSQL_TCP_PORT != 3306
Preliminarily disabled test case
2007-11-02 10:11:26 +01:00
unknown
5c41118645 Merge mysql.com:/home/svoj/devel/mysql/BUG11392/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG11392/mysql-5.0-engines


mysql-test/r/fulltext.result:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
myisam/ft_boolean_search.c:
  Use local.
2007-11-02 12:58:20 +04:00
unknown
660eb5bb40 Bug #31794: no syntax error on SELECT id FROM t HAVING count(*)>2
The HAVING clause is subject to the same rules as the SELECT list
about using aggregated and non-aggregated columns.
But this was not enforced when processing implicit grouping from
using aggregate functions.
Fixed by performing the same checks for HAVING as for SELECT.


mysql-test/r/func_group.result:
  Bug #31794: test case
mysql-test/t/func_group.test:
  Bug #31794: test case
sql/sql_select.cc:
  Bug #31794: Check HAVING in addition to SELECT list
2007-11-01 18:36:24 +02:00
unknown
baa757d3e3 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-01 15:07:00 +01:00
unknown
7b6b909ac0 Post-merge fix 2007-11-01 15:04:23 +01:00
unknown
c4f35d7c23 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/item_func.cc:
  Auto merged
2007-10-31 12:31:36 +01:00
unknown
967c06df13 Merge stella.local:/home2/mydev/mysql-4.1-amain
into  stella.local:/home2/mydev/mysql-4.1-axmrg
2007-10-31 00:50:03 +01:00
unknown
95acd426eb Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31884-5.0-opt
2007-10-30 16:18:56 +02:00
unknown
6bbdacae20 Bug #31884: Assertion + crash in subquery in the SELECT clause.
Item_in_subselect's only externally callable method is val_bool().
However the nullability in the wrapper class (Item_in_optimizer) is 
established by calling the "forbidden" method val_int().

Fixed to use the correct method (val_bool() ) to establish nullability 
of Item_in_subselect in Item_in_optimizer.


mysql-test/r/subselect.result:
  Bug #31884: test case
mysql-test/t/subselect.test:
  Bug #31884: test case
sql/item_subselect.h:
  Bug #31884: Use the correct method to establish nullability
2007-10-30 14:27:21 +02:00
unknown
b698b6fd94 BUG#11392 - fulltext search bug
Fulltext boolean mode phrase search may crash server on platforms
where size of pointer is not equal to size of unsigned integer
(in other words some 64-bit platforms).

The problem was integer overflow.

Affects 4.1 only.


myisam/ft_boolean_search.c:
  my_match_t::beg is unsigned int, that means type of expression
  (m[0].beg - 1) has unsigned type too. It may happen that instr()
  finds substring in the beggining of passed string, returning
  m[0].beg equal to 0. In this case value of expression (m[0].beg - 1)
  is equal to MAX_UINT.
  
  This is not a problem on platforms where sizeof(pointer) equals to
  sizeof(uint). That means ptr[(uint)-1] = ptr[(uint)MAX_UINT] = ptr - 1.
  
  On some 64-bit platforms where sizeof(pointer) is 8 and sizeof(uint)
  is 4, wrong address gets accessed. In other words ptr[(uint)-1] is
  equal to ptr + MAX_UINT.
mysql-test/r/fulltext.result:
  A test case for BUG#11392.
mysql-test/t/fulltext.test:
  A test case for BUG#11392.
2007-10-30 14:46:43 +04:00
unknown
e722393f51 Bug #31758 inet_ntoa, oct crashes server with null+filesort
Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an
argument, which is wrong.
Both can be NULL with notnull arguments, so that's fixed.


mysql-test/r/func_str.result:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  test case
mysql-test/t/func_str.test:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  test result
sql/item_strfunc.h:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  missing maybe_null flags set for Item_func_inet_ntoa and Item_func_conv
2007-10-30 12:35:03 +04:00
unknown
24ede323cc Merge lambda.weblab:/home/malff/TREE/mysql-5.0-base
into  lambda.weblab:/home/malff/TREE/mysql-5.0-rt-merge


sql/sql_table.cc:
  Auto merged
2007-10-29 07:53:15 -06:00
unknown
9e6bb07d38 Bug#30889: filesort and order by with float/numeric crashes server
There are two problems with ROUND(X, D) on an exact numeric 
(DECIMAL, NUMERIC type) field of a table:
1) The implementation of the ROUND function would change the number of decimal
places regardless of the value decided upon in fix_length_and_dec. When the
number of decimal places is not constant, this would cause an inconsistent
state where the number of digits was less than the number of decimal places,
which crashes filesort.

Fixed by not allowing the ROUND operation to add any more decimal places than
was decided in fix_length_and_dec.

2) fix_length_and_dec would allow the number of decimals to be greater than
the maximium configured value for constant values of D. This led to the same 
crash as in (1).

Fixed by not allowing the above in fix_length_and_dec.


mysql-test/r/type_decimal.result:
  Bug#30889: Test result
mysql-test/t/type_decimal.test:
  Bug#30889: Test case
sql/item_func.cc:
  Bug#30889: 
  - Avoid setting number of digits after decimal point (scale) higher than its 
    maximum value.
  - Avoid increasing the number of decimal places in ::decimal_op
sql/item_func.h:
  Bug#30889: Added comments to the declarations of Item_func_numhybrid::<type>_op
  family of methods.
2007-10-29 15:39:56 +04:00
unknown
d5b1d6205b Bug#30897 GROUP_CONCAT returns extra comma on empty fields
The fix is a copy of Martin Friebe's suggestion.
added testing for no_appended which will be false if anything,
including the empty string is in result


mysql-test/r/func_gconcat.result:
  test result
mysql-test/t/func_gconcat.test:
  test case
sql/item_sum.cc:
  added testing for no_appended which will be False if anything,
  including the empty string is in result
2007-10-29 14:53:10 +04:00
unknown
95e66de205 backported test case from 5.1 2007-10-29 14:45:35 +04:00
unknown
b52ab3bda5 Merge polly.(none):/home/kaa/src/opt/bug29131/my50-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-29 10:25:48 +03:00
unknown
5568084835 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-28 01:19:20 +05:00
unknown
46b03c598d Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31663
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/sql_class.cc:
  Auto merged
2007-10-26 17:55:16 +05:00
unknown
0724eb88e2 protect bug31473 from regressing into 5.0 2007-10-25 17:23:12 -07:00
unknown
6eced1b857 Fix for bug #29131: SHOW VARIABLES reports variable 'log' but SET
doesn't recognize it

This is a 5.0 version of the patch, it will be null-merged to 5.1

Problem:

'log' and 'log_slow_queries' were "fixed" variables, i.e. they showed up
in SHOW VARIABLES, but could not be used in expressions like 
"select @@log". Also, using them in the SET statement produced an 
incorrect "unknown system variable" error.

Solution:

Make 'log' and 'log_slow_queries' read-only dynamic variables to make 
them available for use in expressions, and produce a correct error 
about the variable being read-only when used in the SET statement.


mysql-test/r/variables.result:
  Added a test case for bug #29131.
mysql-test/t/variables.test:
  Added a test case for bug #29131.
sql/mysql_priv.h:
  Changed the type of opt_log and opt_slow_log to my_bool to 
  align with the interfaces in set_var.cc
sql/mysqld.cc:
  Changed the type of opt_log and opt_slow_log to my_bool to 
  align with the interfaces in set_var.cc
sql/set_var.cc:
  Made 'log' and 'log_slow_queries' to be read-only dynamic system 
  variable, i.e. available for use in expressions with the @@var syntax.
sql/set_var.h:
  Added a new system variable class representing a read-only boolean
  variable.
2007-10-25 14:02:27 +04:00
unknown
04ff9d4da0 Fixed bug #27695: View should not be allowed to have empty or
all space column names.

The parser has been modified to check VIEW column names
with the check_column_name function and to report an error
on empty and all space column names (same as for TABLE
column names).


sql/sql_yacc.yy:
  Fixed bug #27695.
  The parser has been modified to check VIEW column aliases
  with the check_column_name function and to report an error
  on empty columns and all space columns (same as for TABLE
  column names).
mysql-test/t/select.test:
  Updated test case for bug #27695.
mysql-test/r/select.result:
  Updated test case for bug #27695.
2007-10-25 10:32:52 +05:00
unknown
3e208eb61f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-10-24 14:07:33 +02:00
unknown
22b3670544 Merge mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-5.0-engines


include/my_sys.h:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysys/charset.c:
  Manual merge.
sql/item_func.cc:
  Manual merge.
2007-10-24 16:39:13 +05:00
unknown
4fda18a3ec Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-4.1-engines
2007-10-24 16:10:09 +05:00
unknown
660d66263b BUG#31159 - fulltext search on ucs2 column crashes server
ucs2 doesn't provide required by fulltext ctype array. Crash
happens because fulltext attempts to use unitialized ctype
array.

Fixed by converting ucs2 fields to compatible utf8 analogue.


include/my_sys.h:
  Added a function to find compatible character set with ctype array
  available. Currently used by fulltext search to find compatible
  substitute for ucs2 collations.
mysql-test/r/ctype_ucs.result:
  A test case for BUG#31159.
mysql-test/t/ctype_ucs.test:
  A test case for BUG#31159.
mysys/charset.c:
  Added a function to find compatible character set with ctype array
  available. Currently used by fulltext search to find compatible
  substitute for ucs2 collations.
sql/item_func.cc:
  Convert ucs2 fields to utf8. Fulltext requires ctype array, but
  ucs2 doesn't provide it.
2007-10-24 16:09:30 +05:00
unknown
e66f7e1d36 Merge magare.gmz:/home/kgeorge/mysql/work/B30715-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.0-opt
2007-10-24 11:45:29 +03:00
unknown
e2433cbcaa Bug #30715: Assertion failed: item_field->field->real_maybe_null(),
file .\opt_sum.cc, line
The optimizer pre-calculates the MIN/MAX values for queries like
 SELECT MIN(kp_k) WHERE kp_1 = const AND ... AND kp_k-1 = const
when there is a key over kp_1...kp_k
In doing so it was not checking correctly nullability and 
there was a superfluous assert(). 
Fixed by making sure that the field can be null before checking and
taking out the wrong assert().
.
Introduced a correct check for nullability 
The MIN(field) can return NULL when all the row values in the group
are NULL-able or if there were no rows.
Fixed the assertion to reflect the case when there are no rows.


mysql-test/r/func_group.result:
  Bug #30715: test case
mysql-test/t/func_group.test:
  Bug #30715: test case
sql/opt_sum.cc:
  Bug #30715: correct nullability check for MIN/MAX pre-calculation over index.
2007-10-24 11:15:08 +03:00
unknown
6a8e10d2ce Post-merge fixes 2007-10-23 21:32:30 +04:00
unknown
6044965c4f Patch for BUG#30736: Row Size Too Large Error Creating a Table and
Inserting Data.

The problem was that under some circumstances Field class was not
properly initialized before calling create_length_to_internal_length()
function, which led to assert failure.

The fix is to do the proper initialization.

The user-visible problem was that under some circumstances
CREATE TABLE ... SELECT statement crashed the server or led
to wrong error message (wrong results).


mysql-test/r/select.result:
  Update result file.
mysql-test/t/select.test:
  Add a test case for BUG#30736: Row Size Too Large Error
  Creating a Table and Inserting Data.
sql/sql_table.cc:
  Move sql_field->decimals initialization before
  sql_field->create_length_to_internal_length() call.
2007-10-23 18:03:51 +04:00
unknown
8479eb1db7 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 18:51:43 +05:00
unknown
72bd96aef3 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-10-23 16:24:56 +04:00
unknown
2d4639c40b Merge polly.(none):/home/kaa/src/opt/bug31742/my50-bug28550
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-10-23 16:03:48 +04:00
unknown
bcc627846d Fixed bug #31663: if the FIELDS TERMINATED BY string
in the SELECT INTO OUTFILE clause starts with a special
character (one of n, t, r, b, 0, Z or N) and ENCLOSED BY
is empty, every occurrence of this character within a
field value is duplicated.

Duplication has been avoided.
New warning message has been added: "First character of
the FIELDS TERMINATED string is ambiguous; please use
non-optional and non-empty FIELDS ENCLOSED BY".


mysql-test/r/outfile_loaddata.result:
  BitKeeper file /home/uchum/work/bk/5.0-opt-31663/mysql-test/r/outfile_loaddata.result
  Added test case for bug #31663.
mysql-test/t/outfile_loaddata.test:
  BitKeeper file /home/uchum/work/bk/5.0-opt-31663/mysql-test/t/outfile_loaddata.test
  Added test case for bug #31663.
sql/sql_class.h:
  Fixed bug #31663.
  The select_export::is_ambiguous_field_term field has been added.
  This field is true if select_export::field_sep_char contains
  the first char of the FIELDS TERMINATED BY (ENCLOSED BY is empty),
  and items can contain this character.
  The select_export::field_term_char field has been added (first
  char of the FIELDS TERMINATED BY string or INT_MAX).
sql/sql_class.cc:
  Fixed bug #31663.
  The select_export::prepare method has been modified to calculate
  a value of the select_export::is_ambiguous_field_term field and
  to warn if this value is true.
  The select_export::send_data method has been modified to
  avoid escaping or duplication of the field_set_char if
  is_ambiguous_field_term is true.
sql/share/errmsg.txt:
  Fixed bug #31663.
  The ER_AMBIGUOUS_FIELD_TERM warning has been added.
2007-10-23 16:16:59 +05:00
unknown
a9a50c7287 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
2007-10-23 13:10:35 +03:00
unknown
31634a38e8 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt
2007-10-23 14:06:56 +05:00
unknown
933bf86954 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt


sql/field.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-10-23 11:26:37 +03:00
unknown
849bcf941f 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.


mysql-test/r/type_date.result:
  Bug #28687: test case
mysql-test/t/type_date.test:
  Bug #28687: test case
sql/item.cc:
  Bug #28687: no invalid date warnings
2007-10-22 19:32:18 +03:00
unknown
bbce18c303 Fix for bug #31742: delete from ... order by function call that causes
an error, asserts server

In case of a fatal error during filesort in find_all_keys() the error
was returned without the necessary handler uninitialization.
Fixed by changing the code so that handler uninitialization is performed
before returning the error.


mysql-test/r/delete.result:
  Added a test case for bug #31742.
mysql-test/t/delete.test:
  Added a test case for bug #31742.
sql/filesort.cc:
  In case of a fatal error in find_all_keys() do not return before doing
  the necessary handler uninitialization steps.
2007-10-22 16:10:08 +04:00
unknown
e763badfe3 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31588/50-31588
2007-10-22 01:57:49 +02:00
unknown
fb434504cc Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-10-21 21:55:26 +04:00
unknown
04311fabaa 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().


mysql-test/r/func_str.result:
  Import patch bug288550.patch
mysql-test/t/func_str.test:
  Import patch bug288550.patch
sql/item.cc:
  Import patch bug288550.patch
sql/item.h:
  Import patch bug288550.patch
sql/item_strfunc.h:
  Import patch bug288550.patch
2007-10-21 21:45:31 +04: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
1a74cdf9d7 Merge anubis.xiphis.org:/usr/home/antony/work/mysql-4.1-engines
into  anubis.xiphis.org:/usr/home/antony/work/mysql-4.1-engines.merge
2007-10-19 13:01:08 -07: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
0a47c29fb0 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31588/50-31588
2007-10-18 16:09:03 +02:00
unknown
d5819c1f7c Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31221-5.0-opt
2007-10-18 15:32:48 +03:00
unknown
787a4b487a Bug #31221: Optimizer incorrectly identifies impossible WHERE clause
No warning was generated when a TIMESTAMP with a non-zero time part
 was converted to a DATE value. This caused index lookup to assume
 that this is a valid conversion and was returning rows that match 
 a comparison between a TIMESTAMP value and a DATE keypart.
 Fixed by generating a warning on such a truncation.


mysql-test/r/derived.result:
  Bug #31221: fixed an existing not-precise test case
mysql-test/r/ps_2myisam.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_3innodb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_4heap.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_5merge.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_6bdb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_7ndb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/type_date.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/type_datetime.result:
  Bug #31221: test case
mysql-test/t/derived.test:
  Bug #31221: fixed an existing not-precise test case
mysql-test/t/type_date.test:
  Bug #31221: test case
sql/field.cc:
  Bug #31221: 
   - Upgraded fix for bug 29729
   - issue a warning only if the hh:mm:ss.msec is not zero consistently 
     for all the Field_newdate::store function
sql/item_timefunc.cc:
  Bug #31221: don't ignore the errors when storing data
2007-10-18 15:19:04 +03:00
unknown
b088967252 Merge sin.intern.azundris.com:/misc/mysql/31588/41-31588
into  sin.intern.azundris.com:/misc/mysql/31588/50-31588


sql/set_var.cc:
  Auto merged
mysql-test/r/variables.result:
  SCCS merged
mysql-test/t/variables.test:
  SCCS merged
2007-10-18 10:51:10 +02:00
unknown
cd9d89a75d Bug#31588: buffer overrun when setting variables
Buffer used when setting variables was not dimensioned to accomodate
trailing '\0'. An overflow by one character was therefore possible.
CS corrects limits to prevent such overflows.


mysql-test/r/variables.result:
  Try to overflow buffer used for setting system variables.
  Unpatched server should throw a valgrind warning here.
  Actual value and error message irrelevant, only length counts.
mysql-test/t/variables.test:
  Try to overflow buffer used for setting system variables.
sql/set_var.cc:
  Adjust maximum number of characters we can store in 'buff' by one
  as strmake() will write a terminating '\0'.
2007-10-18 10:47:54 +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
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
55a3a64eb1 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


sql/item.cc:
  Auto merged
sql/item.h:
  manual merge
2007-10-16 13:19:01 +05: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
048006e2f9 Bug#30986 Character set introducer followed by a HEX string can return bad result(addon)
issue an error if string has illegal characters


mysql-test/r/ctype_utf8.result:
  issue an error if string has illegal characters
mysql-test/t/ctype_utf8.test:
  issue an error if string has illegal characters
sql/item.cc:
  issue an error if string has illegal characters
sql/item.h:
  issue an error if string has illegal characters
sql/sql_yacc.yy:
  issue an error if string has illegal characters
2007-10-15 18:40:58 +05:00
unknown
9bb3c7ebdd Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31019
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-15 13:34:58 +05: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
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
c9141ac580 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
2007-10-13 09:20:23 +03:00
unknown
387d03f574 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.0-opt


sql/item_cmpfunc.cc:
  Auto merged
2007-10-13 09:12:15 +03:00
unknown
9380fdb1c6 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.0-opt
2007-10-12 14:11:27 +03: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
1fc06a1f46 Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31471
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-11 22:42:11 +05: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
f30eacb223 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


mysql-test/r/ctype_ucs.result:
  test result
mysql-test/r/ctype_utf8.result:
  test result
mysql-test/t/ctype_ucs.test:
  test case
mysql-test/t/ctype_utf8.test:
  test case
sql/item.cc:
  check_well_formed_result() moved from Item_str_func
sql/item.h:
  check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
  check_well_formed_result moved to Item
  fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
  check_well_formed_result moved to Item
sql/sql_yacc.yy:
  added check for well formed string
2007-10-11 16:07:10 +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
76af571717 Bug #31440: 'select 1 regex null' asserts debug server
The special case with NULL as a regular expression
was handled at prepare time. But in this special case
the item was not marked as fixed. This caused an assertion
at execution time.
Fixed my marking the item as fixed even when known to 
return NULL at prepare time.


mysql-test/r/func_regexp.result:
  Bug #31440: test case
mysql-test/t/func_regexp.test:
  Bug #31440: test case
sql/item_cmpfunc.cc:
  Bug #31440: mark the item as fixed even when 
  known to return NULL.
2007-10-11 11:29:26 +03:00
unknown
c866f8015f Fixed bug #31471: decimal_bin_size: Assertion `scale >= 0 &&
precision > 0 && scale <= precision'.

A sign of a resulting item of the IFNULL function was not
updated and the maximal length of this result was calculated
improperly. Correct algorithm was copy&pasted from the IF
function implementation.


sql/item_cmpfunc.cc:
  Fixed bug #31471.
  The Item_func_ifnull::fix_length_and_dec method has been
  modified to update the Item_func_ifnull::unsigned_flag field
  and to take this field into account when calculating the
  Item_func_ifnull::max_length value.
  (See Item_func_if::fix_length_and_dec for reference).
mysql-test/t/null.test:
  Added test case for bug #31471.
mysql-test/r/null.result:
  Added test case for bug #31471.
mysql-test/r/create.result:
  Update test case after the bugfix of bug #31471.
2007-10-10 20:14:29 +05:00
unknown
aec287fd67 Bug #30825: Problems when putting a non-spatial index on a GIS column
Fixed the usage of spatial data (and Point in specific) with 
 non-spatial indexes.
 Several problems :
   - The length of the Point class was not updated to include the 
     spatial reference system identifier. Fixed by increasing with 4 
     bytes.
   - The storage length of the spatial columns was not accounting for
     the length that is prepended to it. Fixed by treating the 
     spatial data columns as blobs (and thus increasing the storage
     length)
   - When creating the key image for comparison in index read wrong
     key image was created (the one needed for and r-tree search,
     not the one for b-tree/other search). Fixed by treating the
     spatial data columns as blobs (and creating the correct kind of
     image based on the index type). 


mysql-test/r/bdb_gis.result:
  Bug #30825: bdb tests
mysql-test/r/gis-rtree.result:
  Bug #30825: key length changed
mysql-test/r/gis.result:
  Bug #30825: MyISAM tests
mysql-test/r/innodb_gis.result:
  Bug #30825: InnoDB tests
mysql-test/t/bdb_gis.test:
  Bug #30825: bdb tests
mysql-test/t/gis.test:
  Bug #30825: MyISAM tests
mysql-test/t/innodb_gis.test:
  Bug #30825: InnoDB tests
sql/field.cc:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/field.h:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/sql_select.h:
  Bug #30825: Geometry data are a blob derivate
sql/sql_table.cc:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/sql_yacc.yy:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/table.cc:
  Bug #30825: It stores a length for spatial data
   as well, so increase the storage length (as it's
   done for blobs).
mysql-test/include/gis_keys.inc:
  Bug #30825: Test file for spatial data and non-spatial indexes
2007-10-10 16:26:02 +03:00
unknown
77c5085882 Cleanup sp.test.
mysql-test/r/sp.result:
  Update result file.
2007-10-10 14:42:29 +04:00
unknown
62f72d3610 Bug#28893 --relay-log variable is not exposed with SHOW VARIABLES
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES


mysql-test/r/rpl_flush_log_loop.result:
  test result
mysql-test/t/rpl_flush_log_loop.test:
  test case
sql/set_var.cc:
  added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
  to make them visible within SHOW VARIABLES
2007-10-10 12:21:11 +05:00
unknown
15453e3a6a Bug#25359 Test 'view' is dependent on current year to be 2006
removed now() call to make the test to be year independent


mysql-test/r/view.result:
  result fix
mysql-test/t/view.test:
  removed now() call to make the test to be year independent
2007-10-10 12:16:13 +05: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
unknown
ad104d5bfd Bug#28318 CREATE FUNCTION (UDF) requires a schema
Bug#29816 Syntactically wrong query fails with misleading error message

The core problem is that an SQL-invoked function name can be a <schema
qualified routine name> that contains no <schema name>, but the mysql
parser insists that all stored procedures (function, procedures and
triggers) must have a <schema name>, which is not true for functions.
This problem is especially visible when trying to create a function
or when a query contains a syntax error after a function call (in the
same query), both will fail with a "No database selected" message if
the session is not attached to a particular schema, but the first
one should succeed and the second fail with a "syntax error" message.

Part of the fix is to revamp the sp name handling so that a schema
name may be omitted for functions -- this means that the internal
function name representation may not have a dot, which represents
that the function doesn't have a schema name. The other part is
to place schema checks after the type (function, trigger or procedure)
of the routine is known.


mysql-test/r/sp-error.result:
  Add test case result for Bug#29816
mysql-test/r/udf.result:
  Add test case result for Bug#28318
mysql-test/t/sp-error.test:
  Add test case for Bug#29816
mysql-test/t/udf.test:
  Add test case for Bug#28318
sql/sp.cc:
  Copy the (last) nul byte of the stored routine key and move name parsing
  code to the sp_name class constructor.
sql/sp_head.cc:
  Revamp routine name parsing for when no schema is specified and
  omit dot from the qualified name if the routine is not associated
  with a scheme name.
sql/sp_head.h:
  Name parsing got bigger, uninline by moving to a single unit -- the sp_head.cc
  file.
sql/sql_yacc.yy:
  Only copy the schema name if one is actually set and check for schema
  name presence only where it's necessary.
2007-10-09 20:46:33 -03:00
unknown
5a6b519a2f metadata test of bug # 31249: problem with convert(..., datetime) removed
as PS protocol gives slightly different metadata.
2007-10-09 22:40:22 +05:00
unknown
69ecde861a Merge bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160


sql/item_timefunc.h:
  Auto merged
2007-10-09 15:25:27 +02:00
unknown
addc2f4720 Merge martin@mhansson.mysql.internal:/home/martin/mysql/src/bug31160/my50-bug31160
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160
2007-10-09 15:23:16 +02:00
unknown
d28ce15779 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31249/b31249.5.0


mysql-test/r/type_datetime.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
2007-10-09 18:14:13 +05:00
unknown
ae4141ed75 Bug#31160: MAKETIME() crashes server when returning NULL in ORDER BY using filesort
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().


mysql-test/r/func_sapdb.result:
  Bug#31160: Changed test result.
mysql-test/r/func_time.result:
  Bug#31160: Test result.
mysql-test/t/func_time.test:
  Bug#31160: Test case.
sql/item_timefunc.h:
  Bug#31160: The fix: Initializing maybe_null to true
2007-10-09 14:58:09 +02:00
unknown
659c47785d Merge stella.local:/home2/mydev/mysql-5.0-bug15522-old
into  stella.local:/home2/mydev/mysql-5.0-bug15522
2007-10-09 13:38:46 +02:00
unknown
0c0042a5de Bug#15522 - create ... select and with merge tables
Added test case.
The fix for Bug#20662 does also fix this one.


mysql-test/r/merge.result:
  Bug#15522 - create ... select and with merge tables
  Added test result.
mysql-test/t/merge.test:
  Bug#15522 - create ... select and with merge tables
  Added test case.
2007-10-09 13:10:51 +02:00
unknown
f2d6508fb7 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug30832-again-push/my50-bug30832-again
2007-10-09 12:04:50 +02:00
unknown
1a5f13a12c Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel

Problem: creating a temporary table we allocate the group buffer if needed
followed by table bitmaps (see create_tmp_table()). Reserving less memory for 
the group buffer than actually needed (used) for values retrieval may lead 
to overlapping with followed bitmaps in the memory pool that in turn leads 
to unpredictable consequences.

As we use Item->max_length sometimes to calculate group buffer size,
it must be set to proper value. In this particular case 
Item_datetime_typecast::max_length is too small.

Another problem is that we use max_length to calculate the group buffer
key length for items represented as DATE/TIME fields which is superfluous.

Fix: set Item_datetime_typecast::max_length properly,
accurately calculate the group buffer key length for items 
represented as DATE/TIME fields in the buffer.


mysql-test/r/type_datetime.result:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - test result.
mysql-test/t/type_datetime.test:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - test case.
sql/item_timefunc.h:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - set Item_datetime_typecast::max_length properly.
sql/sql_select.cc:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - the group buffer key length for items represented as 
  DATE/TIME fields in the buffer should be calculated using
  the maximum pack length of such fields (== 8), using 
  max_length here is redundant.
2007-10-09 14:37:21 +05:00
unknown
a462f34a94 Bug#30832:Assertion + crash with select name_const('test',now());
Completion of previous patch. Negative number were denied
as the second argument to NAME_CONST.


mysql-test/r/func_misc.result:
  Bug#30832 completion: test result
mysql-test/t/func_misc.test:
  Bug#30832 completion: test case
  added negative numbers
sql/item_func.h:
  Bug#30832 completion
  The function that represents unary minus is considered a constant if the argument is.
2007-10-09 11:36:05 +02:00
unknown
6736d404a0 Bug #31156: mysqld: item_sum.cc:918: virtual bool
Item_sum_distinct::setup(THD*): Assertion

There was an assertion to detect a bug in ROLLUP
implementation. However the assertion is not true
when used in a subquery context with non-cacheable
statements.
Fixed by turning the assertion to accepted case
(just like it's done for the other aggregate functions). 


mysql-test/r/func_group.result:
  Bug #31156: test case
mysql-test/t/func_group.test:
  Bug #31156: test case
sql/item_sum.cc:
  Bug #31156: make it OK to call setup() several times:
   done for (e.g.) scalar subquery
2007-10-08 12:57:43 +03:00
unknown
60761a7cc6 Fixed bug #31019: the MOD() function and the % operator crash the server
when a divisor is less than 1 and its fractional part is very long.
For example:
1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789;

Stack buffer overflow has been fixed in the do_div_mod function.


strings/decimal.c:
  Fixed bug #31019.
  Stack buffer overflow has been fixed in the do_div_mod function:
  a value of the upper bound of the buffer was increased where
  a decrement is required.
mysql-test/t/type_decimal.test:
  Added test case for bug #31019.
mysql-test/r/type_decimal.result:
  Added test case for bug #31019.
2007-10-08 03:48:59 +05:00
unknown
7ac3645abd Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2007-10-08 02:05:55 +04:00
unknown
c6e79e1143 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/31253/50-31253
2007-10-06 03:02:31 +02:00
unknown
66fd9a3473 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/19828/50-19828


mysql-test/r/grant.result:
  Auto merged
2007-10-06 00:14:22 +02:00
unknown
79b4d29fb3 Merge msvensson2.mysql.internal:mysql/mysql-5.0-maint
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
2007-10-05 19:32:14 +02:00
unknown
b5b89b8d03 Update test case to allow the .reject file to be in either var/log or r/ 2007-10-05 19:28:09 +02:00
unknown
d9be8ed9eb Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/30286/my50-30286
2007-10-05 18:53:44 +05:00
unknown
a2d88511f0 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my50-bug30942
2007-10-05 13:42:19 +02:00
unknown
01b3b7785b Fix for bug #30885: MEMORY returns incorrect data if BTREE index is used for NULL lookup
Problem: creating an rb-tree key we store length (2 bytes) before the actual data for 
varchar key parts. The fact was missed for NULL key parts, when we set NULL byte and 
skip the rest.

Fix: take into account the length of the varchar key parts for NULLs.


heap/hp_hash.c:
  Fix for bug #30885: MEMORY returns incorrect data if BTREE index is used for NULL lookup
    - skip varchar key parts length (2 byte) for null key parts.
mysql-test/r/heap_btree.result:
  Fix for bug #30885: MEMORY returns incorrect data if BTREE index is used for NULL lookup
    -test result.
mysql-test/t/heap_btree.test:
  Fix for bug #30885: MEMORY returns incorrect data if BTREE index is used for NULL lookup
    - test case.
2007-10-05 16:33:15 +05:00