Commit graph

11677 commits

Author SHA1 Message Date
unknown
6c4500517d Bug #33237 NDB_MGM 'eat' 99% cpu utilization 2007-12-14 13:43:48 +01:00
unknown
0c4b3f5784 Bug#32798: DISTINCT in GROUP_CONCAT clause fails when ordering by a column
with null values

For queries containing GROUP_CONCAT(DISTINCT fields ORDER BY fields), there 
was a limitation that the DISTINCT fields had to be the same as ORDER BY 
fields, owing to the fact that one single sorted tree was used for keeping 
track of tuples, ordering and uniqueness. Fixed by introducing a second 
structure to handle uniqueness so that the original structure has only to 
order the result.


mysql-test/r/func_gconcat.result:
  Bug#32798:
  - Wrong test result turned correct after fix.
  - Correct test result
mysql-test/t/func_gconcat.test:
  Bug#32798: Test case
sql/item_sum.cc:
  Bug#32798: Implementation of fix. Dead code removal.
  
  - removed comment describing this bug
  - replaced body of function group_concat_key_cmp_with_distinct
  - removed function group_concat_key_cmp_with_distinct_and_order
  - Added a Unique object to maintain uniqueness of values.
sql/item_sum.h:
  Bug#32798: Declarations and comments.
2007-12-14 12:24:20 +01:00
unknown
e8406d14b4 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge


sql/mysqld.cc:
  Auto merged
2007-12-14 06:53:55 +01:00
unknown
fa3c005eec Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-12-13 14:25:16 +01:00
unknown
f1d9805422 after merge fix 2007-12-13 15:47:23 +04:00
unknown
33f82b1789 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/func_misc.result:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/t/func_misc.test:
  manual merge
mysql-test/t/innodb_mysql.test:
  manual merge
sql/sql_insert.cc:
  manual merge
2007-12-13 14:52:49 +04:00
unknown
196f0c751f Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug32198
2007-12-13 13:39:37 +03:00
unknown
c6675cd187 BUG#32198: Comparison of DATE with DATETIME still not using indexes correctly
- Make conditions like "date_col $CMP$ 'datetime-const'" range-sargable


mysql-test/r/range.result:
  BUG#32198: Comparison of DATE with DATETIME still not using indexes correctly
  - Testcase
mysql-test/t/range.test:
  BUG#32198: Comparison of DATE with DATETIME still not using indexes correctly
  - Testcase
sql/field.cc:
  BUG#32198: Comparison of DATE with DATETIME still not using indexes correctly
  - Added comments
2007-12-13 13:38:22 +03:00
unknown
618cb7a818 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt


include/mysql_com.h:
  Auto merged
myisam/mi_check.c:
  Auto merged
2007-12-13 14:38:01 +04:00
unknown
93e3057ba5 Bug #32858: Erro: "Incorrect usage of UNION and INTO" does not take
subselects into account

It is forbidden to use the SELECT INTO construction inside UNION statements
unless on the last SELECT of the union. The parser records whether it 
has seen INTO or not when parsing a UNION statement. But if the INTO was
legally used in an outer query, an error is thrown if UNION is seen in a
subquery. Fixed in 5.0 by remembering the nesting level of INTO tokens and 
mitigate the error unless it collides with the UNION.


mysql-test/r/union.result:
  Bug#32858: Test result
mysql-test/t/union.test:
  Bug#32858: Test case
sql/sql_class.cc:
  Bug#32858: Initializing new member
sql/sql_class.h:
  Bug#32858: Added property nest_level to select_result class.
sql/sql_yacc.yy:
  Bug#32858: The fix.
2007-12-13 11:19:05 +01:00
unknown
40e0143f18 Merge station.:/mnt/raid/alik/MySQL/devel/5.0
into  station.:/mnt/raid/alik/MySQL/devel/5.0-rt
2007-12-13 12:01:04 +03:00
unknown
0ced2a4d19 Dummy push to help pushbuild running again.
Fixed case of comment.


mysql-test/t/merge.test:
  Fixed case of comment.
2007-12-12 19:49:08 +01:00
unknown
1c0207d17f Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-12-12 06:00:10 +03:00
unknown
94f75ffcce Bug#32848: Data type conversion bug in union subselects in MySQL 5.0.38
There were two problems when inferring the correct field types resulting from
UNION queries.
- If the type is NULL for all corresponding fields in the UNION, the resulting 
  type would be NULL, while the type is BINARY(0) if there is just a single 
  SELECT NULL.
- If one SELECT in the UNION uses a subselect, a temporary table is created
  to represent the subselect, and the result type defaults to a STRING type,
  hiding the fact that the type was unknown(just a NULL value).
Fixed by remembering whenever a field was created from a NULL value and pass
type NULL to the type coercion if that is the case, and creating a string field
as result of UNION only if the type would otherwise be NULL.


mysql-test/r/union.result:
  Bug#32848: Test result
mysql-test/t/union.test:
  Bug#32848: Test case
sql/field.cc:
  Bug#32848: Initialization of new field
sql/field.h:
  Bug#32848: New member to record when a field was created from a NULL value.
sql/item.cc:
  Bug#32848: 
  A field created from a NULL value will submit NULL as type to the 
  type coercion procedure.
  If Item_type_holder has not inferred the correct type after processing all
  SELECTs in a UNION, a string field is created.
sql/sql_select.cc:
  Bug#32848: Recording when a field is created from a NULL value.
2007-12-11 20:15:03 +01:00
unknown
cd34354e6c Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/func_misc.result:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
2007-12-11 17:09:43 +01:00
unknown
08b256f9df Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE
HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
This happened because DATE-cast object did not overload get_time() method
in superclass Item. The default method was inappropriate here and
misinterpreted the data.

Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
on NULL input, 0 otherwise. This coincides with the way DATE-columns
behave.

Also fixes similar bug in Date-Field now.


mysql-test/r/cast.result:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
  Show that this coincides with how DATE-columns behave.
mysql-test/r/type_date.result:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-fields.
mysql-test/t/cast.test:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
  Show that this coincides with how DATE-columns behave.
mysql-test/t/type_date.test:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-fields.
sql/field.cc:
  Add get_time() method to DATE-field object to overload
  the method in Field superclass that would return spurious
  results. Return zero-result.
sql/field.h:
  Add get_time() declaration to date-field class
sql/item_timefunc.cc:
  Add get_time() method to DATE-cast object to overload
  the method in Item superclass that would return spurious
  results. Return zero-result; flag NULL if input was NULL.
sql/item_timefunc.h:
  Add get_time() declaration to DATE-cast object.
2007-12-11 10:12:05 +01:00
unknown
dcc2e66391 Test fails because of non deterministric function: show grants for current_user()
mysql-test/r/read_only.result:
  Removing non deterministic test results from test.
mysql-test/t/read_only.test:
  Removing non deterministic test results from test.
2007-12-10 16:16:21 +01:00
unknown
cf44fb4c96 Merge adventure.(none):/home/thek/Development/cpp/bug27440/my50-bug27440
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime


sql/sql_parse.cc:
  Auto merged
2007-12-10 12:19:48 +01:00
unknown
069ca6d0f7 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
2007-12-10 10:41:34 +01:00
unknown
4c6e70ccf9 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-10 10:31:51 +01:00
unknown
b8ecfef89c Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-12-10 10:20:52 +01:00
unknown
d689cf23be Bug#32770: LAST_DAY() returns a DATE, but somehow internally keeps track of the TIME.
LAST_DAY() says it returns a DATE, not a DATETIME, but didn't zero the time fields.
Adapted from a patch kindly supplied by Claudio Cherubino.


mysql-test/r/func_time.result:
  show that LAST_DAY() returns only a DATE, not a DATETIME
mysql-test/t/func_time.test:
  show that LAST_DAY() returns only a DATE, not a DATETIME
sql/item_timefunc.cc:
  zero time-fields as we return only a DATE
2007-12-10 09:17:18 +01:00
unknown
331b3b6b8b Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug27545
2007-12-08 16:22:45 -08:00
unknown
b3f11ed481 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug32815
2007-12-08 14:47:56 -08:00
unknown
b3d8ff4ebd Fix for BUG#32694 "NOT NULL table field in a subquery produces invalid results"
The problem was that when convert_constant_item is called for subqueries,
this happens when we already started executing the top-level query, and
the field argument of convert_constant_item pointed to a valid table row.
In turn convert_constant_item used the field buffer to compute the value
of its item argument. This copied the item's value into the field,
and made equalities with outer references always true.
  
The fix saves/restores the original field's value when it belongs to an
outer table.


mysql-test/r/type_datetime.result:
  Test for BUG#32694.
mysql-test/t/type_datetime.test:
  Test for BUG#32694.
sql/item_cmpfunc.cc:
  - Changed convert_constant_item() so that it doesn't destroy the contents
    of its field argument when the field originates from table in an outer
    query.
2007-12-08 23:05:00 +02:00
unknown
b1b2e0d053 Fixed bug #27545.
Both arguments of the function NAME_CONST must be constant expressions.
This constraint is checked in the Item_name_const::fix_fields method. 
Yet if the argument of the function was not a constant expression no
error message was reported. As a result the client hanged waiting for a
response.
Now the function Item_name_const::fix_fields reports an error message
when any of the additional context conditions imposed on the function
NAME_CONST is not satisfied. 


mysql-test/r/func_misc.result:
  Added a test case for bug #26545.
mysql-test/t/func_misc.test:
  Added a test case for bug #26545.
2007-12-07 23:36:58 -08:00
unknown
d776054e00 Fixed bug #32815.
The index (key_part_1, key_part-2) was erroneously considered as compatible
with the required ordering in the function test_test_if_order_by_key when 
a query with an ORDER BY clause contained a condition of the form
  key_part_1=const OR key_part_1 IS NULL 
