Commit graph

62739 commits

Author SHA1 Message Date
Sergey Glukhov
278ae9a8d5 Bug#53334 Incorrect result for InnoDB in LEFT JOIN with impossible condition
The fix actually reverts the change introduced
by the patch for bug 51494.
The fact is that patches for bugs 52177&48419
fix bugs 51194&50575 as well.



mysql-test/r/innodb_mysql.result:
  test case
mysql-test/t/innodb_mysql.test:
  test case
sql/sql_select.cc:
  reverted wrong fix for bug 51494
2010-05-07 10:38:42 +05:00
Gleb Shchepa
bd2a517b23 Bug #53088: mysqldump with -T & --default-character-set set
truncates text/blob to 766 chars

mysqldump and SELECT ... INTO OUTFILE truncated long BLOB/TEXT
values to size of 766 bytes (MAX_FIELD_WIDTH or 255 * 3 + 1).

The select_export::send_data method has been modified to
reallocate a conversion buffer for long field data.


mysql-test/r/mysqldump.result:
  Test case for bug #53088.
mysql-test/r/outfile_loaddata.result:
  Test case for bug #53088.
mysql-test/t/mysqldump.test:
  Test case for bug #53088.
mysql-test/t/outfile_loaddata.test:
  Test case for bug #53088.
sql/sql_class.cc:
  Bug #53088: mysqldump with -T & --default-character-set set
              truncates text/blob to 766 chars
  
  The select_export::send_data method has been modified to
  reallocate a conversion buffer for long field data.
2010-05-07 00:41:37 +04:00
Karen Langford
af6d89a6aa Merge 2010-05-06 17:14:10 +02:00
Martin Hansson
0c82d3f3f4 Merge of fix for Bug#52357 2010-05-06 10:59:28 +02:00
Martin Hansson
1eada91053 Bug#52357: Assertion failed: join->best_read in
greedy_search optimizer_search_depth=0

The algorithm inside restore_prev_nj_state failed to
properly update the counters within the NESTED_JOIN
tree. The counter was decremented each time a table in the
node was removed from the QEP, the correct thing to do being
only to decrement it when the last table in the child node
was removed from the plan. This lead to node counters
getting negative values and the plan thus appeared
impossible. An assertion caught this.

Fixed by not recursing up the tree unless the last table in
the join nest node is removed from the plan
2010-05-06 10:45:00 +02:00
unknown
f908dc88bc Raise version number after cloning 5.1.47 2010-05-05 19:58:16 +02:00
Georgi Kodinov
43bb40e0ac tree name change 2010-05-05 17:57:53 +03:00
Sunanda Menon
c5bf05cd95 ------------------------------------------------------------
revno: 2861
committer: Georgi Kodinov <joro@sun.com>
branch nick: B53371-5.0-bugteam
timestamp: Mon 2010-05-03 18:16:51 +0300
message:
  Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants.
  
  The server was not checking the supplied to COM_FIELD_LIST table name
  for validity and compliance to acceptable table names standards.
  Fixed by checking the table name for compliance similar to how it's 
  normally checked by the parser and returning an error message if 
  it's not compliant.
2010-05-05 15:33:46 +02:00
Marko Mäkelä
326d75bd41 Merge a contribution from Ryan Mack at Facebook:
Bugfix for 53290, fast unique index creation fails on duplicate null values

    Summary:
    Bug in the fast index creation code incorrectly considers null
    values to be duplicates during block merging.  Innodb policy is that
    multiple null values are allowed in a unique index.  Null duplicates
    were correctly ignored while sorting individual blocks and with slow
    index creation.

    Test Plan:
    mtr, including new test, load dbs using deferred index creation

    DiffCamp Revision: 110840
    Reviewed By: mcallaghan
    CC: mcallaghan, mysql-devel@lists
    Revert Plan:
    OK
