Commit graph

11618 commits

Author SHA1 Message Date
unknown
f28612eae2 Bug #34747: crash in debug assertion check after derived table
Was a double-free of the Unique member of Item_func_group_concat.
This was not causing a crash because the Unique is a descendent of
Sql_alloc.
Fixed to free the Unique only if it was allocated for the instance 
of Item_func_group_concat it was referenced from


mysql-test/r/func_gconcat.result:
  Bug #34747: test case
mysql-test/t/func_gconcat.test:
  Bug #34747: test case
sql/item_sum.cc:
  Bug #34747: free the Unique only if it was allocated
  for this instance of Item_func_group_concat
2008-02-28 13:31:19 +02:00
unknown
25620347fc Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/sql_yacc.yy:
  Auto merged
2008-02-26 16:10:31 +03:00
unknown
4f3eab5804 Fix for bug #33834: FRAC_SECOND: Applicability not clear in
documentation

While the manual mentions FRAC_SECOND only for the TIMESTAMPADD()
function, it was also possible to use FRAC_SECOND with DATE_ADD(),
DATE_SUB() and +/- INTERVAL.

Fixed the parser to match the manual, i.e. using FRAC_SECOND for 
anything other than TIMESTAMPADD()/TIMESTAMPDIFF() now produces a 
syntax error.

Additionally, the patch allows MICROSECOND to be used in TIMESTAMPADD/
TIMESTAMPDIFF and marks FRAC_SECOND as deprecated.


mysql-test/r/func_time.result:
  Added a test case for bug #33834.
mysql-test/t/func_time.test:
  Added a test case for bug #33834.
sql/sql_yacc.yy:
  Reject FRAC_SECOND for anything other than TIMESTAMPADD() or
  TIMESTAMPDIFF().
  Allow MICROSECOND to be used with TIMESTAMPADD()/TIMESTAMPDIFF().
  Warn about FRAC_SECOND being a deprecated unit.
2008-02-25 13:25:57 +03:00
unknown
62ba88327f Merge kaamos.(none):/data/src/opt/bug33049/my50-bug33790
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-22 21:25:11 +03:00
unknown
4368dcdc2d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30604-5.0-opt
2008-02-22 15:36:27 +02:00
unknown
d702cb12b2 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/mysql-5.0-opt
2008-02-22 15:04:24 +04:00
unknown
012aab7d8b Fix for bug #33049: Assert while running test-as3ap test(mysql-bench
suite)

Under some circumstances a combination of aggregate functions and
GROUP BY in a SELECT query over a VIEW could lead to incorrect
calculation of the result type of the aggregate function. This in
turn could result in incorrect results, or assertion failures on debug
builds.

Fixed by changing the logic in Item_sum_hybrid::fix_fields() so that
the argument's item is dereferenced before calling its type() method.


mysql-test/r/view.result:
  Added a test case for bug #33049.
mysql-test/t/view.test:
  Added a test case for bug #33049.
sql/item_sum.cc:
  When calculating the result type of an aggregate function, dereference
  the argument's item before calling its type() method.
2008-02-22 11:34:18 +03:00
unknown
1a8be8bccb Bug#23588 SHOW COLUMNS on a temporary table causes locking issues
skip lock_type update for temporary tables


mysql-test/r/tablelock.result:
  test result
mysql-test/t/tablelock.test:
  test case
sql/sql_base.cc:
  skip lock_type update for temporary tables
2008-02-22 12:30:17 +04:00
unknown
463edf377e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/33266-bug-5.0-opt-mysql
2008-02-20 18:01:53 +03:00
unknown
daffceb4e2 Bug#33266: Incorrect test case for the bug#31048 failing on some platforms.
The test case for the bug#31048 checks that there is no crash on stack
overrun. But due to different stack sizes on different platforms it failed
on some of them.

The new test case check that a query with at least 4 level subquery nesting
works without the stack overrun nesting and other levels of nesting doesn't
cause a crash.


