Commit graph

69595 commits

Author SHA1 Message Date
Jimmy Yang
8b72b93611 Add two tests for "innodb_large_prefix" and "innodb_force_load_corrupted" in
sys_vars test suite.
2011-08-16 20:51:40 -07:00
Jimmy Yang
177d8b0c12 Fix bug #11830883, SUPPORT "CORRUPTED" BIT FOR INNODB TABLES AND INDEXES.
Also addressed issues in bug #11745133, where we could mark a table
corrupted instead of crashing the server when found a corrupted buffer/page
if the table created with innodb_file_per_table on.
2011-08-16 18:07:59 -07:00
Sneha Modi
049225eb57 Fixing a few broken tests. 2011-08-16 16:06:34 +05:30
Joerg Bruehe
2922266522 Null-merge,
conflict on "configure.in" which is gone from 5.5.
No change.
2011-08-15 20:56:27 +02:00
Joerg Bruehe
80afd9768b Null merge for pushing. 2011-08-15 20:43:11 +02:00
Joerg Bruehe
72daf267df Merge bug#47337 for pushing into 5.1 2011-08-15 20:41:17 +02:00
Marko Mäkelä
065f18630f Merge mysql-5.1 to mysql-5.5. Add a test case. 2011-08-15 12:18:34 +03:00
Marko Mäkelä
d5c3640064 Bug #11766591 59733: Possible deadlock when buffered changes are to be
discarded in buf_page_create()

This bug turned out to be a false alarm, a bug in the UNIV_SYNC_DEBUG
diagnostic code. Because of this, the patch was not backported to the
built-in InnoDB in MySQL 5.1. Furthermore, there is no test case for
InnoDB Plugin in MySQL 5.1, because the delete buffering in MySQL 5.5
makes triggering the failure much easier.

When a freed page for which there exist orphaned buffered changes is
allocated and reused for something else, buf_page_create() will discard
the buffered changes by invoking ibuf_merge_or_delete_for_page().
This would violate the InnoDB latching order.

Tweak the latching order as follows. Move SYNC_IBUF_MUTEX below
SYNC_FSP_PAGE, where it logically belongs, and assign new latching
levels for the ibuf->index->lock and the insert buffer B-tree pages:

#define SYNC_IBUF_MUTEX		370	/* ibuf_mutex */
#define SYNC_IBUF_INDEX_TREE	360
#define SYNC_IBUF_TREE_NODE_NEW	359
#define SYNC_IBUF_TREE_NODE	358

btr_block_get(), btr_page_get(): In UNIV_SYNC_DEBUG, add the parameter
"index" for determining the appropriate latching order
(SYNC_IBUF_TREE_NODE or SYNC_TREE_NODE).

btr_page_alloc_for_ibuf(), btr_create(): Use SYNC_IBUF_TREE_NODE_NEW
instead of SYNC_TREE_NODE_NEW for insert buffer pages.

btr_cur_search_to_nth_level(), btr_pcur_restore_position_func(): Use
SYNC_IBUF_TREE_NODE instead of SYNC_TREE_NODE for insert buffer pages.

btr_search_guess_on_hash(): Assert that the index is not an insert buffer tree.

dict_index_add_to_cache(): Use SYNC_IBUF_INDEX_TREE for the insert
buffer tree (ibuf->index->lock).

ibuf0ibuf.c: Use SYNC_IBUF_TREE_NODE or SYNC_IBUF_TREE_NODE_NEW for
all B-tree pages.

ibuf_merge_or_delete_for_page(): Assert that the user page is
BUF_IO_READ fixed. Only in this way it is OK to latch it as
SYNC_IBUF_TREE_NODE instead of the proper SYNC_TREE_NODE (which would
violate the changed latching order).

sync_thread_add_level(): Remove the special tweak for
SYNC_IBUF_MUTEX. Add rules for the added latching levels.