and the order list contained only key_part_2. This happened because the value
of the const_key_parts field in the KEYUSE structure was not formed correctly
for the keys that could be used for ref_or_null access. 
This was fixed in the code of the update_ref_and_keys function.
The problem could not manifest itself for MyISAM databases because the
implementation of the keys_to_use_for_scanning() handler function always
returns an empty bitmap for the MyISAM engine.


mysql-test/r/innodb_mysql.result:
  Added a test case for bug #32815.
mysql-test/t/innodb_mysql.test:
  Added a test case for bug #32815.
sql/sql_select.cc:
  Fixed bug #32815.
  The index (key_part_1, key_part-2) was erroneously considered as compatible
  with the required ordering in the function test_test_if_order_by_key when 
  a query with an ORDER BY clause contained a condition of the form
    key_part_1=const OR key_part_1 IS NULL 
  and the order list contained only key_part_2. This happened because the value
  of the const_key_parts field in the KEYUSE structure was not formed correctly
  for the keys that could be used for ref_or_null access. 
  This was fixed in the code of the update_ref_and_keys function.
2007-12-07 17:14:59 -08:00
unknown
5826a5c490 Bug #27440 read_only allows create and drop database
When read_only option was enabled, a user without SUPER privilege could
perform CREATE DATABASE and DROP DATABASE operations.

This patch adds a check to make sure this isn't possible. It also attempts to 
simplify the logic used to determine if relevant tables are updated,
making it more human readable.


mysql-test/r/read_only.result:
  Updated result file
mysql-test/t/read_only.test:
  A test case is added which shows that it is not possible to drop or create a
  database in read-only mode despite having the GRANT permissions to do so,
  SUPER user excepted.
sql/sql_parse.cc:
  - Simplified complex predicate by grouping it in a read friendly way.
  - Added predicate to fail on database updates while running in read-only
    mode.
2007-12-07 15:39:41 +01:00
unknown
a4df22109c Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


sql/sql_table.cc:
  Auto merged
2007-12-07 03:51:23 -07:00
unknown
7d3a61e1f0 Make tests more robust (clean up better after grant.test)
mysql-test/r/grant.result:
  Update test results to .test changes
mysql-test/t/grant.test:
  Drop users when done with them, to avoid skewing results of later tests.
  
  For example, running some test which examines the cardinality of the
  mysql.user table would fail if run right after this test, due to the
  extra users.
2007-12-07 03:39:37 -07:00
unknown
bfe58b71f2 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31177/50-31177


mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-06 08:46:01 +01:00
unknown
55a420e134 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


client/mysqldump.c:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
myisam/ft_boolean_search.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Manual merge
mysql-test/r/func_misc.result:
  Manual merge
mysql-test/t/binlog_killed.test:
  Manual merge
mysql-test/t/ctype_ucs.test:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
sql/item_strfunc.h:
  Manual merge
strings/ctype-simple.c:
  Manual merge
2007-12-04 20:58:21 -07:00
unknown
9f26f5c04a Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/41


sql/set_var.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Manual merge
mysql-test/t/ctype_ucs.test:
  Manual merge
2007-12-04 19:16:22 -07:00
unknown
0f9d3835f8 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/my50-bug30234


sql/sql_yacc.yy:
  Auto merged
mysql-test/r/delete.result:
  SCCS merged
mysql-test/t/delete.test:
  SCCS merged
2007-12-04 11:32:11 +01:00
unknown
b4a146a6eb Bug#30234: Unexpected behavior using DELETE with AS and USING
Anti-patch. This patch undoes the previously pushed patch. It is 
null-merged in versions 5.1 and above since there the original 
patch is still desired.


mysql-test/r/delete.result:
  Bug#30234: Anti-patch
mysql-test/t/delete.test:
  Bug#30234: Anti-patch
sql/sql_yacc.yy:
  Bug#30234: Anti-patch
2007-12-03 10:08:58 +01:00
unknown
53f7db282d Bug#31177: Server variables can't be set to their current values
additional fixes for 64-bit


mysql-test/t/variables.test:
  replace 32-bit and 64-bit values
mysys/my_getopt.c:
  'mod' no longer used.
  on 64-bit, limit to (signed) (LONG)LONG_MAX to prevent badness
  in classes using longlong.
2007-12-03 10:01:56 +01:00
unknown
df35f2c353 Bug#30998 Drop View breaks replication if view does not exist
When executing drop view statement on the master, the statement is written
into bin-log without checking for possible errors, so the statement would 
always be bin-logged with error code cleared even if some error might occur, 
for example, some of the views being dropped does not exist. This would cause 
failure on the slave.

Writing bin-log after check for errors, if at least one view has been dropped
the query is bin-logged possible with an error.


sql/sql_view.cc:
  Writing bin-log after check for errors, if at least one view has been dropped
  the query is bin-logged possible with an error.
mysql-test/r/rpl_drop_view.result:
  Add test result for bug#30998
mysql-test/t/rpl_drop_view.test:
  Add test for bug#30998
2007-12-03 13:11:40 +08:00
unknown
416e1d9d95 Merge polly.(none):/home/kaa/src/maint/bug26788/my50-bug26788
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


mysql-test/t/insert.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
2007-12-02 14:11:36 +03:00
unknown
5fd87abaa8 Windows-specific fixes in floating point tests.
mysql-test/t/insert.test:
  Windows implements a different rounding rules in printf("%g"), thus we still need to do replace_result
mysql-test/t/variables.test:
  We need to do replace_result because variables are printed by another procedure.
sql/field.cc:
  Fixed the code to limit the precision to DBL_DIG.
2007-12-02 13:49:12 +03:00
unknown
6a72267d05 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31177/50-31177


client/mysql.cc:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_bit.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-02 01:48:43 +01:00
unknown
187cfae6e2 Merge polly.(none):/home/kaa/src/maint/bug26788/my50-bug26788
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


mysql-test/r/insert.result:
  Auto merged
mysql-test/t/insert.test:
  Auto merged
sql/field.cc:
  Auto merged
2007-12-01 15:37:25 +03:00
unknown
1f22720c3f Fixed the floating point number tests on Windows.
mysql-test/r/insert.result:
  Fixed the test cases.
mysql-test/t/cast.test:
  We need to do replace_result because warnings are printed by another procedure.
mysql-test/t/insert.test:
  Windows implements a different rounding rules in printf("%g"), thus we still need to do replace_result.
sql/field.cc:
  Limit the precision to avoid garbage past the significant digits.
2007-12-01 15:25:24 +03:00
unknown
0baec33ff3 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mrg/my50-mrg


tests/mysql_client_test.c:
  Auto merged
2007-12-01 13:12:31 +04:00
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
75e6a71b4d Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/32180/50-32180
2007-12-01 01:59:48 +01:00
unknown
104bba773b Merge mysql.com:/home/hf/work/32374/my50-32374
into  mysql.com:/home/hf/work/mrg/my50-mrg
2007-11-30 22:26:48 +04:00
unknown
d09dfdab06 Merge four.local.lan:/work/merge/mysql-4.1-dev
into  four.local.lan:/work/trees/mysql-4.1-build-src-clean
2007-11-30 19:12:09 +01:00
unknown
56b009412d Fix for
Bug#31030 rpl000015.test fails if $MYSQL_TCP_PORT != 3306
Note:
  This bug does not occur in MySQL 5.0 and up, because
  ChangeSet 1.2328.2.1 2006/11/27 for MySQL 5.0 prevents this.
  The 5.0 fix uses the environment variable DEFAULT_MASTER_PORT
  which is set by mysql-test-run.pl.
  mysql-test-run.pl in 4.1 does not set this variable.
  There are two alternatives:
  1) Backport the 5.0 fix for this test including modifications
     to mysql-test-run.pl and mysql-test-run-shell.
     This is a not acceptable impact on an old MySQL version.
  2) Fix the problem different than in 5.0 like in the current
     ChangeSet + do not apply these changes when upmerging to 5.0


mysql-test/r/rpl000015.result:
  Updated result
mysql-test/t/disabled.def:
  Enable rpl000015
mysql-test/t/rpl000015.test:
  Unify the MASTER_PORT number
2007-11-30 18:06:28 +01:00
unknown
cef31e05e5 Bug #32374 crash with filesort when selecting from federated table and view.
filesort() uses file->estimate_rows_upper_bound() call to allocate
internal buffers. If this function returns a value smaller than
a number of row that will be returned later in find_all_keys(),
that can cause server crash.
Fixed by implementing ha_federated::estimate_rows_upper_bound() to
return maximum possible number of rows.
Present estimation for FEDERATED always returns 0 if the linked to the VIEW.


mysql-test/r/federated.result:
  Bug #32374 crash with filesort when selecting from federated table and view.
  
  test result
mysql-test/t/federated.test:
  Bug #32374 crash with filesort when selecting from federated table and view.
  
  test case
sql/ha_federated.cc:
  Bug #32374 crash with filesort when selecting from federated table and view.
  
  ha_federated::estimate_rows_upper_bound() implemented
sql/ha_federated.h:
  Bug #32374 crash with filesort when selecting from federated table and view.
  
  ha_federated::estimate_rows_upper_bound() interface
2007-11-30 17:08:00 +04:00
unknown
89a208850a Bug#31177: Server variables can't be set to their current values
Default values of variables were not subject to upper/lower bounds
and step, while setting variables was. Bounds and step are also
applied to defaults now; defaults are corrected quietly, values
given by the user are corrected, and a correction-warning is thrown
as needed. Lastly, very large values could wrap around, starting
from 0 again. They are bounded at the maximum value for the
respective data-type now if no lower maximum is specified in the
variable's definition.


client/mysql.cc:
  correct maxima in options array
client/mysqltest.c:
  adjust minimum for "sleep" option so default value is no longer
  out of bounds.
include/m_string.h:
  ullstr() - the unsigned brother of llstr()
include/my_getopt.h:
  Flag if we bounded the value (that is, correct anything aside from
  making value a multiple of block-size)