mysql-test/t/subselect.test:
  Corrected test case for the bug#31048.
mysql-test/r/subselect.result:
  Corrected test case for the bug#31048.
2008-02-20 17:41:39 +03:00
unknown
1ac319248f Bug #30604: different flagging of time_zone_used in normal
and ps-protocol
Finding a routine should be a transparent operation as 
far as the binary log is concerned.
But it was influencing the binary log because of the TIMESTAMP
column in the proc table.

Fixed by preserving and restoring the time_zone usage flag when
searching for a stored routine in the proc table.


mysql-test/r/binlog_innodb.result:
  Bug #30604: test case
mysql-test/r/ctype_cp932_binlog.result:
  Bug #30604: updated test results (a procedure call before that)
mysql-test/t/binlog_innodb.test:
  Bug #30604: test case
sql/sp.cc:
  Bug #30604: finding a routine should be a transparent operation as 
  far as the binary log is concerned.
  Fixed by preserving and restoring the time_zone usage flag.
2008-02-19 17:27:18 +02:00
unknown
18f885ed4c Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/32942/my50-32942


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  merging
mysql-test/t/select.test:
  merging
2008-02-18 19:18:44 +04:00
unknown
787dbacab2 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-17 16:57:07 +03:00
unknown
d6be1a9b95 Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
Problem is not about intervals and doesn't actually cause 'full table scan'.
We have an optimization for DISTINCT when we have
'DISTINCT field_from_first_join_table' we don't need to read all the
rows from the JOIN-ed table if we found one conforming row.
It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon
that case in the evaluate_join_record() and that doesn't break the
recordreading loop in sub_select().

Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case.


mysql-test/r/select.result:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan".
  
  test result
mysql-test/t/select.test:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
  
  test case
sql/sql_select.cc:
  Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
  
  return NESTED_LOOP_NO_MORE_ROWS when we don't need to read rows from
  this table anymore
2008-02-17 15:48:17 +04:00
unknown
4a834b4b12 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
2008-02-17 14:37:39 +03:00
unknown
0529125af1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt


sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2008-02-15 18:34:03 +02:00
unknown
cc2e929ac4 Bug #31887: DML Select statement not returning same results
when executed in version 5

Zero fill is a field attribute only. So we can't always 
propagate  constants for zerofill fields : the values and 
expression results don't have that flag.

Fixed by converting the const value to a string and 
using that in const propagation when the context allows it. 
Disable const propagation for fields with ZEROFILL flag in
all the other cases.


mysql-test/r/compare.result:
  Bug #31887: test case
mysql-test/t/compare.test:
  Bug #31887: test case
sql/item.cc:
  Bug #31887: If the context allows conversion
  of an int constant to a zero-filled string constant
  put the string constant instead of the int constant
  when doing const propagation
sql/mysql_priv.h:
  Bug #31887: a macro to get all the Field_num
  descendant fields.
2008-02-15 15:47:32 +02:00
unknown
c4fc5b096e Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-14 12:48:25 +03:00
unknown
be891fc611 Merge host.loc:/home/uchum/work/5.0-opt-gca
into  host.loc:/home/uchum/work/5.0-opt
2008-02-13 19:47:39 +04:00
unknown
7a290b55f7 Fixed bug#31194: Privilege ordering does not order properly
for wildcard values.
The server ignored escape character before wildcards during
the calculation of priority values for sorting of a privilege
list. (Actually the server counted an escape character as an
ordinary wildcard like % or _). I.e. the table name template
with a wildcard character like 'tbl_1' had higher priority in
a privilege list than concrete table name without wildcards
like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
by privileges for 'tbl_1'.

The get_sort function has been modified to ignore escaped
wildcards as usual.



mysql-test/r/grant3.result:
  Added test case for bug#31194.
mysql-test/t/grant3.test:
  Added test case for bug#31194.