rb:591 approved by Jimmy Yang
2011-08-15 12:11:43 +03:00
Georgi Kodinov
8d4d67c7ed Bug #12777649: "OS THREAD ID" REMOVED
Pushed Calvin's patch.
2011-08-12 16:50:04 +03:00
Georgi Kodinov
dbf6c934df merged the version bump. bumped the 5.5 version to 5.5.17 2011-08-12 14:25:36 +03:00
Georgi Kodinov
6046cb7bc9 bumped the version to 5.1.60 2011-08-12 14:20:17 +03:00
Bjorn Munch
6099fc0e89 Small followup fix to WL 5710:
Test mysql_plugin failed if version string ended in -mN
2011-08-12 12:49:38 +02:00
Dmitry Lenev
5a57986384 Fix for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD
FOR CERTAIN QUERIES TO INFORMATION_SCHEMA".

The problem was that metadata locking subsystem introduced
too much overhead for queries to I_S which were processed by
opening only .FRM or .TRG files and had to scanned a lot of
tables (e.g. SELECT COUNT(*) FROM I_S.TRIGGERS was affected). 
The same effect was not observed for similar queries which 
performed full-blown table open in order to fill I_S table.

The problem stemmed from the fact that in case when I_S 
implementation opened only .FRM or .TRG file for each table 
processed it didn't release metadata lock it has acquired on 
the table after finishing its processing. As result, list
of acquired metadata locks were growing until the end of 
statement. Since acquisition of each new lock required 
search in the list of already acquired locks performance
degraded.

The same effect is not observed when I_S implementation
performs full-blown table open for each table being
processed, as in the latter cases metadata lock on the
table is released right after table processing.

This fix addressed the problem by ensuring that I_S 
implementation releases metadata lock after processing
the table in both cases of full-blown table open and in 
case when only .FRM or .TRG file is read.
2011-08-11 19:58:49 +04:00
Tatjana Azundris Nuernberg
11ead0c50e auto-merge 2011-08-11 13:11:34 +01:00
Tatjana Azundris Nuernberg
df14229c99 auto-merge 2011-08-11 13:09:45 +01:00
Tatjana Azundris Nuernberg
44a063ed7f auto-merge 2011-08-11 12:27:36 +01:00
Tatjana Azundris Nuernberg
9771919259 auto-merge 2011-08-11 12:24:46 +01:00
Tatjana Azundris Nuernberg
c27b7a2276 auto-merge 2011-08-11 12:21:50 +01:00
Tatjana Azundris Nuernberg
c9576d742b maintain behavior introduced in fix for MySQL bug 35765
(avert regression)
2011-08-11 09:34:16 +01:00
Chuck Bell
4869635b88 WL#5710 : enable and disable plugins
Merge with main prior to pushing to mysql-5.5.
2011-08-10 14:39:49 -04:00
Marko Mäkelä
20f6da0ad7 Merge from mysql-5.5 to local tree. 2011-08-10 13:50:27 +03:00
Vinay Fisrekar
24b4f40bf6 Committing Change On behalf Of Sneha Modi
Bug#12664445 - SYS_VARS.ALL_VARS: WRONG RESULTS RECORDED IN RESULT FILE - TEST CASES MISSING! 
      
The bug had missing test cases for three system variables. 
Test cases have been added for these variables:
'INNODB_FILE_FORMAT_MAX' 
'INNODB_ROLLBACK_SEGMENTS'
'INNODB_STATS_METHOD'
      
The 'sys_vars.all_vars' result file now looks like this:
      
