fixes for test failures

and small collateral changes

mysql-test/lib/My/Test.pm:
  somehow with "print" we get truncated writes sometimes
mysql-test/suite/perfschema/r/digest_table_full.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/dml_handler.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/information_schema.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/nesting.result:
  this differs, because we don't rewrite general log queries, and multi-statement
  packets are logged as a one entry. this result file is identical to what mysql-5.6.5
  produces with the --log-raw option.
mysql-test/suite/perfschema/r/relaylog.result:
  MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB.
mysql-test/suite/perfschema/r/server_init.result:
  MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup.
mysql-test/suite/perfschema/r/stage_mdl_global.result:
  this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not
  do that, and this causes useless mutex locks and waits.
mysql-test/suite/perfschema/r/statement_digest.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_consumers.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_long_query.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result:
  will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
  will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
This commit is contained in:
Sergei Golubchik 2012-09-27 20:09:46 +02:00
commit 474fe6d9d9
477 changed files with 33810 additions and 9079 deletions

View file

@ -10,8 +10,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#include "sql_priv.h"
#include "unireg.h"
@ -559,9 +559,6 @@ Event_queue::dbug_dump_queue(my_time_t when)
#endif
}
static const char *queue_empty_msg= "Waiting on empty queue";
static const char *queue_wait_msg= "Waiting for next activation";
/*
Checks whether the top of the queue is elligible for execution and
returns an Event_job_data instance in case it should be executed.
@ -608,7 +605,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
mysql_audit_release(thd);
/* Wait on condition until signaled. Release LOCK_queue while waiting. */
cond_wait(thd, NULL, queue_empty_msg, SCHED_FUNC, __LINE__);
cond_wait(thd, NULL, & stage_waiting_on_empty_queue, SCHED_FUNC, __FILE__, __LINE__);
continue;
}
@ -629,7 +626,8 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
/* Release any held audit resources before waiting */
mysql_audit_release(thd);
cond_wait(thd, &top_time, queue_wait_msg, SCHED_FUNC, __LINE__);
cond_wait(thd, &top_time, &stage_waiting_for_next_activation, SCHED_FUNC, __FILE__, __LINE__);
continue;
}
@ -759,16 +757,16 @@ Event_queue::unlock_data(const char *func, uint line)
*/
void
Event_queue::cond_wait(THD *thd, struct timespec *abstime, const char* msg,
const char *func, uint line)
Event_queue::cond_wait(THD *thd, struct timespec *abstime, const PSI_stage_info *stage,
const char *src_func, const char *src_file, uint src_line)
{
DBUG_ENTER("Event_queue::cond_wait");
waiting_on_cond= TRUE;
mutex_last_unlocked_at_line= line;
mutex_last_unlocked_at_line= src_line;
mutex_queue_data_locked= FALSE;
mutex_last_unlocked_in_func= func;
mutex_last_unlocked_in_func= src_func;
thd->enter_cond(&COND_queue_state, &LOCK_event_queue, msg);
thd->enter_cond(&COND_queue_state, &LOCK_event_queue, stage, NULL, src_func, src_file, src_line);
if (!thd->killed)
{
@ -779,8 +777,8 @@ Event_queue::cond_wait(THD *thd, struct timespec *abstime, const char* msg,
mysql_cond_timedwait(&COND_queue_state, &LOCK_event_queue, abstime);
}
mutex_last_locked_in_func= func;
mutex_last_locked_at_line= line;
mutex_last_locked_in_func= src_func;
mutex_last_locked_at_line= src_line;
mutex_queue_data_locked= TRUE;
waiting_on_cond= FALSE;
@ -788,8 +786,8 @@ Event_queue::cond_wait(THD *thd, struct timespec *abstime, const char* msg,
This will free the lock so we need to relock. Not the best thing to
do but we need to obey cond_wait()
*/
thd->exit_cond("");
lock_data(func, line);
thd->exit_cond(NULL, src_func, src_file, src_line);
lock_data(src_func, src_line);
DBUG_VOID_RETURN;
}