sql/sql_acl.cc:
  Fixed bug#31194.
  The server used the wild_prefix escape character (usually \-character)
  like % and _ wildcards in the get_sort function for sorting weights
  calculation.
  
  The get_sort function has been modified to ignore escaped wildcards
  and alone escapes like in the wild_case_compare function.
2008-02-13 19:34:12 +04:00
unknown
247efb9cf0 Fixed bug#33764: Wrong result with IN(), CONCAT() and implicit
type conversion.

Instead of copying of whole character string from a temporary
buffer, the server copied a short-living pointer to that string
into a long-living structure. That has been fixed.


mysql-test/r/select.result:
  Added test case for bug#33764.
mysql-test/t/select.test:
  Added test case for bug#33764.
sql/item_cmpfunc.cc:
  Fixed bug#33764.
  Copying of a pointer has been replaced with an optional copying of
  a whole array to a newly allocated memory space in case of a
  functional source item.
2008-02-13 19:32:19 +04:00
unknown
c6610b5791 Merge mbp:src/opt/bug33389/my50-bug25162
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-12 22:51:01 +03:00
unknown
d83cd2149b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31590-bug-5.0-opt-mysql
2008-02-12 21:58:41 +03:00
unknown
d5092fa9ca Fix for bug #33389: Selecting from a view into a table from within SP
or trigger crashes server

Under some circumstances a combination of VIEWs, subselects with outer
references and PS/SP/triggers could lead to use of uninitialized memory
and server crash as a result.

Fixed by changing the code in Item_field::fix_fields() so that in cases
when the field is a VIEW reference, we first check whether the field
is also an outer reference, and mark it appropriately before returning.


mysql-test/r/view.result:
  Added a test case for bug #33389.
mysql-test/t/view.test:
  Added a test case for bug #33389.
sql/item.cc:
  In cases when in Item_field::fix_fields() from_field is a view reference,
  do not return too early, i.e. before marking the reference as an outer
  one when needed.
2008-02-12 12:43:55 +03:00
unknown
65c7d3004e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  dipika.(none):/opt/local/work/mysql-5.0-runtime
2008-02-08 18:51:07 +03:00
unknown
213b4dcd9e Fixed bug#15409: Columns with 64-element SET may not be updated with integers.
SET column storing procedure has been modified to be 64bit-clean.


mysql-test/r/type_set.result:
  Added test case for bug#15409.
mysql-test/t/type_set.test:
  Added test case for bug#15409.
sql/field.cc:
  Fixed bug#15409.
  The Field_set::store(longlong nr,...) method incompletely
  calculates a bit mask for the comparison with a given number:
  if that number is greater than 0x7F00 0000 0000 0000 (LONGLONG_MAX),
  it uses zero bit mask instead of 0xFFFF FFFF FFFF FFFF (ULONGLONG_MAX).
  
  Incomplete expression has been replaced with a set_bits macro call.
2008-02-08 16:04:01 +04:00
unknown
7d98c21cdf Bug#33798 prepared statements improperly handle large unsigned ints
The unsignedness of large integer user variables was not being
properly preserved when feeded to prepared statements. This was
happening because the unsigned flags wasn't being updated when
converting the user variable is converted to a parameter.

The solution is to copy the unsigned flag when converting the
user variable to a parameter and take the unsigned flag into
account when converting the integer to a string.


mysql-test/r/binlog.result:
  Add test case result for Bug#33798
mysql-test/r/ps.result:
  Add test case result for Bug#33798
mysql-test/t/binlog.test:
  Add test case for Bug#33798
mysql-test/t/ps.test:
  Add test case for Bug#33798
sql/item.cc:
  Take the unsigned flag into account when converting the
  user variable.
2008-02-08 08:55:55 -02:00
unknown
d8eab97693 Bug#31590: Wrong error message on sort buffer being too small.
The out of memory error was thrown when the sort buffer size were too small.
This led to a user confusion.

Now filesort throws the error message about sort buffer being too small.