mysql-test/r/delayed.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/index_merge.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb_mysql.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/key_cache.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/packet.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/ps.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/subselect.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit_innodb.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/variables.result:
  correct results: bounds and step apply to variables' default values, too
mysql-test/t/variables.test:
  correct results: bounds and step apply to variables' default values, too
mysys/my_getopt.c:
  - apply bounds/step to default values of variables (based on work by serg)
  - print complaints about incorrect values for variables (truncation etc.,
    by requestion of consulting)
  - if no lower maximum is specified in variable definition, bound unsigned
    values at their maximum to prevent wrap-around
  - some calls to error_reporter had a \n, some didn't. remove \n from calls,
    let reporter-function handle it, so the default reporter behaves like that
    in mysqld
sql/mysql_priv.h:
  correct RANGE_ALLOC_BLOCK_SIZE (cleared with monty)
sql/mysqld.cc:
  correct maxima to correct data-type.
  correct minima where higher than default.
  correct range-alloc-block-size.
  correct inno variables so GET_* corresponds to actual variable's type.
sql/set_var.cc:
  When the new value for a variable is out of bounds, we'll send the
  client a warning (but not if the value was simply not a multiple of
  'blocksize').  sys_var_thd_ulong had this, sys_var_long_ptr_global
  didn't; broken out and streamlined to avoid duplication of code.
strings/llstr.c:
  ullstr() - the unsigned brother of llstr()
2007-11-30 06:32:04 +01:00
unknown
36486ee86c Merge mysql.com:/home/ram/work/mysql-5.0-engines
into  mysql.com:/home/ram/work/b32726/b32726.5.0


mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
2007-11-29 15:12:09 +04:00
unknown
060ccef012 Merge mysql.com:/home/ram/work/mysql-5.0-engines
into  mysql.com:/home/ram/work/b32559/b32559.5.0
2007-11-29 14:01:07 +04:00
unknown
b8a60e6ba3 Merge mysql.com:/home/ram/work/mysql-5.0-engines
into  mysql.com:/home/ram/work/b32676/b32676.5.0


mysql-test/r/delayed.result:
  Auto merged
mysql-test/t/delayed.test:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2007-11-29 08:24:52 +04:00
unknown
21fd6c0f1d 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


sql/sql_yacc.yy:
  Auto merged
sql-common/client.c:
  Auto merged
2007-11-28 07:23:51 -07:00
unknown
aea86c6611 Merge mysql.com:/Users/davi/mysql/bugs/31479-5.0
into  mysql.com:/Users/davi/mysql/mysql-5.0-runtime
2007-11-28 10:49:30 -02:00
unknown
4b00263596 Bug#31479 Bad lock interaction if CREATE TABLE LIKE is killed
Kill of a CREATE TABLE source_table LIKE statement waiting for a
name-lock on the source table causes a bad lock interaction.

The mysql_create_like_table() has a bug that if the connection is
killed while waiting for the name-lock on the source table, it will
jump to the wrong error path and try to unlock the source table and
LOCK_open, but both weren't locked.

The solution is to simple return when the name lock request is killed,
it's safe to do so because no lock was acquired and no cleanup is needed.

Original bug report also contains description of other problems
related to this scenario but they either already fixed in 5.1 or
will be addressed separately (see bug report for details).


mysql-test/r/lock_multi.result:
  Add test case result for Bug#31479
mysql-test/t/lock_multi.test:
  Add test case for Bug#31479
sql/sql_table.cc:
  Rerturn TRUE when the lock gets killed.
2007-11-28 10:18:01 -02:00
unknown
7991e6a61d Bug#29149 Test "kill" fails on Windows
Disabled test case.
2007-11-28 09:48:06 +01:00
unknown
3f42e6ff9b Fix for bug #32726: crash with cast in order by clause and cp932 charset
- fix for #31070 (missed during merging) applied for cp932 charset.
  - tests/results adjusted.


mysql-test/include/ctype_common.inc:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
mysql-test/r/ctype_big5.result:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
mysql-test/r/ctype_cp932.result:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
mysql-test/r/ctype_euckr.result:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
mysql-test/r/ctype_gb2312.result:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
mysql-test/r/ctype_gbk.result:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
mysql-test/r/ctype_uca.result:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
mysql-test/t/ctype_cp932.test:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - tests/results adjusted.
strings/ctype-cp932.c:
  Fix for bug #32726: crash with cast in order by clause and cp932 charset
    - fix for #31070 (missed during merging) applied for cp932.
2007-11-28 10:55:13 +04:00
unknown
8a7f5a1d7b Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-27 18:42:59 +01:00
unknown
1a73853c04 after-merge fixup: archive test/result adjusted. 2007-11-27 21:30:00 +04:00
unknown
76468de853 Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-27 17:34:03 +01:00
unknown
ae5ff26d85 Bug#8693 Test 'rpl_log_pos' fails sometimes
Disabled the test case.
2007-11-27 17:28:55 +01:00
unknown
061ac49799 Merge mysql.com:/home/ram/work/mysql-5.0-engines
into  mysql.com:/home/ram/work/b30495/b30495.5.0
2007-11-27 20:03:09 +04:00
unknown
77ab800e77 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


sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2007-11-27 08:56:43 -07:00
unknown
6288fde222 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


sql/item_cmpfunc.cc:
  Auto merged
2007-11-27 16:24:44 +01:00
unknown
d0bfc6c131 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30355-5.0-opt
2007-11-27 17:21:36 +02:00
unknown
63b6516953 Bug #30355: Incorrect ordering of UDF results
There's currently no way of knowing the determinicity of an UDF.
And the optimizer and the sequence() UDFs were making wrong
assumptions about what the is_const member means.
Plus there was no implementation of update_system_tables()
causing the optimizer to overwrite the information returned by
the <udf>_init function.

Fixed by equating the assumptions about the semantics of 
is_const and providing a implementation of update_used_tables().
Added a TODO item for the UDF API change needed to make a better 
implementation.


include/mysql_com.h:
  Bug #30355: comment added
mysql-test/r/udf.result:
  Bug #30355: test case
mysql-test/t/udf.test:
  Bug #30355: test case
sql/item_func.cc:
  Bug #30355: keep const_item_cache and used_tables_cache in sync
sql/item_func.h:
  Bug #30355: 
   - a better implementation of update_used_tables()
   - keep const_item_cache and used_tables_cache in sync
sql/udf_example.c:
  Bug #30355: Wrong value for const_item fixed.
2007-11-27 17:16:52 +02:00
unknown
51e24c026d Merge mysql.com:/home/ram/work/mysql-5.0-engines
into  mysql.com:/home/ram/work/b30495/b30495.5.0
2007-11-27 15:15:28 +04:00
unknown
ba974f8371 Fix for bug #32559: connection hangs on query with name_const
Problem: passing a non-constant name to the NAME_CONST function results in a crash.

Fix: check the NAME_CONST name argument; return fake item type if we got
non-constant argument(s).


mysql-test/r/func_misc.result:
  Fix for bug #32559: connection hangs on query with name_const
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug #32559: connection hangs on query with name_const
    - test case.
sql/item.cc:
  Fix for bug #32559: connection hangs on query with name_const
    - Item_name_const::type() now returns NULL_ITEM if non-constant arguments 
      were used to create the item to avoid wrong type casting.
sql/item.h:
  Fix for bug #32559: connection hangs on query with name_const
    - NAME_CONST name argument checked for invariability.
2007-11-27 09:36:43 +04:00
unknown
6cbb7d2f76 Bug#20830 - INSERT DELAYED does not honour SET INSERT_ID
Bug#20627 - INSERT DELAYED does not honour auto_increment_* variables
Fixed wrong variable assignment.
2007-11-26 19:16:23 +01:00
unknown
29cdc47ecd Merge polly.(none):/home/kaa/src/opt/bug28837/my50-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/ha_myisam.cc:
  Auto merged
mysql-test/r/merge.result:
  Manual merge.
mysql-test/r/myisam.result:
  Manual merge.
mysql-test/t/merge.test:
  Manual merge.
mysql-test/t/myisam.test:
  Manual merge.
2007-11-26 19:35:08 +03:00
unknown
67bf39f241 Fix for bug #28837: MyISAM storage engine error (134) doing delete with
self-join

When doing DELETE with self-join on a MyISAM or MERGE table, it could
happen that a record being retrieved in join_read_next_same() has
already been deleted by previous iterations. That caused the engine's
index_next_same() method to fail with HA_ERR_RECORD_DELETED error and
the whole DELETE query to be aborted with an error.

Fixed by suppressing the HA_ERR_RECORD_DELETED error in
hy_myisam::index_next_same() and ha_myisammrg::index_next_same(). Since
HA_ERR_RECORD_DELETED can only be returned by MyISAM, there is no point
in filtering this error in the SQL layer.


mysql-test/r/merge.result:
  Added a test case for bug #28837.
mysql-test/r/myisam.result:
  Added a test case for bug #28837.
mysql-test/t/merge.test:
  Added a test case for bug #28837.
mysql-test/t/myisam.test:
  Added a test case for bug #28837.
sql/ha_myisam.cc:
  Skip HA_ERR_RECORD_DELETED silently when calling mi_rnext_same().
sql/ha_myisammrg.cc:
  Skip HA_ERR_RECORD_DELETED silently when calling mi_rnext_same().
2007-11-26 18:58:54 +03:00
unknown
c81eb57b92 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32036-5.0-opt
2007-11-26 15:57:47 +02:00
unknown
af34d3577e Bug#32357 - ndb_backup_print test fails sometimes in pushbuild
Disabled test case
2007-11-26 14:49:41 +01:00
unknown
cf84ca46ba Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32036-5.0-opt


mysql-test/r/subselect.result:
  merge of fix for bug 32036 to 5.0-opt
mysql-test/t/subselect.test:
  merge of fix for bug 32036 to 5.0-opt
