1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge MariaDB 5.2.5 release into MariaDB-5.2-rpl.

This commit is contained in:
unknown
2011-04-01 15:07:10 +02:00
1686 changed files with 28389 additions and 42301 deletions

View File

@ -701,11 +701,16 @@ static bool shall_skip_database(const char *log_dbname)
producing USE statements by corresponding log event print-functions.
*/
void print_use_stmt(PRINT_EVENT_INFO* pinfo, const char* db, size_t db_len)
static void
print_use_stmt(PRINT_EVENT_INFO* pinfo, const Query_log_event *ev)
{
const char* db= ev->db;
const size_t db_len= ev->db_len;
// pinfo->db is the current db.
// If current db is the same as required db, do nothing.
if (!db || !memcmp(pinfo->db, db, db_len + 1))
if ((ev->flags & LOG_EVENT_SUPPRESS_USE_F) || !db ||
!memcmp(pinfo->db, db, db_len + 1))
return;
// Current db and required db are different.
@ -855,7 +860,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
*/
qe->flags|= LOG_EVENT_SUPPRESS_USE_F;
}
print_use_stmt(print_event_info, qe->db, qe->db_len);
print_use_stmt(print_event_info, qe);
if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
{
if ((retval= write_event_header_and_base64(ev, result_file,
@ -988,7 +993,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
if (!shall_skip_database(exlq->db))
{
print_use_stmt(print_event_info, exlq->db, exlq->db_len);
print_use_stmt(print_event_info, exlq);
if (fname)
{
convert_path_to_forward_slashes(fname);
@ -1599,7 +1604,7 @@ static int parse_args(int *argc, char*** argv)
*/
static Exit_status safe_connect()
{
/* Close and old connections to MySQL */
/* Close any old connections to MySQL */
if (mysql)
mysql_close(mysql);