mysql-test/t/order_by.test:
  Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
mysql-test/r/order_by.result:
  Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
sql/filesort.cc:
  Bug#31590: Wrong error message on sort buffer being too small.
  Now filesort throws the error message about sort buffer being too small
  instead of out of memory error.
2008-02-08 13:35:00 +03:00
unknown
178f33e05b Merge pilot.mysql.com:/data/msvensson/mysql/bug31004/my50-bug31004
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-runtime


client/mysqltest.c:
  Auto merged
2008-02-07 12:42:49 +01:00
unknown
1027a2a630 Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 11:13:03 +04:00
unknown
a4eaf17ccb innodb_mysql.test, variables.result, variables.test, innodb_mysql.result:
Minor post-fix for bug#34223.


mysql-test/r/innodb_mysql.result:
  Minor post-fix for bug#34223.
mysql-test/r/variables.result:
  Minor post-fix for bug#34223.
mysql-test/t/innodb_mysql.test:
  Minor post-fix for bug#34223.
mysql-test/t/variables.test:
  Minor post-fix for bug#34223.
2008-02-07 11:12:49 +04:00
unknown
65dfdcdfeb Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 04:57:21 +04:00
unknown
5cf3f53e42 Fixed bug#34223: Failure on assignment to my_innodb_autoextend_increment
and my_innodb_commit_concurrency global variables.

Type of the my_innodb_autoextend_increment and the
my_innodb_commit_concurrency variables has been changed to
GET_ULONG.



mysql-test/r/variables.result:
  Added test case for bug#34223.
mysql-test/t/variables.test:
  Added test case for bug#34223.
sql/mysqld.cc:
  Fixed bug#34223.
  Last update of the getopt_ull_limit_value function introduced
  a sanity check for a variable type (only GET_UINT or GET_ULONG
  are valid types).
  However, my_innodb_autoextend_increment and
  my_innodb_commit_concurrency are declared as GET_LONG.
  Call stack is: 
          sys_var_long_ptr_global::update()
          fix_unsigned()
          getopt_ull_limit_value()
  
  Type of the my_innodb_autoextend_increment and the
  my_innodb_commit_concurrency variables has been changed to
  GET_ULONG.
2008-02-07 04:14:50 +04:00
unknown
3891d43617 Fixed bug#30059.
Server handles truncation for assignment of too-long values
into CHAR/VARCHAR/TEXT columns in a different ways when the
truncated characters are spaces:
1. CHAR(N) columns silently ignore end-space truncation;
2. TEXT columns post a truncation warning/error in the
   non-strict/strict mode.
3. VARCHAR columns always post a truncation note in
   any mode.

Space truncation processing has been synchronised over
CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
columns has been propagated as standard.

Binary-encoded string/BLOB columns are not affected.


mysql-test/r/heap.result:
  Updated test case for bug#30059.
mysql-test/r/innodb.result:
  Updated test case for bug#30059.
mysql-test/r/myisam.result:
  Updated test case for bug#30059.
mysql-test/r/strict.result:
  Updated test case for bug#30059.
mysql-test/r/type_binary.result:
  Updated test case for bug#30059.
mysql-test/r/warnings.result:
  Added test case for bug#30059.
mysql-test/t/warnings.test:
  Added test case for bug#30059.
sql/field.cc:
  Fixed bug#30059.
  The report_data_too_long function was replaced with the
  Field_longstr::report_if_important_data method.
  
  The Field_string::store and the Field_blob::store
  methods was synchronized with the Field_varstring::store
  method.
  Changes:
  1. to CHAR(N): posting of space truncation note has been added
     in both (strict and non-strict) modes;
  2. to BLOBs: a check for space truncation has been added,
     a warning in the non-strict mode and an error message in
     the strict mode have been replaced with a truncation note.
  
  Similar parts of Field_string::store, Field_blob::store and
  Field_varstring::store have been moved to the
  Field_longstr::report_if_important_data method.