2007-11-26 14:02:02 +02:00
unknown
f3f9855d13 Bug #32036: EXISTS within a WHERE clause with a UNION
crashes MySQL 5.122
There was a difference in how UNIONs are handled
on top level and when in sub-query.
Because the rules for sub-queries were syntactically
allowing cases that are not currently supported by
the server we had crashes (this bug) or wrong results
(bug 32051).
Fixed by making the syntax rules for UNIONs match the 
ones at top level.

These rules however do not support nesting UNIONs, e.g.
(SELECT a FROM t1 UNION ALL SELECT b FROM t2) 
 UNION
(SELECT c FROM t3 UNION ALL SELECT d FROM t4)
Supports for statements with nested UNIONs will be
added in a future version.


mysql-test/r/subselect.result:
  Bug #32036: test case
mysql-test/t/subselect.test:
  Bug #32036: test case
sql/sql_yacc.yy:
  Bug #32036: Make the syntax rules for UNIONs in subqueries the same
  as for top level UNIONs.
2007-11-26 13:36:24 +02:00
unknown
8fd43262dc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32268-5.0-opt


sql/sql_select.cc:
  Auto merged
2007-11-26 13:35:38 +02:00
unknown
503755256d Fix for bug #32676: insert delayed crash with wrong column and function specified
Problem: using wrong local lock type value in the mysql_insert() results in a crash. 

Fix: use a proper value.


mysql-test/r/delayed.result:
  Fix for bug #32676: insert delayed crash with wrong column and function specified
    - test result.
mysql-test/t/delayed.test:
  Fix for bug #32676: insert delayed crash with wrong column and function specified
    - test case.
sql/sql_insert.cc:
  Fix for bug #32676: insert delayed crash with wrong column and function specified
    - the local lock_type var assigment displaced just after the line 
      where the table_list->lock_type is filnally defined in the mysql_insert() 
      to avoid using its old value.
2007-11-26 13:29:26 +04:00
unknown
f53f88680c Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-25 14:14:52 +01:00
unknown
c58de28410 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/30284/my50-30284


mysql-test/r/gis.result:
  merging
mysql-test/t/gis.test:
  merging
2007-11-24 15:02:29 +04:00
unknown
6facf554bd Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/30284/my41-30284


mysql-test/r/gis.result:
  merging
mysql-test/t/gis.test:
  merging
2007-11-24 14:59:48 +04:00
unknown
e4dc9a8e6e merging fix
mysql-test/r/gis.result:
  result fixed
mysql-test/t/gis.test:
  test fixed
2007-11-24 14:57:09 +04:00
unknown
d04f74b775 Merge mysql.com:/home/hf/work/30284/my41-30284
into  mysql.com:/home/hf/work/30284/my50-30284


myisam/mi_check.c:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
mysql-test/r/gis.result:
  SCCS merged
2007-11-24 14:47:32 +04:00
unknown
10c1aa796a Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32400-5.0-opt


tests/mysql_client_test.c:
  Auto merged
mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/subselect.test:
  SCCS merged
2007-11-23 15:30:16 +02:00
unknown
3f91e01f1d Merge mysql.com:/home/ram/work/mysql-5.0-engines
into  mysql.com:/home/ram/work/b32560/b32560.5.0
2007-11-23 17:24:54 +04:00
unknown
1f57bfb8d1 Fix for bug #32560: crash with interval function and count(*)
Problem: INTERVAL function implementation doesn't handle NULL range values.

Fix: skip NULL ranges looking for a proper one.


mysql-test/r/func_set.result:
  Fix for bug #32560: crash with interval function and count(*)
    - test result.
mysql-test/t/func_set.test:
  Fix for bug #32560: crash with interval function and count(*)
    - test case.
sql/item_cmpfunc.cc:
  Fix for bug #32560: crash with interval function and count(*)
    - skip NULL ranges calculating INTERVAL(...).
2007-11-23 16:30:06 +04:00
unknown
1be2f0fa2b Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-23 13:09:01 +01:00
unknown
7ae4cfaf37 Bug#32654: rpl_view.test fails randomly
Disabled test case
2007-11-23 13:03:38 +01:00
unknown
a5761be26a Bug#32653 - rpl_log.test fails randomly
Disabled test case
2007-11-23 12:54:05 +01:00
unknown
e5a17f5c30 Bug#32651 - grant_cache.test fails
Disabled test case
2007-11-23 12:06:55 +01:00
unknown
50f5ba451f Merge mysql.com:/home/ram/work/mysql-5.0-engines
into  mysql.com:/home/ram/work/b32558/b32558.5.0
2007-11-23 13:04:13 +04:00
unknown
a197c4e95d opt_range.cc:
Fix for the bug#31048 for 64bit platforms.
subselect.test, subselect.result:
  Corrected text case for the bug#31048.


mysql-test/t/subselect.test:
  Corrected text case for the bug#31048.
mysql-test/r/subselect.result:
  Corrected text case for the bug#31048.
sql/opt_range.cc:
  Fix for the bug#31048 for 64bit platforms.
2007-11-23 00:16:17 +03:00
unknown
4a4f68937f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/home/marty/MySQL/mysql-5.0-ndb
2007-11-22 14:49:40 +01:00
unknown
a8b4bc8165 Merge endora.local:/Users/davi/mysql/bugs/32528-5.0
into  endora.local:/Users/davi/mysql/mysql-5.0-runtime
2007-11-22 10:20:12 -02:00
unknown
719e64e4a5 Bug#32528 Global read lock with a low priority write lock causes a server crash
FLUSH TABLES WITH READ LOCK fails to properly detect write locked
tables when running under low priority updates.

The problem is that when trying to aspire a global read lock, the
reload_acl_and_cache() function fails to properly check if the thread
has a low priority write lock, which later my cause a server crash or
deadlock.

The solution is to simple check if the thread has any type of the
possible exclusive write locks.


mysql-test/r/flush.result:
  Add test case result for Bug#32528
mysql-test/t/flush.test:
  Add test case for Bug#32528
sql/sql_parse.cc:
  Although it should not matter under LOCK TABLES, use TL_WRITE_ALLOW_WRITE
  to emphasize that it should fail in case of any write lock.
2007-11-22 10:18:19 -02:00
unknown
d295bfaa76 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-11-21 21:11:57 +01:00
unknown
e2df3c2983 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-21 20:30:07 +01:00
unknown
4045c9b3d3 Merge stella.local:/home2/mydev/mysql-4.1-amain
into  stella.local:/home2/mydev/mysql-4.1-axmrg
2007-11-21 20:27:16 +01:00
unknown
a7c04594b8 Fixed bug #32556: assert in "using index for group-by" :
is_last_prefix <= 0, file .\opt_range.cc.

SELECT ... GROUP BY bit field failed with an assertion if the
bit length of that field was not divisible by 8.



sql/key.cc:
  Fixed bug #32556.
  Copying of "uneven" bits of a bit field was duplicated in the
  key_copy() and in the Field_bit::get_key_image().
  So, instead of copying of the rest of a bit field, 
  Field_bit::get_key_image() copied "uneven" bits to key image again,
  and the lowest field byte was not copied to key at all.
  
  Duplicated code has been removed from the key_copy function.
mysql-test/t/type_bit.test:
  Added test case for bug #32556.
mysql-test/r/type_bit.result:
  Added test case for bug #32556.
2007-11-21 22:56:42 +04:00
unknown
0c2dac2a8b Fix for bug #32558: group by null-returning expression with rollup causes crash
Problem: setting Item_func_rollup_const::null_value property to argument's null_value
before (without) the argument evaluation may result in a crash due to wrong null_value.

Fix: use is_null() to set Item_func_rollup_const::null_value instead as it evaluates
the argument if necessary and returns a proper value.


mysql-test/r/olap.result:
  Fix for bug #32558: group by null-returning expression with rollup causes crash
    - test result.
mysql-test/t/olap.test:
  Fix for bug #32558: group by null-returning expression with rollup causes crash
    - test case.
sql/item_func.h:
  Fix for bug #32558: group by null-returning expression with rollup causes crash
    - use args[0]->is_null() to obtain Item_func_rollup_const::null_value 
      instead of args[0]->null_value as it's not set in advance in case of 
      constant functions.
2007-11-21 20:53:44 +04:00
unknown
bb3e878159 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30788-5.0-opt


sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/subselect.result:
  merge of 5.0-opt
mysql-test/t/subselect.test:
  merge of 5.0-opt
2007-11-21 11:46:15 +02:00
unknown
e9832ceeac Bug #30788: Inconsistent retrieval of char/varchar
Index lookup does not always guarantee that we can
simply remove the relevant conditions from the WHERE
clause. Reasons can be e.g. conversion errors, 
partial indexes etc. 
The optimizer was removing these parts of the WHERE 
condition without any further checking.
This leads to "false positives" when using indexes.
Fixed by checking the index reference conditions
(using WHERE) when using indexes with sub-queries.


mysql-test/r/subselect.result:
  Bug #30788: 
   - using where
   - test case
mysql-test/r/subselect3.result:
  Bug #30788: using where
mysql-test/t/subselect.test:
  Bug #30788: test case
sql/item.h:
  Bug #30788: 
   - Declare eq() method of Item_cache descendants : this is used in
   test_if_ref()
   - preserve the field that is being cached for type comparisions
sql/sql_select.cc:
  Bug #30788: Don't remove the WHERE when using index lookup 
  with subqueries.
2007-11-21 11:40:05 +02:00
unknown
18851d9ea7 Fix for bug #30495: optimize table t1,t2,t3 extended errors
Problem: we have CHECK TABLE options allowed (by accident?) for
ANALYZE/OPTIMIZE TABLE.

Fix: disable them.

Note: it might require additional fixes in 5.1/6.0


mysql-test/r/analyze.result:
  Fix for bug #30495: optimize table t1,t2,t3 extended errors
    - test result.
