Commit graph

216 commits

Author SHA1 Message Date
Manish Kumar
be866add06 BUG#13333431 - INCORRECT DEFAULT PORT IN 'SHOW SLAVE HOSTS' OUTPUT
Problem - The default port number shown in SHOW SLAVE HOSTS is always 3306 
          though the slave is actually listening on a different port number.
          This is a problem as the user can not be sure whether this port 
          value can be trusted and so client trying to read replication 
          topology can get confused.

Fix - 3306 ceases to be the default value of report-port. Moreover report-port
      does not have a static default any longer.
      Instead we initialize report-port to 0 as the new default value and change
      it based on two checks :

      1) If report_port is not set, the slave reports the port number its listening 
         on. (i.e. if report-port is not set we get the actual value of the slave's 
         port number).

      2) If report-port is set, we show the value report-port is set to, as the slave's
         port number.
2012-02-28 14:02:27 +05:30
Dmitry Shulga
d460f1689d Fixed bug#11753187 (formerly known as bug 44585): SP_CACHE BEHAVES AS
MEMORY LEAK.

Background:
 - There are caches for stored functions and stored procedures (SP-cache);
 - There is no similar cache for events;
 - Triggers are cached together with TABLE objects;
 - Those SP-caches are per-session (i.e. specific to each session);
 - A stored routine is represented by a sp_head-instance internally;
 - SP-cache basically contains sp_head-objects of stored routines, which
   have been executed in a session;
 - sp_head-object is added into the SP-cache before the corresponding
   stored routine is executed;
 - SP-cache is flushed in the end of the session.

The problem was that SP-cache might grow without any limit. Although this
was not a pure memory leak (the SP-cache is flushed when session is closed),
this is still a problem, because the user might take much memory by
executing many stored routines.

The patch fixes this problem in the least-intrusive way. A soft limit
(similar to the size of table definition cache) is introduced. To represent
such limit the new runtime configuration parameter 'stored_program_cache'
is introduced. The value of this parameter is stored in the new global
variable stored_program_cache_size that used to control the size of SP-cache
to overflow. 

The parameter 'stored_program_cache' limits number of cached routines for
each thread. It has the following min/default/max values given from support:
  min = 256, default = 256, max = 512 * 1024.
Also it should be noted that this parameter limits the size of 
each cache (for stored procedures and for stored functions) separately.

The SP-cache size is checked after top-level statement is parsed.
If SP-cache size exceeds the limit specified by parameter
'stored_program_cache' then SP-cache is flushed and memory allocated for
cache objects is freed. Such approach allows to flush cache safely 
when there are dependencies among stored routines.
2012-01-25 15:59:30 +06:00
Georgi Kodinov
61df5de4fd merged bug #11754014 2012-01-17 11:38:34 +02:00
Georgi Kodinov
0e48b69cba Bug #11754014: 45549: udf plugin_dir path separator inconsistency
and cryptic error 1126 message

The problem was that dlopen() related code was using just a subset 
of the path normalization routines used in other places.
Fixed the expansion of the pre-dlopen() behavior for plugins and UDFs
to use a platform-dependent consistent encoding of the paths.
Fixed the error dlopen() error handling to take the correct error message
and strip off the trailing newline character(s).
Fixed tests to do a platform independent replace of directories and to 
account for the traling slash.
2012-01-16 12:04:28 +02:00
Sneha Modi
922b3adcf8 Bug#11748572:ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC
Setting query_cache_size to larger values might fail depending on the memory 
pressure being put on the system. This can be seen on pushbuild as the test 
case query_cache_size_basic tries to allocate a +3GB query cache, which 
succeeds in some machines and fails in others.

So this part of the code where the test case tries to allocate +3GB query cache has been 
disabled for now to get the test running on pb2.
2011-11-21 10:59:28 +05:30
Dmitry Lenev
02e1d6e606 Fix for bug#12695572 - "IMPROVE MDL PERFORMANCE IN PRE-VISTA
BY CACHING OR REDUCING CREATEEVENT CALLS".
 
5.5 versions of MySQL server performed worse than 5.1 versions 
under single-connection workload in autocommit mode on Windows XP.
 