2010-05-05 15:39:01 +03:00
Marko Mäkelä
fa2c00d316 Re-enable ps_3innodb. 2010-05-05 15:05:55 +03:00
Marko Mäkelä
dc4abe9481 Document Bug #53256 2010-05-05 14:50:11 +03:00
Marko Mäkelä
3ea54dbfa9 Note the 1.0.7 release 2010-05-05 14:45:13 +03:00
Marko Mäkelä
3f8a812d7a row_merge_drop_temp_indexes(): Load the table via the dictionary cache.
Allow multiple indexes to be dropped. (Bug #53256)
2010-05-05 14:24:11 +03:00
Marko Mäkelä
415e5b282b Factor out innodb_multi_update.test from innodb.test 2010-05-05 13:44:25 +03:00
Marko Mäkelä
e73feed2d8 Factor out innodb_multi_update.test from innodb.test 2010-05-05 13:40:01 +03:00
Marko Mäkelä
356d3a6ddb Merge 2010-05-05 13:37:33 +03:00
Marko Mäkelä
d4b1117768 Add Valgrind diagnostics to track down Bug #38999. 2010-05-05 13:05:07 +03:00
Jimmy Yang
9141b67822 Update ChangeLog for bug fix of #53165 2010-05-05 03:02:19 -07:00
Marko Mäkelä
264942661b Add Valgrind diagnostics to track down Bug #38999. 2010-05-05 12:53:28 +03:00
Georgi Kodinov
aba66c6750 merge 2010-05-05 12:40:18 +03:00
Georgi Kodinov
c5b14cda44 tree name change 2010-05-05 12:38:59 +03:00
Georgi Kodinov
addd0a3e67 On behalf of Kristofer :
Bug#53417 my_getwd() makes assumptions on the buffer sizes which not always hold true
      
The mysys library contains many functions for rewriting file paths. Most of these
functions makes implicit assumptions on the buffer sizes they write to. If a path is put
in my_realpath() it will propagate to my_getwd() which assumes that the buffer holding
the path name is greater than 2. This is not true in cases.
      
In the special case where a VARBIN_ITEM is passed as argument to the LOAD_FILE function
this can lead to a crash.
      
This patch fixes the issue by introduce more safe guards agaist buffer overruns.
2010-05-05 11:54:52 +03:00
Jimmy Yang
6bc1a96b31 Port fix for 53165 to InnoDB 5.1 plugin. The change buffering options
are different in 5.1 comparing to that of 5.5, so a hand port is
necessary to avoid wrong default option to be set by a simple
branch merge.
2010-05-04 21:52:24 -07:00
Alfranio Correia
ed4819bbf7 merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-05-04 23:15:10 +01:00
Omer BarNir
fb47b30384 Updates to README file of the 'engines' test suites 2010-05-04 14:24:36 -07:00
Andrei Elkin
efcc90b6eb Bug #50942 mix_innodb_myisam_side_effects.test is not deterministic
The test was used to fail because of 
 UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
did not prescribe the order of two row operations implied by the update.

Fixed with forcing the order with adding a where condition w/o
affecting the former bug fixes logics.

mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test:
  implemented the bug page suggestion to make a test deterministic.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  results are updated and (!) corrected.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  results are updated
2010-05-04 22:31:49 +03:00
Georgi Kodinov
71b453fa06 Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants.
This is the 5.1 merge and extension of the fix.
The server was happily accepting paths in table name in all places a table
name is accepted (e.g. a SELECT). This allowed all users that have some 
privilege over some database to read all tables in all databases in all
mysql server instances that the server file system has access to.
Fixed by :
1. making sure no path elements are allowed in quoted table name when
constructing the path (note that the path symbols are still valid in table names
when they're properly escaped by the server).
2. checking the #mysql50# prefixed names the same way they're checked for
path elements in mysql-5.0.
2010-05-04 17:03:28 +03:00
Marko Mäkelä
322dda2397 Document Bug #53306 in the InnoDB Plugin ChangeLog. 2010-05-04 16:15:17 +03:00
Marko Mäkelä
304daa7431 fsp_init_file_page_low(): Zero out the page. (Bug #53306) 2010-05-04 16:13:58 +03:00
Marko Mäkelä
54b01fbff1 fsp_init_file_page_low(): Zero out the page. (Bug #53306) 2010-05-04 16:09:17 +03:00
Marko Mäkelä
6e5619be2c Add Valgrind checks to catch uninitialized writes to data files.
buf_flush_insert_into_flush_list(),
buf_flush_insert_sorted_into_flush_list(),
buf_flush_post_to_doublewrite_buf(): Check that the page is initialized.
2010-05-04 15:55:10 +03:00
Marko Mäkelä
19263724e4 Add Valgrind checks to catch uninitialized writes to data files.
buf_flush_insert_into_flush_list(),
buf_flush_insert_sorted_into_flush_list(),
buf_flush_post_to_doublewrite_buf(): Check that the page is initialized.
2010-05-04 15:47:44 +03:00
Mattias Jonsson
f33075fd16 merge 2010-05-04 14:26:44 +02:00
Marko Mäkelä
39be66c7ce Remove UNIV_BTR_AVOID_COPY. It was broken because btr_attach_half_pages()
would get the block, new_block in the wrong order.
Fixing that would have complicated the function even further
for this marginal case.
2010-05-04 13:55:46 +03:00
Alfranio Correia
3c30921662 BUG#43407 SET GLOBAL SQL_SLAVE_SKIP_COUNTER should log previous state in error log
When issuing a 'SET GLOBAL SQL_SLAVE_SKIP_COUNTER' statement, the previous
position along with the new position is dumped into the error log. Namely,
the following information is printed out: skip_counter, group_relay_log_name
and group_relay_log_pos.
2010-05-04 10:41:28 +01:00
Marko Mäkelä
4e76242675 btr_page_split_and_insert(): Correct the fix of Bug #52964.
When split_rec==NULL, choose the correct node pointer key (first_rec).
2010-05-04 12:31:28 +03:00
Alfranio Correia
819caf8eb8 BUG#43406 CHANGE MASTER TO should log previous state in error log
When issuing a 'CHANGE MASTER TO' statement, key elements of the previous
state, namely the host, port, the master_log_file and the master_log_pos
are dumped into the error log.
2010-05-04 10:17:20 +01:00
Kristofer Pettersson
95e712b0b7 Automerge 2010-05-03 19:21:09 +02:00
Kristofer Pettersson
5dd5d70506 Bug#50373 --secure-file-priv=""
Iterative patch improvement. Previously committed patch
caused wrong result on Windows. The previous patch also
broke secure_file_priv for symlinks since not all file
paths which must be compared against this variable are
normalized using the same norm.

The server variable opt_secure_file_priv wasn't
normalized properly and caused the operations
LOAD DATA INFILE .. INTO TABLE ..
and
SELECT load_file(..)
to do different interpretations of the 
--secure-file-priv option.
     
The patch moves code to the server initialization
routines so that the path always is normalized
once and only once.
      
It was also intended that setting the option
to an empty string should be equal to 
lifting all previously set restrictions. This
is also fixed by this patch.


mysql-test/r/loaddata.result:
  * Removed test code which will currently break the much used --mem feature of mtr.
mysql-test/t/loaddata.test:
  * Removed test code which will currently break the much used --mem feature of mtr.
sql/item_strfunc.cc:
  * Replaced string comparing code on opt_secure_file_priv with an interface which guarantees that both file paths are normalized using the same norm on all platforms.
sql/mysql_priv.h:
  * Added signature for is_secure_file_path()
sql/mysqld.cc:
  * New function for checking if a path compatible with the secure path restriction.
  * Added initialization of the opt_secure_file_priv variable.
sql/sql_class.cc:
  * Replaced string comparing code on opt_secure_file_priv with an interface which guarantees that both file paths are normalized using the same norm on all platforms.
sql/sql_load.cc:
  * Replaced string comparing code on opt_secure_file_priv with an interface which guarantees that both file paths are normalized using the same norm on all platforms.
2010-05-03 18:14:39 +02:00
Georgi Kodinov
f63608ea97 Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants.
The server was not checking the supplied to COM_FIELD_LIST table name
for validity and compliance to acceptable table names standards.
Fixed by checking the table name for compliance similar to how it's 
normally checked by the parser and returning an error message if 
it's not compliant.
2010-05-03 18:16:51 +03:00
Marko Mäkelä
7c4e538d76 buf_zip_decompress(): Allow BUF_NO_CHECKSUM_MAGIC as the stamped checksum.
buf_page_get_gen(): Assert that buf_zip_decompress() succeeds.
Callers are not prepared for a NULL return value. (Bug #53248)
2010-05-03 15:28:59 +03:00
unknown
1f3305f695 Raise version number after cloning 5.0.91 2010-05-03 12:06:18 +02:00
Georgi Kodinov
e038b56dab merged 5.1-innodb 2010-05-01 19:12:12 +03:00
Georgi Kodinov
037950e676 tree name change 2010-05-01 16:46:04 +03:00
Alexey Kopytov
26570994b2 Automerge. 2010-04-30 15:27:17 +04:00
Alexey Kopytov
97374a1184 Bug #48419: another explain crash..
WHERE predicates containing references to empty tables in a
subquery were handled incorrectly by the optimizer when
executing EXPLAIN. As a result, the optimizer could try to
evaluate such predicates rather than just stop with
"Impossible WHERE noticed after reading const tables" as 
it would do in a non-subquery case. This led to valgrind 
errors and crashes.

Fixed the code checking the above condition so that subqueries
are not excluded and hence are handled in the same way as top
level SELECTs.

mysql-test/r/explain.result:
  Added a test case for bug #48419.
mysql-test/r/ps.result:
  Updated test results to take the new (and more correct)
  "Extra" comments in execution plans.
mysql-test/t/explain.test:
  Added a test case for bug #48419.
sql/sql_select.cc:
  There is no point in excluding subqueries from checking
  for identically false WHERE conditions.
2010-04-30 15:10:48 +04:00
Vasil Dimov
3bffc40a24 Disable innodb.innodb, main.ps_3innodb and main.partition_innodb_plugin
mysql-tests because those emit (spurious?) valgrind warnings.
2010-04-30 13:02:36 +03:00
Davi Arnaut
4e378bc55b Manual merge. 2010-04-29 20:18:19 -03:00
Marko Makela
c144a091db recv_sys_init(), recv_sys_empty_hash(): Shrink recv_sys->addr_hash.
This addresses Bug #53122 in the built-in InnoDB.
2010-04-29 15:41:47 +02:00
Marko Makela
f10cf42068 recv_sys_init(), recv_sys_empty_hash(): Shrink recv_sys->addr_hash.
recv_addr_t: Turn space,page_no into bitfields to save space on 64-bit.
This addresses Bug #53122 in the InnoDB Plugin.
2010-04-29 15:37:50 +02:00