sql/field.h:
  Fixed bug#30059.
  The Field_longstr::report_if_important_data method has been declared.
2008-02-07 02:33:21 +04:00
unknown
86260ead5a Fixes to make rpl_user test pass in pushbuild.
mysql-test/t/rpl_user.test:
  Removing redundant reset master and deleting users from master
  and slave without using binary log.
2008-02-04 12:22:37 +01:00
unknown
0a9fa8265b Again blanking out some numbers in file names that is dependent
on the context.


mysql-test/r/mysqlbinlog.result:
  Result file change.
mysql-test/t/mysqlbinlog.test:
  Blanking out yet some numbers in file names.
2008-02-01 17:26:28 +01:00
unknown
818358ed33 Fixes to make tests pass in pushbuild.
mysql-test/r/mysqlbinlog.result:
  Result file change.
mysql-test/t/mysqlbinlog.test:
  Fixing test to not be dependent on the sequence numbers
  for file names generated by mysqlbinlog.
2008-02-01 15:34:34 +01:00
unknown
d315117745 Various fixes to make tests pass on Windows.
mysql-test/r/mix_innodb_myisam_binlog.result:
  Result change
mysql-test/t/binlog_start_comment.test:
  Adding --local-load to mysqlbinlog to prevent it from failing
  on Windows. Also adding --short-form.
mysql-test/t/mix_innodb_myisam_binlog.test:
  Extending LIKE pattern to use either \n or \r\n in order to work
  on Windows.
2008-02-01 13:18:27 +01:00
unknown
1b15018547 Changes to make tests pass on vanilla build.
mysql-test/t/binlog_start_comment.test:
  Adding --local-infile=1 to enable local infile for mysql client.
2008-02-01 10:46:02 +01:00
unknown
1919d238e5 Merge mbp.local:/Users/kaa/src/opt/bug25162/my50-bug25162
into  mbp.local:/Users/kaa/src/opt/mysql-5.0-opt
2008-02-01 13:37:22 +05:00
unknown
4d794c2334 Fix for bug #25162: Backing up DB from 5.1 adds 'USING BTREE' to KEYs
on table creates

The problem was in incompatible syntax for key definition in CREATE
TABLE.