select variable_name as `There should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
There should be *no* variables listed below:
      
INNODB_LARGE_PREFIX
INNODB_LARGE_PREFIX
      
The variable 'INNODB_LARGE_PREFIX' is a newly added variable for MySQL 5.6.3 and the test will be added later by the developer.
2011-08-10 15:50:48 +05:30
Marko Mäkelä
aac279c5d5 Merge mysql-5.1 to mysql-5.5. 2011-08-10 12:58:22 +03:00
Marko Mäkelä
1ba7ae7537 Bug#12835650 VARCHAR maximum length performance impact
row_sel_field_store_in_mysql_format(): Do not pad the unused part of
the buffer reserved for a True VARCHAR column (introduced in 5.0.3).
Add Valgrind instrumentation ensuring that the unused part will be
flagged uninitialized.

row_sel_copy_cached_field_for_mysql(): New function: Copy a field
that is in the MySQL row format, not copying the unused tail of
VARCHAR columns.

row_sel_pop_cached_row_for_mysql(): Invoke
row_sel_copy_cached_field_for_mysql() for copying fields.
When the row is long, copy it field-by-field.

rb:715 approved by Inaam Rana
2011-08-10 12:25:24 +03:00
Chuck Bell
916d7c9c51 WL#5710 : enable and disable plugins
This patch corrects an error in the test to ensure the proper path
is used for the --mysqld option.
2011-08-09 15:09:28 -04:00
Chuck Bell
bfefb55272 WL#5710 : enable and disable plugins
This patch corrects a problem found in PB. Some platforms have very
different locations for the mysql installation. The client was not
able to find either my_print_defaults or mysqld predictably.

The patch adds two new command options --mysqld and --my-print-defaults
which can be used to provide the location of mysqld and
my_print_defaults by providing the paths.

The patch also changes the concatenation of the soname extension to
fix a problem found on some Ubuntu systems.

The patch contains changes to the test to ensure it will run on all
platforms. A trap is set in the test to skip testing if the location
of mysqld, my_print_defaults, or the daemon_example.ini files cannot
be determined.
2011-08-09 08:58:18 -04:00
Tatjana Azundris Nuernberg
be6f501f47 manual merge 2011-08-08 17:45:43 +01:00
Tatjana Azundris Nuernberg
4a0516a70a auto merge 2011-08-08 17:24:43 +01:00
Tatjana Azundris Nuernberg
9f9dfff963 merge 2011-08-08 13:17:01 +01:00
Sneha Modi
f24f0b99e3 Recommitting the changes to push the code. 2011-08-08 17:01:09 +05:30
Marko Mäkelä
337d7935d9 Merge mysql-5.1 to mysql-5.5. 2011-08-08 12:16:15 +03:00
Marko Mäkelä
7e8d625b79 Bug#12770537 I_S.TABLES.DATA_LENGTH does not show on-disk size
for compressed InnoDB tables

ha_innodb::info_low(): For calculating data_length or index_length,
use the compressed page size for compressed tables instead of UNIV_PAGE_SIZE.

rb:714 approved by Sunny Bains
2011-08-08 11:22:18 +03:00
hery.ramilison@oracle.com
6c821acddd fixing BUG 11759958 - 52319: MYSQL RHEL5 RPMS DO NOT REQUIRE NET-TOOLS 2011-08-06 01:51:25 +02:00
Gleb Shchepa
1392945b60 backport from mysql-trunk
BUG #11754979 - 46675: ON DUPLICATE KEY UPDATE AND UPDATECOUNT() POSSIBLY WRONG 

The mysql_affected_rows() client call returns 3 instead of 2 on
INSERT ... ON DUPLICATE KEY UPDATE query with a duplicated key value.

The fix for the old bug #29692 was incomplete: unnecessary double
increment of "touched" rows still happened.

This bugfix removes:
1) unneeded increment of "touched" rows and
2) useless double resetting of auto-increment value.
2011-08-03 17:53:44 +04:00
Sergey Glukhov
6ac689fb4a 5.1 -> 5.5 merge 2011-08-02 11:54:35 +04:00
Sergey Glukhov
de3693a1cd Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
There is an optimization of DISTINCT in JOIN::optimize()
which depends on THD::used_tables value. Each SELECT statement
inside SP resets used_tables value(see mysql_select()) and it
leads to wrong result. The fix is to replace THD::used_tables
with LEX::used_tables.
2011-08-02 11:33:45 +04:00
hery.ramilison@oracle.com
07b95519dd Merge from mysql-5.5.15-release 2011-07-28 19:14:12 +02:00
Sven Sandberg
cd4a48d8b6 Null merge 2011-07-27 12:37:27 +02:00
Sven Sandberg
e1643f98fe Updated default.experimental; now rpl tests are up to date as of 2011-07-25. 2011-07-27 12:36:33 +02:00
Sven Sandberg
7841c3f574 Updated default.experimental; now rpl tests are up to date as of 2011-07-25. 2011-07-27 12:35:44 +02:00
Sergey Glukhov
f6b68c7d82 5.1 -> 5.5 merge 2011-07-27 12:51:55 +04:00
Sergey Glukhov
75eaa30d26 Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
The problem is that TIME_FUZZY_DATE is explicitly used for get_arg0_date()
function in Item_date_typecast::get_date method. The fix is to use real
fuzzy_date value.
2011-07-27 12:34:25 +04:00
Chuck Bell
127d4f2e13 WL#5710: enable and disable plugins
This patch corrects a problem found in pushbuild with the stat()
method on some platforms. The code was changed to use my_stat()
instead.

Also adds mysql_plugin to the mysql.spec.sh file for packaging.
2011-07-25 15:30:24 -04:00
Alfranio Correia
f2c7452f1c Post-push fix for BUG#11809016.
In 5.5, REFRESH SLAVE is used as an alias for RESET SLAVE and
was removed in 5.6. Reseting a slave through REFRESH SLAVE was
causing errors in the valgrind platform since reset_slave_info
was undefined.

To fix the problem, we have set reset_slave_info while calling
REFRESH SLAVE.
2011-07-24 12:26:58 +01:00
Dmitry Lenev
9fe60b4d5b Fix for bug #11754210 - "45777: CHECK TABLE DOESN'T
SHOW ALL PROBLEMS FOR MERGE TABLE COMPLIANCE IN 5.1".

The problem was that CHECK/REPAIR TABLE for a MERGE table which
had several children missing or in wrong engine reported only
issue with the first such table in its result-set. While in 5.0
this statement returned the whole list of problematic tables.

Ability to report problems for all children was lost during
significant refactorings of MERGE code which were done as part
of work on 5.1 and 5.5 releases.

This patch restores status quo ante refactorings by changing
code in such a way that:
1) Failure to open child table due to its absence during CHECK/
   REPAIR TABLE for a MERGE table is not reported immediately
   when its absence is discovered in open_tables(). Instead
   handling/error reporting in such a situation is postponed
   until the moment when children are attached.
2) Code performing attaching of children no longer stops when
   it encounters first problem with one of the children during
   CHECK/REPAIR TABLE. Instead it continues iteration through
   the child list until all problems caused by child absence/
   wrong engine are reported.

Note that even after this change problem with mismatch of
child/parent definition won't be reported if there is also
another child missing, but this is how it was in 5.0 as well.
2011-07-22 16:31:10 +04:00
Sunanda Menon
c8519150b4 Bug #12561297: Added the MySQL embedded binary 2011-07-22 10:34:45 +02:00
Alexander Nozdrin
f636987d3b Manual merge from mysql-5.1. 2011-07-22 11:50:44 +04:00
Alexander Nozdrin
c4dad60a73 Manual merge from mysql-5.0. 2011-07-22 11:46:45 +04:00
Alexander Nozdrin
f7618904bf For for Bug#12696072: FIX OUTDATED COPYRIGHT NOTICES IN RUNTIME RELATED CLIENT
TOOLS

Backport a fix for Bug 57094 from 5.5.
The following revision was backported:

# revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
# parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48
# committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
# branch nick: mysql-5.5-bugteam-bug57094
# timestamp: Wed 2010-10-06 19:06:13 +0400
# message:
#   Fix for Bug 57094 (Copyright notice incorrect?).
#   
#   The fix is to:
#     - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
#       to specify copyright notice;
#     - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
#       in programs.
2011-07-22 11:45:15 +04:00
Chuck Bell
2bfb07c85b WL#5710 : enable and disable plugins
Added additional search path of /bin for finding tools.
2011-07-21 17:46:20 -04:00