1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

10.0-base merge

This commit is contained in:
Sergei Golubchik
2013-12-16 13:02:21 +01:00
1367 changed files with 82358 additions and 55472 deletions

View File

@@ -1,5 +1,4 @@
/*
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 2013, Monty Program Ab.
This program is free software; you can redistribute it and/or modify
@@ -463,6 +462,7 @@ enum killed_type
#include "sql_lex.h" /* Must be here */
extern LEX_STRING sql_statement_names[(uint) SQLCOM_END + 1];
class Delayed_insert;
class select_result;
class Time_zone;
@@ -3290,7 +3290,11 @@ public:
*/
bool set_db(const char *new_db, size_t new_db_len)
{
bool result;
/*
Acquiring mutex LOCK_thd_data as we either free the memory allocated
for the database and reallocating the memory for the new db or memcpy
the new_db to the db.
*/
mysql_mutex_lock(&LOCK_thd_data);
/* Do not reallocate memory if current chunk is big enough. */
if (db && new_db && db_length >= new_db_len)
@@ -3304,7 +3308,7 @@ public:
db= NULL;
}
db_length= db ? new_db_len : 0;
result= new_db && !db;
bool result= new_db && !db;
mysql_mutex_unlock(&LOCK_thd_data);
#ifdef HAVE_PSI_THREAD_INTERFACE
if (result)