5.0 supports only the following syntax for key definition (see "CREATE
TABLE syntax" in the manual):

{INDEX|KEY} [index_name] [index_type] (index_col_name,...)

While 5.1 parser supports the above syntax, the "preferred" syntax was
changed to:

{INDEX|KEY} [index_name] (index_col_name,...) [index_type]

The above syntax is used in 5.1 for the SHOW CREATE TABLE output, which
led to dumps generated by 5.1 being incompatible with 5.0.

Fixed by changing the parser in 5.0 to support both 5.0 and 5.1 syntax
for key definition.


mysql-test/r/create.result:
  Added a test case for bug #25162.
mysql-test/t/create.test:
  Added a test case for bug #25162.
sql/sql_yacc.yy:
  Changed the parser to support both 5.0 and 5.1 syntax for index type
  specification in CREATE TABLE.
2008-02-01 13:00:40 +05:00
unknown
754c3f51ec Bug#30787: Stored function ignores user defined alias.
Simple subselects are pulled into upper selects. This operation substitutes the
pulled subselect for the first item from the select list of the subselect.
If an alias is defined for a subselect it is inherited by the replacement item.
As this is done after fix_fields phase this alias isn't showed if the
replacement item is a stored function. This happens because the Item_func_sp::make_field
function makes send field from its result_field and ignores the defined alias.

Now when an alias is defined the Item_func_sp::make_field function sets it for
the returned field.


mysql-test/t/sp.test:
  Added a test case for the bug#30787: Stored function ignores user defined alias.
mysql-test/r/sp.result:
  Added a test case for the bug#30787: Stored function ignores user defined alias.
sql/item_func.cc:
  Bug#30787: Stored function ignores user defined alias.
  Now when an alias is defined the Item_func_sp::make_field function sets it for
  the returned field.
2008-01-31 23:46:26 +03:00
unknown
dc8e43edb5 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


include/my_sys.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2008-01-31 16:15:46 +01:00
unknown
1fa5131888 Changes to fix tests in pushbuild.
mysql-test/include/have_local_infile.inc:
  BitKeeper file /data0/mkindahl/mysql-5.0-rpl-merge/mysql-test/include/have_local_infile.inc
mysql-test/r/have_local_infile.require:
  BitKeeper file /data0/mkindahl/mysql-5.0-rpl-merge/mysql-test/r/have_local_infile.require
mysql-test/t/binlog_start_comment.test:
  Test requires that local_infile is on, so added require for that.
mysql-test/t/rpl_sp.test:
  Adding missing sync_slave_with_master causing following tests to fail.
2008-01-31 12:17:40 +01:00
unknown
79f2096460 Disabling rpl_transaction test for non-debug builds.
mysql-test/t/rpl_transaction.test:
  Test only works for debug build.
2008-01-30 18:24:28 +01:00
unknown
55fbcacfa6 Changes to make tests pass in pushbuild.
mysql-test/r/bdb_notembedded.result:
  Result change.
mysql-test/r/rpl_loaddata_map.result:
  Result change.
mysql-test/t/rpl_loaddata_map.test:
  Blanking out file id as well.
2008-01-30 15:58:35 +01:00
unknown
206770562d Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


include/my_sys.h:
  Auto merged
mysql-test/r/blackhole.result:
  Auto merged
mysql-test/r/case.result:
  Auto merged
mysql-test/r/mysqlbinlog2.result:
  Auto merged
mysql-test/t/blackhole.test:
  Auto merged
mysql-test/t/case.test:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2008-01-30 11:25:54 +01:00
unknown
32f5920676 Fix test case for Bug #25347 so that it actually tests the code fix,
and so that it works correctly on Windows.


mysql-test/r/mysqlcheck.result:
  Flush tables before monkeying around with underlying MyISAM data files
mysql-test/t/mysqlcheck.test:
  Fix the test case for bug #25347 so that it actually does test the behavior.
  Also, this makes it work on Windows by ensuring that mysqld doesn't hold the
  underlying MyISAM files open while we try to corrupt them on disk.
  
  Flush tables before monkeying around with underlying MyISAM data files;
  --use-frm, so that mysqlcheck will succeed.
2008-01-27 14:28:50 -07:00
unknown
e30a0dda8f Fixed bug #33833.
Two disjuncts containing equalities of the form key=const1 and key=const2 can
be merged into one if const1 is equal to const2. To check it the common 
collation of the constants were used rather than the collation of the field key.
For example when the default collation of the constants was cases insensitive
while the collation of the field was case sensitive, then two or-ed equality 
predicates key='b' and key='B' incorrectly were merged into one f='b'. As a 
result ref access was used instead of range access and wrong result sets were 
returned in many cases. 
Fixed the problem by comparing constant in the or-ed predicate with collation of
the key field.


mysql-test/r/range.result:
  Added a test case for bug #33833.
mysql-test/t/range.test:
  Added a test case for bug #33833.
sql/item.cc:
  Fixed bug #33833.
  Added the method eq_by_collation that compares two items almost as 
  the method Item::eq, but it rather enforces a given collation for
  the comparison.
sql/item.h:
  Fixed bug #33833.
  Added the method eq_by_collation that compares two items almost as 
  the method Item::eq, but it rather enforces a given collation for
  the comparison.
2008-01-26 21:45:35 -08:00
unknown
9dbd3877b5 Un-break test case on Windows, for bug #25347
mysql-test/t/mysqlcheck.test:
  Use --remove_file and --write_file instead of --exec rm and --exec touch.
2008-01-25 16:00:15 -07:00