Commit graph

12 commits

Author SHA1 Message Date
unknown
4d0ef0cc85 Backport of the 5.0 patch to 4.1
Bug#28878: InnoDB tables with UTF8 character set and indexes cause  wrong result for DML
When making key reference buffers over CHAR fields whitespace (0x20) must be used to fill in the remaining space in the field's buffer. This is what Field_string::store() does. Fixed Field_string::get_key_image() to do the same.


mysql-test/r/innodb_mysql.result:
  Bug#28878: test case
mysql-test/t/innodb_mysql.test:
  Bug#28878: test case
sql/field.cc:
  Bug#28878: Fill with space instead of binary zeros.
2007-10-04 14:22:35 +04:00
unknown
8762539d47 Fixed bug #28272: crash that occurs when running an EXPLAIN command
for a query over an empty table right after its creation. 
The crash is the result of an attempt made by JOIN::optimize to evaluate
the WHERE condition when no records have been actually read.
The added test case can reproduce the crash only with InnoDB tables and
only with 5.0.x.
 


mysql-test/r/innodb_mysql.result:
  Added a test case for bug #28272.
mysql-test/t/innodb_mysql.test:
  Added a test case for bug #28272.
sql/sql_select.cc:
  Fixed bug #28272: crash that occurs when running an EXPLAIN command
  for a query over an empty table right after its creation. 
  The crash is the result of an attempt made by JOIN::optimize to evaluate
  the WHERE condition when no records have been actually read.
  Such attempts could be observed only with EXPLAIN commands.
  Now at the optimization phase the WHERE condition is never evaluated if 
  there is no record previously read from the table.
2007-05-14 23:55:18 -07:00
unknown
98c0da4ed5 Fixed bug #13191.
INSERT...ON DUPLICATE KEY UPDATE may cause error 1032: 
"Can't find record in ..." if we are inserting into
InnoDB table unique index of partial key with
underlying UTF-8 string field.

This error occurs because INSERT...ON DUPLICATE uses a wrong
procedure to copy string fields of multi-byte character sets
for index search.


mysql-test/t/innodb_mysql.test:
  Added test case for bug #13191.
mysql-test/r/innodb_mysql.result:
  Added test case for bug #13191.
sql/field.h:
  Fixed bug #13191.
  Field_string::get_key_image() virtual function was overloaded
  to implement copying of variable length character (UTF-8) fields.
  Field::get_key_image() function prototype has been changed to
  return byte size of copied data.
sql/field.cc:
  Fixed bug #13191.
  Field_string::get_key_image() virtual function was overloaded
  to implement copying of variable length character (UTF-8) fields.
  Field::get_key_image() function prototype has been changed to
  return byte size of copied data.
sql/key.cc:
  Fixed bug #13191.
  INSERT...ON DUPLICATE KEY UPDATE may cause error 1032: 
  "Can't find record in ...".
  This error occurs because INSERT...ON DUPLICATE uses
  a wrong procedure to copy field parts for index search.
  key_copy() function has been fixed.
2007-04-29 04:16:17 +05:00
unknown
e1a722b2d3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint


configure.in:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
myisam/sort.c:
  Manual merge.
mysql-test/r/innodb_mysql.result:
  Manual merge.
mysql-test/t/innodb_mysql.test:
  Manual merge.
mysys/mf_iocache.c:
  Manual merge.
2006-11-02 17:27:42 -05:00
unknown
e3d49f0c3f BUG#18819: DELETE IGNORE hangs on foreign key parent delete
If the error happens during DELETE IGNORE, nothing could be send to the
client, thus leaving it frozen expecting the reply.

The problem was that if some error occurred, it wouldn't be reported to
the client because of IGNORE, but neither success would be reported.

MySQL 4.1 would not freeze the client, but will report

  ERROR 1105 (HY000): Unknown error

instead, which is also a bug.

The solution is to report success if we are in DELETE IGNORE and some
non-fatal error has happened.


mysql-test/r/innodb_mysql.result:
  Add result for bug#18819: DELETE IGNORE hangs on foreign key parent
  delete.
mysql-test/t/innodb_mysql.test:
  Add test case for bug#18819: DELETE IGNORE hangs on foreign key parent
  delete.
sql/sql_delete.cc:
  Report success if we have got an error, but we are in DELETE IGNORE, and
  the error is not fatal (if it is, it would be reported to the client).
2006-10-25 19:53:26 +04:00
unknown
72a997c0ea Merge polly.local:/tmp/maint/bug22728/my41-bug22728
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk


sql/handler.cc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Manually merged
mysql-test/t/innodb_mysql.test:
  Manually merged
2006-10-12 13:39:52 +04:00
unknown
ca126a2bbd Fix for bug #22728 "Handler_rollback value is growing".
The bug is present only in 4.1, will be null-merged to 5.0

For InnoDB, check value of thd->transaction.all.innodb_active_trans instead of thd->transaction.stmt.innobase_tid to see if we really need to rollback.


mysql-test/r/innodb_mysql.result:
  Added testcase for bug #22728 "Handler_rollback value is growing"
mysql-test/t/innodb_mysql.test:
  Added testcase for bug #22728 "Handler_rollback value is growing"
sql/handler.cc:
  For InnoDB, check value of thd->transaction.all.innodb_active_trans instead of thd->transaction.stmt.innobase_tid to see if we really need to rollback.
2006-10-11 12:44:03 +04:00
unknown
9907e970ae BUG#21077: Possible crash caused by invalid sequence of handler::* calls:
The crash was caused by invalid sequence of handler::** calls:                                                           
  ha_smth->index_init();                                                                                                 
  ha_smth->index_next_same(); (2)                                                                                        
(2) is an invalid call as it was not preceeded by any 'scan setup' call
like index_first() or index_read(). The cause was that QUICK_SELECT::reset()
didn't "fully reset" the quick select- current QUICK_RANGE wasn't forgotten,
and quick select might attempt to continue reading the range, which would
result in the above mentioned invalid sequence of handler calls.

5.x versions are not affected by the bug - they already have the missing
"range=NULL" clause.                                                    
                                                       


mysql-test/r/innodb_mysql.result:
  Testcase for BUG#21077
mysql-test/t/innodb_mysql.test:
  Testcase for BUG#21077
sql/opt_range.h:
  BUG#21077: Possible crash caused by invalid sequence of handler::* calls:                                              
   - Make QUICK_SELECT::reset() really reset the quick select
2006-08-15 20:33:14 +04:00
unknown
4144543006 Bug #17212 results not sorted correctly by ORDER BY when using index
* don't use join cache when the incoming data set is already ordered
    for ORDER BY
    This choice must be made because join cache will effectively
    reverse the join order and the results will be sorted by the index
    of the table that uses join cache.


mysql-test/r/innodb_mysql.result:
  Bug #17212 results not sorted correctly by ORDER BY when using index
    * Test suite for the bug
mysql-test/t/innodb_mysql.test:
  Bug #17212 results not sorted correctly by ORDER BY when using index
    * Test suite for the bug
sql/sql_select.cc:
  Bug #17212 results not sorted correctly by ORDER BY when using index
    * don't use join cache when the incoming data set is already sorted
2006-07-12 10:57:38 +03:00
unknown
c13144722a BUG#16798: Inapplicable ref_or_null query plan and bad query result on random occasions
The bug was as follows: When merge_key_fields() encounters "t.key=X OR t.key=Y" it will 
try to join them into ref_or_null access via "t.key=X OR NULL". In order to make this 
inference it checks if Y<=>NULL, ignoring the fact that value of Y may be not yet known.

The fix is that the check if Y<=>NULL is made only if value of Y is known (i.e. it is a
constant).
TODO: When merging to 5.0, replace used_tables() with const_item() everywhere in merge_key_fields().


mysql-test/r/innodb_mysql.result:
  Testcase for BUG16798
mysql-test/t/innodb_mysql.test:
  Testcase for BUG16798
sql/sql_select.cc:
  BUG#16798: Inapplicable ref_or_null query plan and bad query result on random occasions 
  In merge_key_fields() don't call val->is_null() if the value of val is not known.
2006-05-06 13:15:00 +04:00
unknown
c2e6c898ac Make innodb_mysql produce a non-empty output.
mysql-test/r/innodb_mysql.result:
  Fix result.
2006-04-26 11:15:09 +04:00
unknown
a4c62dbb8a Files innodb.[test|result] are to be used by Innobase only.
Use files innodb_mysql.[test|result] instead.


mysql-test/t/innodb.test:
  This file is to be used by Innobase only.
mysql-test/r/innodb_mysql.result:
  New BitKeeper file ``mysql-test/r/innodb_mysql.result''
   Use this file instead of innodb.result.
mysql-test/t/innodb_mysql.test:
  New BitKeeper file ``mysql-test/t/innodb_mysql.test''
   Use this file instead of innodb.test.
2006-04-26 09:51:57 +04:00