lp:percona-server/upstream-5.5

Created by Stewart Smith and last modified
Get this branch:
bzr branch lp:percona-server/upstream-5.5
Members of Percona core can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

3953. By Tor Didriksen <email address hidden>

Bug#14549809 LINKING PROBLEM IN 5.5.28 BUILDS WITH THREADPOOL PLUGIN

The use of Thread_iterator did not work on windows (linking problems).
Solution: Change the interface between the thread_pool and the server
to only use simple free functions.

This patch is for 5.5 only (mimicks similar solution in 5.6)

3952. By Martin

Bug#14498355: Merge

3951. By Ashish Agarwal<email address hidden>

Bug#14363985: MYSQLD CRASHED WHEN DISABL AND
              ENABLE AUDI PLUGIN WHEN DDL
              OPERATION HAPPENING

PROBLEM: While unloading the plugin, state is
         not checked before it is to be reaped.
         This can lead to simultaneous free of
         plugin memory by more than one thread.
         Multiple deallocation leads to server
         crash. In the present bug two threads
         deallocate the alog_log plugin.

SOLUTION: A check is added to ensure that only
          one thread is unloading the plugin.

NOTE: No mtr test is added as it requires
      multiple threads to access critical
      section. debug_sync cannot be used in
      the current senario because we dont
      have access to thread pointer in
      some of the plugin functions. IMHO no
      test case in the current time frame.

3950. By Marc Alff

Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED

WARNING

This patch is for mysql-5.5 only,
to be null-merged to mysql-5.6 and mysql-trunk.

This is a partial rollback of the file io instrumentation,
removing the instrumentation for mysql_file_stat in the archive engine.

See the bug comments for details.

3949. By Gopal Shankar <email address hidden>

Bug#14364558 ASSERT `TABLE_LIST->PRELOCKING_PLACEHOLDER==FALSE'
             FAILED IN CHECK_LOCK_AND_ST

Problem:
--------
lock_tables() is supposed to invoke check_lock_and_start_stmt()
for TABLE_LIST which are directly used by top level statement.
TABLE_LIST->prelocking_placeholder is set only for TABLE_LIST
which are used indirectly by stored programs invoked by top
level statement. Hence check_lock_and_start_stmt() should have
TABLE_LIST->prelocking_placeholder==false always, but it is
observed that this assert fails.

The failure is found during RQG test rqg_signal_resignal.

Analysis:
---------
open_tables() invokes open_and_process_routines() where it
finds all the TABLE_LIST that belong to the routine and
adds it to thd->lex->query_tables. During this process if
the open_and_process_routines() fail for some reason,
we are supposed to chop-off all the TABLE_LIST found during
calls to open_and_process_routines(). But, in practice this
is not happening.

thd->lex->query_tables_own_last is supposed to point to a
node in thd->lex->query_tables, which would be a first
TABLE_LIST used indirectly by stored programs invoked by
top level statement. This is found to be not-set correctly
when we plan to chop-off TABLE_LIST's, when
open_and_process_routines() failed.

close_tables_for_reopen() does chop-off all the TABLE_LIST
added after thd->lex->query_table_own_last. This is invoked
upon error in open_and_process_routines(). This call would
not work as expected as thd->lex->query_tables_own_last
is not set, or is not set to correctly.

Further, when open_tables() restarts the process of finding
TABLE_LIST belonging to stored programs, and as the
thd->lex->query_tables_own_last points to in-correct node,
there is possibility of new iteration setting the
thd->lex->query_tables_own_last past some old nodes that
belong to stored programs, added earlier and not removed.
Later when open_tables() completes, lock_tables() ends up
invoking check_lock_and_start_stmt() for TABLE_LIST which
belong to stored programs, which is not expected behavior
and hence we hit the assert
TABLE_LIST->prelocking_placeholder==false.

Due to above behavior, if a user application tries to
execute a SQL statement which invokes some stored function
and if the lock grant on stored function fails due to a
deadlock, then mysqld crashes.

Fix:
----
open_tables() remembers save_query_tables_last which points
to thd-lex->query_tables_last before calls to
open_and_process_routines(). If there is no known
thd->lex->query_tables_own_last set, we are now setting
thd->lex->query_tables_own_last to save_query_tables_last.
This will make sure that the call to close_tables_for_reopen()
will chop-off the list correctly, in other words we now
remove all the nodes added to thd->lex->query_tables, by
previous calls to open_and_process_routines().

Further, it is found that the problem exists starting
from 5.5, due to a code refactoring effort related to
open_tables(). Hence, the fix will be pushed in 5.5, 5.6
and trunk.

3948. By Tor Didriksen <email address hidden>

Bug#14463247 ORDER BY SUBQUERY REFERENCING OUTER ALIAS FAILS

Documentation for class Item_outer_ref was wrong:
(*ref) may point to Item_field as well
(see e.g. Item_outer_ref::fix_fields)

So this casting in get_store_key() was wrong:
(*(Item_ref**)((Item_ref*)keyuse->val)->ref)->ref_type()

3947. By Georgi Kodinov

Bug #14399795 : ISSUES RELATED TO SETTING AUDIT_LOG_STRATEGY
DURING SERVER STARTUP

The options parser now correctly checks for ambiguous prefixes in
enumerated variables and emits an error when the value supplied is
ambiguous.

No test added since mysql-test-run.pl can't handle server startup
failures as an expected state.

3946. By Marko Mäkelä <email address hidden>

Merge mysql-5.1 to mysql-5.5.

3945. By Mattias Jonsson

merge

3944. By Mattias Jonsson

merge

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:percona-server/5.5
This branch contains Public information 
Everyone can see this information.

Subscribers