mysql-test/t/analyze.test:
  Fix for bug #30495: optimize table t1,t2,t3 extended errors
    - test case.
sql/sql_yacc.yy:
  Fix for bug #30495: optimize table t1,t2,t3 extended errors
    - opt_mi_check_type (CHECK TABLE options) removed from analyze: and optimize:
2007-11-21 11:11:22 +04:00
unknown
870d46819e Bug #32400: Complex SELECT query returns correct result
only on some occasions

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

Fixed by not allowing references to aliases in a 
sub-query in WHERE.


mysql-test/include/ps_query.inc:
  Bug #32400: fixed old test queries
mysql-test/r/ps_2myisam.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_3innodb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_4heap.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_5merge.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_6bdb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_7ndb.result:
  Bug #32400: fixed old test queries
mysql-test/r/subselect.result:
  Bug #32400: test case
mysql-test/t/subselect.test:
  Bug #32400: test case
sql/item.cc:
  Bug #32400: don't allow references to aliases in WHERE
tests/mysql_client_test.c:
  Bug #32400: fixed old test queries
2007-11-20 19:18:21 +02:00
unknown
2fd89a7239 Merge gleb.loc:/work/bk/5.0-opt-32533
into  gleb.loc:/work/bk/5.0-opt
2007-11-20 20:46:30 +04:00
unknown
0a91f285ad Fixed bug #32533.
8bit escape characters, termination and enclosed characters
were silently ignored by SELECT INTO query, but LOAD DATA INFILE
algorithm is 8bit-clean, so data was corrupted during 
encoding.


sql/sql_class.cc:
  Fixed bug #32533.
  SELECT INTO OUTFILE encoding was not 8bit clear, it
  has been fixed for a symmetry with the LOAD DATA INFILE
  decoding algorithm.
mysql-test/t/outfile_loaddata.test:
  Added test case for bug #32533.
mysql-test/r/outfile_loaddata.result:
  Added test case for bug #32533.
2007-11-20 20:15:20 +04:00
unknown
429abc5845 Bug #32268: Indexed queries give bogus MIN and MAX results
Loose index scan does the grouping so the temp table does 
not need to do it, even when sorting.
Fixed by checking if the grouping is already done before
doing sorting and grouping in a temp table and do only 
sorting.


mysql-test/r/group_min_max.result:
  Bug #32268: test case
mysql-test/t/group_min_max.test:
  Bug #32268: test case
sql/sql_select.cc:
  Bug #32268: don't group in the temp table if already done
2007-11-20 16:07:24 +02:00
unknown
a8dd1299cc test case added for the bug #31155
mysql-test/r/gis.result:
  test result complete
mysql-test/t/gis.test:
  test case added for the bug
2007-11-20 17:04:24 +04:00
unknown
b3347a6a98 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31048-bug-5.0-opt-mysql


sql/item_subselect.cc:
  Auto merged
mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
2007-11-19 21:15:53 +00:00
unknown
13105534fa Bug#31048: Many nested subqueries may cause server crash.
This bug is actually two. The first one manifests itself on an EXPLAIN
SELECT query with nested subqueries that employs the filesort algorithm.
The whole SELECT under explain is marked as UNCACHEABLE_EXPLAIN to preserve
some temporary structures for explain. As a side-effect of this values of
nested subqueries weren't cached and subqueries were re-evaluated many
times. Each time buffer for filesort was allocated but wasn't freed because
freeing occurs at the end of topmost SELECT. Thus all available memory was
eaten up step by step and OOM event occur.
The second bug manifests itself on SELECT queries with conditions where
a subquery result is compared with a key field and the subquery itself also
has such condition. When a long chain of such nested subqueries is present
the stack overrun occur. This happens because at some point the range optimizer
temporary puts the PARAM structure on the stack. Its size if about 8K and
the stack is exhausted very fast.

Now the subselect_single_select_engine::exec function allows subquery result
caching when the UNCACHEABLE_EXPLAIN flag is set.
Now the SQL_SELECT::test_quick_select function calls the check_stack_overrun
function for stack checking purposes to prevent server crash.


mysql-test/t/subselect.test:
  Added a test case for the bug#31048: Many nested subqueries may cause server crash.
mysql-test/r/subselect.result:
  Added a test case for the bug#31048: Many nested subqueries may cause server crash.
sql/opt_range.cc:
  Bug#31048: Many nested subqueries may cause server crash.
  Now the SQL_SELECT::test_quick_select function calls the check_stack_overrun
  function for stack checking purposes to preven server crash.
sql/item_subselect.cc:
  Bug31048: Many nested subqueries may cause server crash.
  Now the subselect_single_select_engine::exec function allows subquery result
  caching when the UNCACHEABLE_EXPLAIN flag is set.
2007-11-19 20:00:25 +00:00
unknown
ea73989828 Fixed bug #32282: TEXT silently truncates when value is exactly 65536
bytes length.

The server has been modified to report warnings on truncation to
65536 bytes as usual.



sql/sql_string.cc:
  Fixed bug #32282.
  The well_formed_copy_nchars function returned an incorrect value
  of copied bytes of the truncated input string: extra length of
  the first truncated character added to the *from_end_pos pointer.
  That has been fixed.
mysql-test/r/type_blob.result:
  Added test case for bug #32282.
mysql-test/t/type_blob.test:
  Added test case for bug #32282.
2007-11-19 21:34:21 +04:00
unknown
da1efa3387 Bug #30284 spatial key corruption.
SPATIAL key is fine actually, but the chk_key() function
mistakenly returns error. It tries to compare checksums
of btree and SPATIAL keys while the checksum for the SPATIAL isn't
calculated (always 0). Same thing with FULLTEXT keys is handled
using full_text_keys counter, so fixed by counting both
SPATIAL and FULLTEXT keys in that counter.


myisam/mi_check.c:
  Bug #30284 spatial key corruption
  
  full_text_keys counts both FULL_TEXT and SPATIAL keys
mysql-test/r/gis.result:
  Bug #30284 spatial key corruption
  
  test result
mysql-test/t/gis.test:
  Bug #30284 spatial key corruption.
  
  test case
2007-11-19 11:03:03 +04:00
unknown
f978c7cd86 Merge gleb.loc:/work/bk/5.0-opt-32335
into  gleb.loc:/work/bk/5.0-opt
2007-11-18 00:08:41 +04:00
unknown
99054db64c Fixed bug #32335.
Comparison of a BIGINT NOT NULL column with a constant arithmetic
expression that evaluates to NULL caused error 1048: "Column '...'
cannot be null".

Made convert_constant_item() check if the constant expression is NULL
before attempting to store it in a field. Attempts to store NULL in a
NOT NULL field caused query errors.


sql/item_cmpfunc.cc:
  Fixed bug #32335.
  1. Made convert_constant_item() check if the constant expression is NULL
     before attempting to store it in a field. Attempts to store NULL in
     a NOT NULL field caused query errors.
  
  2. Also minor bug has been fixed: the thd->count_cuted_fields value
     was not restored in case of successful conversion.
mysql-test/t/select.test:
  Added test case for bug #32335.
mysql-test/r/select.result:
  Added test case for bug #32335.
2007-11-18 00:02:55 +04: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
d28ae94e2a Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/31158/my41-31158
2007-11-17 20:24:22 +04:00
unknown
dd07707b0c Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31158/my50-31158


sql/field.cc:
  Auto merged
2007-11-17 20:23:15 +04:00
unknown
75b8713b48 Merge mysql.com:/home/hf/work/31158/my41-31158
into  mysql.com:/home/hf/work/31158/my50-31158


mysql-test/t/gis.test:
  Auto merged
sql/field.h:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
mysql-test/r/gis.result:
  merging
sql/field.cc:
  merging
2007-11-17 16:48:57 +04:00
unknown
8309c197fa Merge mysql.com:/misc/mysql/mysql-5.0-opt
into  mysql.com:/misc/mysql/32180/50-32180


sql-common/my_time.c:
  Auto merged
2007-11-17 05:57:21 +01:00
unknown
5e9933d7ff Bug #32180: DATE_ADD treats datetime numeric argument as DATE instead of DATETIME
This is a regression from 2007-05-18 when code to zero out the returned struct was
added to number_to_datetime(); zero for time_type corresponds to MYSQL_TIMESTAMP_DATE.
We now explicitly set the type we return (MYSQL_TIMESTAMP_DATETIME).


mysql-test/r/func_time.result:
  show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
  as string and as integer.
mysql-test/t/func_time.test:
  show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
  as string and as integer.
sql-common/my_time.c:
  explictly set return type in number_to_datetime()
2007-11-16 17:43:15 +01:00
unknown
36fc6f564c Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


sql/mysql_priv.h:
  Auto merged
2007-11-16 13:27:23 +01:00
unknown
425478bad3 Merge stella.local:/home2/mydev/mysql-4.1-amain
into  stella.local:/home2/mydev/mysql-4.1-axmrg
2007-11-16 13:04:17 +01:00
unknown
4b48eb6f1e Merge polly.(none):/home/kaa/src/opt/bug32241/my50-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/sql_select.cc:
  Auto merged
2007-11-16 14:24:06 +03:00
unknown
1c1dd1f25c Fix for bug #32241: memory corruption due to large index map in 'Range
checked for each record'

The problem was in incorrectly calculated length of the buffer used to
store a hexadecimal representation of an index map in
select_describe(). This could result in buffer overrun and stack
corruption under some circumstances.

Fixed by correcting the calculation.


mysql-test/r/explain.result:
  Added a test case for bug #32241.
mysql-test/t/explain.test:
  Added a test case for bug #32241.
sql/sql_select.cc:
  Corrected the buffer length calculation. Count one hex digit as 4 bits,
  not 8.