Part of this slowdown can be attributed to overhead associated
with constant creation/destruction of MDL_lock objects in the MDL
subsystem. The problem is that creation/destruction of these
objects causes creation and destruction of associated
synchronization primitives, which are expensive on Windows XP.
 
This patch tries to alleviate this problem by introducing a cache
of unused MDL_object_lock objects. Instead of destroying such
objects we put them into the cache and then reuse with a new
key when creation of a new object is requested.

To limit the size of this cache, a new --metadata-locks-cache-size
start-up parameter was introduced.
2011-11-15 22:00:14 +04:00
Marko Mäkelä
4841d14341 Add missing sys_vars tests for InnoDB variables. 2012-01-16 16:39:05 +02:00
Sneha Modi
43721f354a Bug#11748572: ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC
Moving query_cache_size_basic_32.test and query_cache_size_basic_64.test from experimental
to disabled as a solution has still not been found.
2012-01-10 11:41:50 +05:30
Yasufumi Kinoshita
6938d8fd00 Bug#12400341 INNODB CAN LEAVE ORPHAN IBD FILES AROUND
If we meet DB_TOO_MANY_CONCURRENT_TRXS during the execution tab_create_graph from row_create_table_for_mysql(), .ibd file for the table should be created already but was not deleted for the error handling.

rb:875 approved by Jimmy Yang
2012-01-10 14:23:20 +09:00
Bjorn Munch
27341322e4 Removing copyright headers from test files 2011-10-19 23:44:17 +02:00
Bjorn Munch
9489a872bd merge 5.5-mtr => 5.5 2011-10-05 22:54:16 +02:00
Bjorn Munch
3d2eff9715 Bug #12844282 62075: MTR TESTS SHOULD NOT HAVE TO SAVE & RESET INNODB_FILE_FORMAT_CHECK
This is a redo for 5.5
  Added 'innodb_file_format_max' as variable to ignore change to.
  Tests that had to restore this amended
  Two tests assumed it to be Antelope, make sure these run on a freshly
    started server
2011-10-05 15:14:14 +02:00
Raghav Kapoor
3cf0b4cc17 Merge of fix for bug#11758062 from mysql-5.1. 2011-09-28 16:54:15 +05:30
Raghav Kapoor
92d96d1437 BUG#11758062 - 50206: ER_TOO_BIG_SELECT REFERS TO OUTMODED
SYSTEM VARIABLE NAME SQL_MAX_JOIN_SI 

BACKGROUND:

ER_TOO_BIG_SELECT refers to SQL_MAX_JOIN_SIZE, which is the
old name for MAX_JOIN_SIZE.

FIX:

Support for old name SQL_MAX_JOIN_SIZE is removed in MySQL 5.6
and is renamed as MAX_JOIN_SIZE.So the errmsg.txt 
and mysql.cc files have been updated and the corresponding result
files have also been updated.
2011-09-28 15:39:21 +05:30
Bjorn Munch
ae41b0073b Fixed test sys_vars.all_vars: innodb_large_prefix no longer missing 2011-09-26 10:47:08 +02:00
Daniel Fischer
fe1b205d02 merge from 5.5.16 2011-09-21 12:40:41 +02:00
Bjorn Munch
07366f2404 merge from 5.5 main 2011-08-22 13:32:11 +02:00
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
Bjorn Munch
41859de621 Bug #11759877 52223: TEST "PLUGIN_DIR_BASIC" DOES NOT SUPPORT RPM BUILD (TEST) DIRECTORY STRUC
Undo previous fix, it is not reliable
  Drop setting $MYSQL_LIBDIR, mtr can't be sure anyway
  Test is set to override plugin-dir to some known existing dir
2011-08-16 11:08:10 +02:00
Alexander Nozdrin
11c20be47e Cherry-picking WL#5710 from mysql-5.5 to mysql-5.5.16-release.
Original revision id:
# revno: 3489 [merge]
# revision-id: tatjana.nuernberg@oracle.com-20110811120945-c6x9a5d2du8s9oj2
# parent: tatjana.nuernberg@oracle.com-20110811112736-so8r813hs8dmf7nr
# parent: chuck.bell@oracle.com-20110810183949-2s9uxcuoux2p668e
# committer: Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
# branch nick: 55-9
# timestamp: Thu 2011-08-11 13:09:45 +0100
# message:
#   auto-merge