2007-11-16 13:58:09 +03:00
unknown
d7ed25385e Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-11-16 11:26:29 +01:00
unknown
1f373cb146 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-11-16 10:42:32 +01:00
unknown
ee85ee6218 Merge trift2.:/MySQL/M41/mysql-4.1
into  trift2.:/MySQL/M41/push-4.1
2007-11-16 10:34:36 +01:00
unknown
dbd0f06981 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31928-5.0-opt


mysql-test/r/type_date.result:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
2007-11-15 17:30:08 +02:00
unknown
1490691e31 after merge fix 2007-11-14 18:56:14 +04:00
unknown
e3c7265135 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0


include/my_sys.h:
  Auto merged
2007-11-14 15:26:38 +01:00
unknown
e8d3f160f5 Merge trift2.:/MySQL/M41/mysql-4.1
into  trift2.:/MySQL/M41/push-4.1
2007-11-14 15:11:37 +01:00
unknown
3160957ebf Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  stella.local:/home2/mydev/mysql-5.0-bug4692


myisam/mi_check.c:
  Auto merged
2007-11-14 14:42:11 +01:00
unknown
bed60e0175 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/select.result:
  manual merge
mysql-test/t/select.test:
  manual merge
2007-11-14 17:26:22 +04:00
unknown
2e01bfc4f4 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt
2007-11-14 17:22:03 +04:00
unknown
fef4a8b04a Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb


ndb/src/ndbapi/NdbOperationDefine.cpp:
  Auto merged
2007-11-14 13:06:19 +01:00
unknown
706a8b09ae Bug#4692 - DISABLE/ENABLE KEYS waste a space
Post-pushbuild fix

Added a purecov comment and a test for coverage of parallel
enable keys.


myisam/mi_check.c:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added purecov comment.
mysql-test/r/myisam.result:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added test result.
mysql-test/t/myisam.test:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added test for coverage of parallel enable keys.
2007-11-14 12:02:20 +01:00
unknown
09e24d1337 Merge mysql.com:/home/svoj/devel/mysql/BUG31277/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31277/mysql-5.0-engines


myisam/mi_check.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
myisam/mi_packrec.c:
  Auto merged
myisam/myisamchk.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/mysql_priv.h:
  Auto merged
include/mysql_com.h:
  Use local.
sql-common/client.c:
  Use local.
2007-11-14 14:38:26 +04:00
unknown
209c69f8c7 Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31277/mysql-4.1-engines
2007-11-14 14:30:21 +04:00
unknown
4451eec231 Merge mysql.com:/home/svoj/devel/mysql/BUG29083/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31277/mysql-4.1-engines
2007-11-14 14:29:49 +04:00
unknown
f561308648 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2007-11-14 11:19:34 +01:00
unknown
c07ae79662 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31305/my50-31305
2007-11-13 23:13:59 +04:00
unknown
9248b402d8 Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/31305/my41-31305
2007-11-13 23:12:55 +04:00
unknown
4bc635e2f1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31562-5.0-opt


sql/item.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-11-13 19:00:45 +02:00
unknown
170ae2d252 Bug #31562: HAVING and lower case
The columns in HAVING can reference the GROUP BY and 
SELECT columns. There can be "table" prefixes when
referencing these columns. And these "table" prefixes
in HAVING use the table alias if available.
This means that table aliases are subject to the same
storage rules as table names and are dependent on 
lower_case_table_names in the same way as the table 
names are.
Fixed by :
1. Treating table aliases as table names
and make them lowercase when printing out the SQL
statement for view persistence.
2. Using case insensitive comparison for table 
aliases when requested by lower_case_table_names


mysql-test/r/lowercase_view.result:
  Bug #31562: test case
mysql-test/t/lowercase_view.test:
  Bug #31562: test case
sql/item.cc:
  Bug #31562: lower_case_table_name contious comparison
  when searching in GROUP BY
sql/sql_base.cc:
  Bug #31562: lower_case_table_name contious comparison
  when searching in SELECT
sql/sql_select.cc:
  Bug #31562: treat table aliases as table names
  and make them lowercase when printing
2007-11-13 11:39:52 +02:00
unknown
eb347921b7 Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data)
max_length parameter for BLOB-returning functions must be big enough
for any possible content. Otherwise the field created for a table
will be too small.


mysql-test/r/gis.result:
  Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
  
  test result
mysql-test/t/gis.test:
  Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
  
  test case
sql/field.cc:
  Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
  
  max_field_size used instead of numeric value
sql/field.h:
  Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
  
  max_field_size constant defined
sql/item_geofunc.cc:
  Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
  
  max_length parameter fixed
2007-11-13 10:51:47 +04:00
unknown
001c78e29e Merge mattiasj@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
2007-11-12 22:47:48 +01:00
unknown
53907ce85f Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-main
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
2007-11-12 21:42:27 +01:00
unknown
dff7a5afcc Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1-build
into  mysql.com:/home/kent/bk/bug30069/mysql-4.1-build
2007-11-12 18:57:50 +01:00
unknown
2aa5037c7a Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
2007-11-12 21:54:04 +04:00
unknown
9f9ff46120 symlink.test, symlink.result:
Use proper variable for test.


mysql-test/t/symlink.test:
  Use proper variable for test.
mysql-test/r/symlink.result:
  Use proper variable for test.
2007-11-12 21:52:30 +04:00
unknown
fc71ff899b Merge mysql.com:/home/kent/bk/bug30069/mysql-4.1-build
into  mysql.com:/home/kent/bk/bug30069/mysql-5.0-build


mysql-test/t/bigint.test:
  Auto merged
strings/ctype-simple.c:
  Auto merged
mysql-test/r/bigint.result:
  SCCS merged
2007-11-12 13:13:43 +01:00
unknown
568f624406 bigint.test, bigint.result:
Test case for Bug#30069


mysql-test/r/bigint.result:
  Test case for Bug#30069
mysql-test/t/bigint.test:
  Test case for Bug#30069
2007-11-12 12:52:03 +01:00
unknown
c63fd4dd32 Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysys/my_symlink2.c:
  Auto merged
2007-11-12 15:16:00 +04:00
unknown
a1e38552bb Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.0
into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines


mysys/my_symlink2.c:
  Auto merged
mysql-test/r/symlink.result:
  SCCS merged
mysql-test/t/symlink.test:
  SCCS merged
2007-11-12 15:02:42 +04:00
unknown
26ebe887c4 Merge polly.(none):/home/kaa/src/opt/bug30666/my50-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  Manual merge.
mysql-test/t/select.test:
  Manual merge.
2007-11-12 12:29:20 +03:00
unknown
04e51e2447 Merge mysql.com:/home/hf/work/31305/my41-31305
into  mysql.com:/home/hf/work/31305/my50-31305


BitKeeper/etc/ignore:
  auto-union
myisam/mi_dynrec.c:
  Auto merged
2007-11-12 13:06:27 +04:00
unknown
cb927e2f45 Bug #31305 myisam tables crash when they are near capacity.
When we insert a record into MYISAM table which is almost 'full',
we first write record data in the free space inside a file, and then
check if we have enough space after the end of the file.
So if we don't have the space, table will left corrupted.
Similar error also happens when we updata MYISAM tables.

Fixed by modifying write_dynamic_record and update_dynamic_record functions
to check for free space before writing parts of a record


BitKeeper/etc/ignore:
  Added libmysql_r/client_settings.h libmysqld/ha_blackhole.cc to the ignore list
myisam/mi_dynrec.c:
  Bug #31305 myisam tables crash when they are near capacity.
  
  now we check space left in table in write_dynamic_record
  and update_dynamic_record functions.
  If we don't have enough room for the new (updated) record, return with the
  error.
mysql-test/r/almost_full.result:
  New BitKeeper file ``mysql-test/r/almost_full.result''
mysql-test/t/almost_full.test:
  New BitKeeper file ``mysql-test/t/almost_full.test''
2007-11-12 13:00:22 +04:00
unknown
7e71e24c38 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-11-11 00:01:24 +04:00
unknown
747cb198b6 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-28076
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/item_cmpfunc.cc:
  Auto merged
2007-11-10 23:58:22 +04:00
unknown
04468cba0a Merge polly.(none):/home/kaa/src/opt/bug32202/my50-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/sql_select.cc:
  Auto merged
2007-11-10 22:46:25 +03:00
unknown
e7c6a81f25 Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
clause returned a wrong result: the VARBINARY value was illegally padded
with zero bytes to the length of the BINARY column for the index search.
(<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.


sql/item.cc:
  Fixed bug #28076.
  The Item_cache_str::save_in_field method has been overloaded
  to check cached values for an illegal padding before the saving
  into a field.
sql/item.h:
  Fixed bug #28076.
  The Item_cache_str::is_varbinary flag has been added and the
  Item_cache_str::save_in_field method has been overloaded to prevent
  cached values from an illegal padding when saving in fields.
  The signature of the Item_cache::get_cache method has been
  changed to accept pointers to Item instead of Item_result
  values.
sql/item_cmpfunc.cc:
  Fixed bug #28076.
  The Item_in_optimizer::fix_left method has been modified to
  to call Item_cache::get_cache in a new manner.
sql/item_subselect.cc:
  Fixed bug #28076.
  The subselect_indexsubquery_engine::exec method has been
  modified to take into account field conversion errors
  (copy&paste from subselect_uniquesubquery_engine::exec).
sql/sp_rcontext.cc:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method has been
  modified to call Item_cache::get_cache in a new manner.
sql/sp_rcontext.h:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method signature
  has been modified to pass Item pointers to the
  Item_cache::get_cache method.
sql/sql_class.cc:
  Fixed bug #28076.
  The select_max_min_finder_subselect::send_data method has been
  modified to call Item_cache::get_cache in a new manner.
mysql-test/t/subselect.test:
  Added test case for bug #28076.
mysql-test/r/subselect.result:
  Added test case for bug #28076.
2007-11-10 23:44:48 +04: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
6b00e6eb2c Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31800/50-31800


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
2007-11-10 13:35:35 +01:00
unknown
ac3ef6c759 Bug#31800: Date comparison fails with timezone and slashes for greater than comparison
BETWEEN was more lenient with regard to what it accepted as a DATE/DATETIME
in comparisons than greater-than and less-than were. ChangeSet makes < >
comparisons similarly robust with regard to trailing garbage (" GMT-1")
and "missing" leading zeros. Now all three comparators behave similarly
in that they throw a warning for "junk" at the end of the data, but then
proceed anyway if possible. Before < > fell back on a string- (rather than
date-) comparison when a warning-condition was raised in the string-to-date
conversion. Now the fallback only happens on actual errors, while warning-
conditions still result in a warning being to delivered to the client.


mysql-test/r/select.result:
  Show that we compare DATE/DATETIME-like strings as date(time)s
  now, rather than as bin-strings.
  Adjust older result as "2005-09-3a" is now correctly seen as
  "2005-09-3" + trailing garbage, rather than as "2005-09-30".
mysql-test/t/select.test:
  Show that we compare DATE/DATETIME-like strings as date(time)s
  now, rather than as bin-strings.
sql-common/my_time.c:
  correct/clarify date-related comments, particulary for check_date().
  doxygenize comment while at it.
sql/item_cmpfunc.cc:
  get_date_from_str() no longer signals an error when all we had
  was a warning-condition -- and one we already gave the user a
  warning for at that. Preamble doxygenized.
2007-11-10 13:33:42 +01:00
unknown
e9a78d8ca5 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31990/50-31990
2007-11-10 03:12:57 +01:00
unknown
55499d2bf4 Fix for bug #32202: ORDER BY not working with GROUP BY
The bug is a regression introduced by the fix for bug30596. The problem
was that in cases when groups in GROUP BY correspond to only one row,
and there is ORDER BY, the GROUP BY was removed and the ORDER BY
rewritten to ORDER BY <group_by_columns> without checking if the
columns in GROUP BY and ORDER BY are compatible. This led to
incorrect ordering of the result set as it was sorted using the
GROUP BY columns. Additionaly, the code discarded ASC/DESC modifiers
from ORDER BY even if its columns were compatible with the GROUP BY
ones.

This patch fixes the regression by checking if ORDER BY columns form a
prefix of the GROUP BY ones, and rewriting ORDER BY only in that case,
preserving the ASC/DESC modifiers. That check is sufficient, since the
GROUP BY columns contain a unique index.


mysql-test/r/group_by.result:
  Added a test case for bug #32202.
mysql-test/t/group_by.test:
  Added a test case for bug #32202.
sql/sql_select.cc:
  In cases when groups in GROUP BY correspond to only one row and there
  is ORDER BY, rewrite the query to ORDER BY <group_by_columns> only if
  the columns in ORDER BY and GROUP BY are compatible, i.e. either one
  forms a prefix for another.
2007-11-09 19:12:12 +03:00
unknown
9eb28b96dd Merge capulet.net:/home/bk/mysql-5.0-rpl
into  capulet.net:/home/mats/devel/b31793-mysql-5.0-rpl


sql/log_event.cc:
  Auto merged
2007-11-09 13:45:10 +01:00
unknown
dc91bc74c7 BUG#31793 (log event corruption causes crash):
When running mysqlbinlog on a 64-bit machine with a corrupt relay log,
it causes mysqlbinlog to crash. In this case, the crash is caused
because a request for 18446744073709534806U bytes is issued, which
apparantly can be served on a 64-bit machine (speculatively, I assume)
but this causes the memcpy() issued later to copy the data to segfault.

The request for the number of bytes is caused by a computation
of data_len - server_vars_len where server_vars_len is corrupt in such
a sense that it is > data_len. This causes a wrap-around, with the
the data_len given above.

This patch adds a check that if server_vars_len is greater than
data_len before the substraction, and aborts reading the event in
that case marking the event as invalid. It also adds checks to see
that reading the server variables does not go outside the bounds
of the available space, giving a limited amount of integrity check.


mysql-test/r/mysqlbinlog.result:
  Result change.
mysql-test/t/mysqlbinlog.test:
  Adding test that it fails gracefully for a corrupt relay log.
sql/log_event.cc:
  Adding check that status var length does not cause wrap-around
  when performing subtraction. Extending get_str_len_and_pointer() to
  check that the string can actually be read without reading outside
  bounds. Adding checks when reading server variables from the Query-
  log_event so that the variable can really be read. Abort reading
  and mark the event as invalid otherwise.
mysql-test/std_data/corrupt-relay-bin.000624:
  BitKeeper file /home/mats/devel/b31793-mysql-5.0-rpl/mysql-test/std_data/corrupt-relay-bin.000624
2007-11-09 13:43:09 +01:00
unknown
e68540a6b8 Merge polly.(none):/home/kaa/src/opt/bug32020/my50-bug31445
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/sql_udf.cc:
  Auto merged
2007-11-09 13:41:50 +03:00
unknown
737cdfeaeb Fix for bug #32020: loading udfs while --skip-grant-tables is enabled
causes out of memory errors

The code in mysql_create_function() and mysql_drop_function() assumed
that the only reason for UDFs being uninitialized at that point is an
out-of-memory error during initialization. However, another possible 
reason for that is the --skip-grant-tables option in which case UDF 
initialization is skipped and UDFs are unavailable.

The solution is to check whether mysqld is running with
--skip-grant-tables and issue a proper error in such a case.


mysql-test/r/skip_grants.result:
  Added a test case for bug #32020.
mysql-test/t/skip_grants.test:
  Added a test case for bug #32020.
sql/sql_udf.cc:
  Issue a proper error when a user tries to CREATE/DROP a UDF 
  on a server running with the --skip-grant-tables option.
2007-11-09 13:29:43 +03:00
unknown
5c6b995b7f Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-11-08 10:33:57 +01:00
unknown
0075aa4960 Merge polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
2007-11-08 12:06:14 +03:00
unknown
6c5a2e50c4 Merge polly.(none):/home/kaa/src/opt/bug32103/my41-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-4.1-opt
2007-11-08 12:04:48 +03:00
unknown
4713575c77 Merge polly.(none):/home/kaa/src/opt/bug32103/my41-bug26215
into  polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215


mysql-test/t/select.test:
  Auto merged
mysql-test/r/select.result:
  Manual merge.
sql/item.h:
  Manual merge.
2007-11-08 11:46:58 +03:00
unknown
b1fc4b9e63 Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE
HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
This happened because DATE-cast object did not overload get_time() method
in superclass Item. The default method was inappropriate here and
misinterpreted the data.

Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
on NULL input, 0 otherwise. This coincides with the way DATE-columns
behave.


mysql-test/r/cast.result:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
  Show that this coincides with how DATE-columns behave.
mysql-test/t/cast.test:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
  Show that this coincides with how DATE-columns behave.
sql/item_timefunc.cc:
  Add get_time() method to DATE-cast object to overload
  the method in Item superclass that would return spurious
  results. Return zero-result; flag NULL if input was NULL.
sql/item_timefunc.h:
  Add get_time() declaration to DATE-cast object.
2007-11-08 06:08:44 +01:00
unknown
36d1659a80 Bug #31928: Search fails on '1000-00-00' date after sql_mode change
When constructing a key image stricter date checking (from sql_mode)
should not be enabled, because it will reject invalid dates that the
server would otherwise accept for searching when there's no index.
 
Fixed by disabling strict date checking when constructing a key image.


mysql-test/r/type_date.result:
  Bug #31928: test case
mysql-test/t/type_date.test:
  Bug #31928: test case
sql/sql_select.h:
  Bug #31928: Disable strict date checking when consructing
  a key image
2007-11-07 18:02:12 +02:00
unknown
0a7a55d175 Fix for bug #32103: optimizer crash when join on int and mediumint with
variable in where clause.

Problem: the new_item() method of Item_uint used an incorrect
constructor. "new Item_uint(name, max_length)" calls
Item_uint::Item_uint(const char *str_arg, uint length) which assumes the
first argument to be the string representation of the value, not the
item's name. This could result in either a server crash or incorrect
results depending on usage scenarios.

Fixed by using the correct constructor in new_item():
Item_uint::Item_uint(const char *str_arg, longlong i, uint length).


mysql-test/r/select.result:
  Added a test case for bug #32103.
mysql-test/t/select.test:
  Added a test case for bug #32103.
sql/item.h:
  Use the correct constructor for Item_uint in Item_uint::new_item().
2007-11-07 18:45:04 +03:00
unknown
f668665955 Fix for bug #30666: Incorrect order when using range conditions on 2
tables or more

The problem was that the optimizer used the join buffer in cases when
the result set is ordered by filesort. This resulted in the ORDER BY
clause being ignored, and the records being returned in the order
determined by the order of matching records in the last table in join.

Fixed by relaxing the condition in make_join_readinfo() to take
filesort-ordered result sets into account, not only index-ordered ones.


mysql-test/r/select.result:
  Added a test case for bug #30666.
mysql-test/t/select.test:
  Added a test case for bug #30666.
sql/sql_select.cc:
  Relaxed the condition to determine when the join buffer usage must be
  disabled. The condition is now true for cases when the result set is
  ordered by filesort, that is when 'join->order &&
  !join->skip_sort_order' is true.
2007-11-07 14:00:45 +03:00
unknown
c5df4b3092 BUG#31277 - myisamchk --unpack corrupts a table
With certain data sets (when compressed record length gets bigger than
uncompressed) myisamchk --unpack may corrupt data file.

Fixed that record length was wrongly restored from compressed table.


myisam/mi_check.c:
  With compressed tables compressed record length may be bigger than
  pack_reclength, thus we may allocate insufficient memory for record
  buffer.
  
  Let single function allocate record buffer, performing needed record
  length calculations.
  
  Still, it is not doable with parallel repair, as it allocates needed
  record buffers at once. For parellel repair added better record length
  calculation.
myisam/mi_open.c:
  When calculating record buffer size, take into account that compressed
  record length may be bigger than uncompressed.
myisam/mi_packrec.c:
  With certain data set share->max_pack_length (compressed record length)
  may be bigger than share->base.pack_reclength (packed record length).
  
  set_if_bigger(pack_reclength, max_pack_length) in this case causes
  myisamchk --unpack to write extra garbage, whereas pack_reclength
  remains the same in new index file. As a result we get unreadable
  table.
myisam/myisamchk.c:
  With compressed tables compressed record length may be bigger than
  pack_reclength, thus we may allocate insufficient memory for record
  buffer.
  
  Let single function allocate record buffer, performing needed record
  length calculations.
mysql-test/mysql-test-run.pl:
  Environment variables to execute myisamchk and myisampack.
mysql-test/r/myisampack.result:
  New BitKeeper file ``mysql-test/r/myisampack.result''
mysql-test/t/myisampack.test:
  New BitKeeper file ``mysql-test/t/myisampack.test''
2007-11-07 12:55:28 +04:00
unknown
c7191f90a3 Fix for bug #32137: prepared statement crash with str_to_date in update clause
Problem: calling non-constant argument's val_xxx() methods 
in the ::fix_length_and_dec() is inadmissible.

Fix: call the method only for constant arguments.


mysql-test/r/ps.result:
  Fix for bug #32137: prepared statement crash with str_to_date in update clause
    - test result.
mysql-test/t/ps.test:
  Fix for bug #32137: prepared statement crash with str_to_date in update clause
    - test case.
sql/item_timefunc.cc:
  Fix for bug #32137: prepared statement crash with str_to_date in update clause
    - call argument's val_str() only for constant items in the 
      Item_func_str_to_date::fix_length_and_dec().
2007-11-07 12:47:19 +04:00
unknown
6957e84ec6 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
2007-11-06 20:32:52 +02:00
unknown
0c1a085cca bug#27571
refining non-deterministic tests.
The new Bug@32148 is in the way. Adjuting the tests to be somehow useful.
 


mysql-test/r/binlog_killed.result:
  results changed
mysql-test/t/binlog_killed.test:
  refining the tests as killing is inherently non-deterministic;
  leaving todos.
2007-11-06 20:31:40 +02:00
unknown
0216fb0def Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug28597-log_name_upgrade
2007-11-06 17:12:56 +02:00
unknown
ff4b438be0 BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE
RENAME TABLE against a table with DATA/INDEX DIRECTORY overwrites
the file to which the symlink points.

This is security issue, because it is possible to create a table with
some name in some non-system database and set DATA/INDEX DIRECTORY
to mysql system database. Renaming this table to one of mysql system
tables (e.g. user, host) would overwrite the system table.

Return an error when the file to which the symlink points exist.


mysql-test/r/symlink.result:
  A test case for BUG#32111.
mysql-test/t/symlink.test:
  A test case for BUG#32111.
mysys/my_symlink2.c:
  Return an error when the file to which the symlink points exist.
2007-11-06 18:09:33 +04:00
unknown
86e07400b7 bug#27571
removing extra tests (on 5.1 that's been already done)


BitKeeper/deleted/.del-binlog_killed_bug27571-master.opt:
  Delete: mysql-test/t/binlog_killed_bug27571-master.opt
BitKeeper/deleted/.del-binlog_killed_bug27571.test:
  Delete: mysql-test/t/binlog_killed_bug27571.test
2007-11-06 15:11:59 +02:00
unknown
85425773e8 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-06 13:56:15 +01:00
unknown
42829c61b6 Bug#4692 - DISABLE/ENABLE KEYS waste a space
Disabling and enabling indexes on a non-empty table grows the
index file.

Disabling indexes just sets a flag per non-unique index and does not
free the index blocks of the affected indexes. Re-enabling indexes
creates new indexes with new blocks. The old blocks remain unused
in the index file.

Fixed by dropping and re-creating all indexes if non-empty disabled
indexes exist when enabling indexes. Dropping all indexes resets
the internal end-of-file marker to the end of the index file header.
It also clears the root block pointers of every index and clears the
deleted blocks chains. This way all blocks are declared as free.


myisam/mi_check.c:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added function mi_drop_all_indexes() to support drop of all indexes
  in case we want to re-enable non-empty disabled indexes.
  Changed mi_repair(), mi_repair_by_sort(), and mi_repair_parallel()
  to use the new function instead of duplicate drop index code.
mysql-test/r/myisam.result:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added test result.
mysql-test/t/myisam.test:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added test.
2007-11-06 13:41:32 +01:00
unknown
3cc49bbe74 bug#27571
commit is specific for 5.0 to eliminated non-deterministic tests.
Those tests run only in 5.1 env where there is a necessary devices such
as processlist table of info_schema.


mysql-test/r/binlog_killed.result:
  results changed
mysql-test/t/binlog_killed.test:
  removing non-deterministic part of the test
mysql-test/t/binlog_killed_simulate.test:
  adding the guard same as for 5.1 version
2007-11-06 13:53:26 +02:00
unknown
b4db3f3f0a Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags


sql/sql_insert.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2007-11-06 13:27:48 +02:00
unknown
f7ee88253a ha_ndbcluster.h:
Bug #31956       auto increment bugs in MySQL Cluster: Added utility method and constant for internal prefetch default
ndb_auto_increment.result:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/r/ndb_auto_increment.result
mysqld.cc:
  Bug #25176  	Trying to set ndb_autoincrement_prefetch_sz always fails: Changed pointer to max value
  Bug #31956  	auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement)
ndb_insert.test, ndb_insert.result:
  Moved auto_increment tests to ndb_auto_increment.test
ndb_auto_increment.test:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/t/ndb_auto_increment.test
ha_ndbcluster.cc:
  Bug #31956       auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement), added handling of updates of pk/unique key with auto_increment
  Bug #32055  	Cluster does not handle auto inc correctly with insert ignore statement


sql/mysqld.cc:
  Bug #25176  	Trying to set ndb_autoincrement_prefetch_sz always fails: Changed pointer to max value
  Bug #31956  	auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement)
sql/ha_ndbcluster.h:
  Bug #31956       auto increment bugs in MySQL Cluster: Added utility method and constant for internal prefetch default
sql/ha_ndbcluster.cc:
  Bug #31956       auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement), added handling of updates of pk/unique key with auto_increment
  Bug #32055  	Cluster does not handle auto inc correctly with insert ignore statement
mysql-test/r/ndb_auto_increment.result:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/r/ndb_auto_increment.result
mysql-test/t/ndb_auto_increment.test:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/t/ndb_auto_increment.test
mysql-test/t/ndb_insert.test:
  Moved auto_increment tests to ndb_auto_increment.test
mysql-test/r/ndb_insert.result:
  Moved auto_increment tests to ndb_auto_increment.test
2007-11-05 20:18:22 +01:00
unknown
441b86087a Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge
2007-11-05 09:50:09 -07:00
unknown
c0be4995f9 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug28597-log_name_upgrade
2007-11-05 18:13:31 +02:00
unknown
b7cdb978d9 Bug #28597 Replication doesn't start after upgrading to 5.1.18
Since bug@20166, which replaced the binlog file name generating to base
on pidfile_name instead of the previous glob_hostname, the binlog file
name suddenly started to be stored solely in the absolute path format,
including a case when --log-bin option meant a relative path.
What's more serious, the path for binlog file can lead unrequestedly 
to pid-file directory so that after any proper fix for this bug
there might be similar to the bug report consequences for one who
upgrades from post-fix-bug@20166-pre-fix-bug@28597 to post-fix-bug@28597.

Fixed with preserving`pidfile_name' (intr.by bug@20166) but stripping
off its directory part. This restores the original logics of storing
the names in compatible with --log-bin option format and with the
requirement for --log-bin ralative path to corresond to the data directory.
Side effects for this fix:

effective fixing bug@27070, refining its test;
ensuring no overrun for buff can happen anymore (Bug#31836 
insufficient space reserved for the suffix of relay log file name);
bug#31837  --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql missed
in rpl_temporary.test;
fixes Bug@28603  Invalid log-bin default location;


mysql-test/t/rpl_dual_pos_advance.test:
  After correcting the logics of log file name composing workaround for
  
    Bug #27070 server logs are created unrequested and in wrong directory
  
  is removed.
mysql-test/t/rpl_temporary.test:
  remaining temp file of the test removed
sql/log.cc:
  stripping off the directory part of `pidfile_name' for binlog name
  generating (which fixes two more bugs on wrong binlog file location);
  ensuring no overrun for buff can happen anymore (Bug #31836 
  insufficient space reserved for the suffix of relay log file name);
2007-11-05 17:20:10 +02:00
unknown
2a0f4e4faf Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31758/my50-31758
2007-11-05 19:07:03 +04:00
unknown
62617b09c3 Merge mysql.com:/home/hf/work/31758/my41-31758
into  mysql.com:/home/hf/work/31758/my50-31758


mysql-test/t/func_str.test:
  Auto merged
mysql-test/r/func_str.result:
  merging
sql/item_strfunc.h:
  merging
2007-11-05 18:12:42 +04:00
unknown
6f12c92439 Bug#32108 - subselect.test produces warnings files
Comment sign of -- at line begin in test files lead to warnings
from mysqltest.
  
Changed -- to #.


mysql-test/t/subselect.test:
  Bug#32108 - subselect.test produces warnings files
  Changed -- to # at comment begin to avoid warnings files.
2007-11-05 14:44:38 +01:00
unknown
abd6ff8622 Bug#32107 - ctype_uca.test produces warnings files
Comment sign of -- at line begin in test files lead to warnings
from mysqltest.
  
Changed -- to #.


mysql-test/t/ctype_uca.test:
  Bug#32107 - ctype_uca.test produces warnings files
  Changed -- to # at comment begin to avoid warnings files.
2007-11-05 14:37:00 +01:00