This merge revision also has a patch for Bug 12664445, which has been also
taken to 5.5.16.
2011-08-15 18:29:38 +04:00
Sneha Modi
f24f0b99e3 Recommitting the changes to push the code. 2011-08-08 17:01:09 +05:30
Inaam Rana
588a546bf1 Merge from 5.1 the fix for Bug 12356373 2011-07-19 10:54:59 -04:00
Anitha Gopi
5c0e022590 Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
Jimmy Yang
bd708b4240 Implement worklog #5743 InnoDB: Lift the limit of index key prefixes.
With this change, the index prefix column length lifted from 767 bytes
to 3072 bytes if "innodb_large_prefix" is set to "true".

rb://603 approved by Marko
2011-05-31 02:12:32 -07:00
Anitha Gopi
e5b36af265 Replaced all bug numbers with Oracle bugDB numbers 2011-05-23 17:03:41 +05:30
Mikael Ronström
7b079a3a7e Merge 5.5 2011-04-15 15:46:11 +02:00
Georgi Kodinov
1e1ebd7a57 Merged bug #11766769 to 5.5.
Added back the specific warning number.
2011-03-25 14:55:22 +02:00
hery.ramilison@oracle.com
18d2e55c51 Merge from mysql-5.5.10-release 2011-03-16 15:11:20 +01:00
Dmitry Shulga
10f5982ee5 Manual merge from mysql-5.1 for Bug#11764168 (56976: Severe denial
of service in prepared statements).
2011-03-15 18:57:36 +06:00
Mikael Ronstrom
9718c52b47 merge 2011-03-04 12:35:24 +01:00
Vasil Dimov
2c9f4a23bb Merge mysql-5.5-innodb -> mysql-5.5 2011-02-23 19:33:41 +02:00
Vasil Dimov
700bec21fc Fix the failing sys_vars.all_vars on behalf of Sunny 2011-02-23 16:39:54 +02:00
Guilhem Bichot
77c0f33ee2 Fix for BUG#59894
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.
2011-02-11 15:00:09 +01:00
Mikael Ronström
80179eba3e merge 2011-02-10 18:15:19 +01:00
Jonathan Perkin
d06e324e66 Merge from mysql-5.5.9-release 2011-02-08 14:59:03 +01:00
karen.langford@oracle.com
c85029f83b Merge from mysql-5.1.55-release 2011-02-08 12:52:33 +01:00
Horst.Hunger
fa0ad4803c Merge of results of the review done in 5.1-bugteam to 5.1. 2011-01-27 08:56:59 +01:00
Vasil Dimov
54002d0a49 Merge mysql-5.5 -> mysql-5.5-innodb 2011-01-24 09:42:07 +02:00
Mikael Ronstrom
3729fb5f7b merge 2011-01-20 18:35:57 +01:00
Vinay Fisrekar
3712d6c12f Merge from mysql-5.1 for
sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
2011-01-18 09:30:00 +05:30
Vinay Fisrekar
f25ab9fe22 BUG#58858 : sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
Committing After latest merge.      
Modified check_pct procedure to check return value of wait condition instead 
of calling "dirty_pct".
   
Adding Review comments:
1) Added comment for success variable value
2) Procedure check_pct changed For Adding BOOLEAN input and SELECT QUERY Change
2011-01-18 09:24:52 +05:30
Jimmy Yang
c4c90d912a Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-14 23:24:47 -08:00
Mikael Ronstrom
29adf67e3a Updates tests to handle thread pool correctly 2011-01-14 09:28:23 +01:00
Mikael Ronstrom
c1986098bf merge 2011-01-04 18:46:01 +01:00
Guilhem Bichot
b2c4b4636a Fix for BUG#59432 "--autocommit=on does not work (@@global.autocommit is 0)" 2011-01-14 14:21:46 +01:00
Georgi Kodinov
959cb0af9e merge 2010-12-23 12:49:08 +02:00
Georgi Kodinov
457441bf1e merge 2010-12-23 12:40:40 +02:00
Sven Sandberg
e37c86de18 Merged BUG#49978 from 5.1-bugteam to 5.5-bugteam. 2010-12-19 18:15:12 +01:00