Commit d0b32f1a authored by unknown's avatar unknown

Automerge mariadb 5.1 -> mariadb 5.2

parents 02ed15db 1f6a936d
[MYSQL]
tree_location = lp:maria/5.2
post_commit_to = maria-developers@lists.launchpad.net
post_commit_to = commits@mariadb.org
post_commit_url = lp:maria/5.2
tree_name = maria/5.2
project_name = "Mariadb 5.2, with Maria 2.0"
......@@ -74,7 +74,6 @@ struct event_base {
Copyright (c) 1991, 1993, The Regents of the University of California.
All rights reserved.
*/
#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
#define TAILQ_FIRST(head) ((head)->tqh_first)
#define TAILQ_END(head) NULL
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
......
......@@ -18,7 +18,6 @@
/* based on Wei Dai's algebra.cpp from CryptoPP */
#undef NDEBUG
#define DEBUG // GCC 4.0 bug if NDEBUG and Optimize > 1
#include "runtime.hpp"
#include "algebra.hpp"
......
......@@ -25,3 +25,8 @@
#include "mysql_priv.h"
#include "hash_filo.h"
#ifdef __WIN__
// Remove linker warning 4221 about empty file
namespace { char dummy; };
#endif // __WIN__
......@@ -85,6 +85,12 @@ int _my_b_net_read(register IO_CACHE *info, uchar *Buffer,
}
} /* extern "C" */
#elif defined(__WIN__)
// Remove linker warning 4221 about empty file
namespace { char dummy; };
#endif /* HAVE_REPLICATION */
......@@ -2683,9 +2683,11 @@ bugs.\n");
end:
#ifndef __WIN__
/* Terminate */
exit(1);
#else
/* On Windows, do not terminate, but pass control to the exception filter */;
/* On Windows, do not terminate, but pass control to exception filter */
;
#endif
}
......
......@@ -1036,5 +1036,10 @@ err:
return error;
}
#elif defined(__WIN__)
// Remove linker warning 4221 about empty file
namespace { char dummy; };
#endif /* HAVE_REPLICATION */
......@@ -233,8 +233,12 @@ static void check_unused(void)
uint create_table_def_key(THD *thd, char *key, TABLE_LIST *table_list,
bool tmp_table)
{
uint key_length= (uint) (strmov(strmov(key, table_list->db)+1,
table_list->table_name)-key)+1;
char *db_end= strnmov(key, table_list->db, MAX_DBKEY_LENGTH - 2);
*db_end++= '\0';
char *table_end= strnmov(db_end, table_list->table_name,
key + MAX_DBKEY_LENGTH - 1 - db_end);
*table_end++= '\0';
uint key_length= (uint) (table_end-key);
if (tmp_table)
{
int4store(key + key_length, thd->server_id);
......
......@@ -1240,10 +1240,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break;
#else
{
char *fields, *packet_end= packet + packet_length, *arg_end;
char *fields, *packet_end= packet + packet_length, *wildcard;
/* Locked closure of all tables */
TABLE_LIST table_list;
LEX_STRING conv_name;
char db_buff[NAME_LEN+1];
uint32 db_length;
uint dummy_errors;
/* used as fields initializator */
lex_start(thd);
......@@ -1255,11 +1257,22 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
/*
We have name + wildcard in packet, separated by endzero
*/
arg_end= strend(packet);
thd->convert_string(&conv_name, system_charset_info,
packet, (uint) (arg_end - packet), thd->charset());
table_list.alias= table_list.table_name= conv_name.str;
packet= arg_end + 1;
wildcard= strend(packet);
db_length= wildcard - packet;
wildcard++;
uint query_length= (uint) (packet_end - wildcard); // Don't count end \0
if (db_length > NAME_LEN || query_length > NAME_LEN)
{
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
break;
}
db_length= copy_and_convert(db_buff, sizeof(db_buff)-1,
system_charset_info, packet, db_length,
thd->charset(), &dummy_errors);
db_buff[db_length]= '\0';
table_list.alias= table_list.table_name= db_buff;
if (!(fields= (char *) thd->memdup(wildcard, query_length + 1)))
break;
if (is_schema_db(table_list.db, table_list.db_length))
{
......@@ -1268,9 +1281,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
table_list.schema_table= schema_table;
}
uint query_length= (uint) (packet_end - packet); // Don't count end \0
if (!(fields= (char *) thd->memdup(packet, query_length + 1)))
break;
thd->set_query(fields, query_length);
general_log_print(thd, command, "%s %s", table_list.table_name, fields);
if (lower_case_table_names)
......
......@@ -1835,6 +1835,11 @@ int init_replication_sys_vars()
return 0;
}
#elif defined(__WIN__)
// Remove linker warning 4221 about empty file
namespace { char dummy; };
#endif /* HAVE_REPLICATION */
......@@ -1460,8 +1460,9 @@ LSN translog_get_file_max_lsn_stored(uint32 file)
{
LOGHANDLER_FILE_INFO info;
File fd= open_logfile_by_number_no_cache(file);
File fd;
LINT_INIT_STRUCT(info);
fd= open_logfile_by_number_no_cache(file);
if ((fd < 0) ||
(translog_read_file_header(&info, fd) | my_close(fd, MYF(MY_WME))))
{
......
......@@ -186,5 +186,10 @@ void xt_trace_thread_locks(XTThread *self)
}
}
#elif defined(__WIN__)
// Remove linker warning 4221 about empty file
namespace { char dummy; };
#endif
......@@ -241,4 +241,9 @@ void pbms_completed(TABLE *table, bool ok)
return ;
}
#elif defined(__WIN__)
// Remove linker warning 4221 about empty file
namespace { char dummy; };
#endif // PBMS_ENABLED
......@@ -290,7 +290,7 @@ management to ensure correct alignment for doubles etc. */
/* The 2-logarithm of UNIV_PAGE_SIZE: */
#define UNIV_PAGE_SIZE_SHIFT 14
/* The universal page size of the database */
#define UNIV_PAGE_SIZE (1 << UNIV_PAGE_SIZE_SHIFT)
#define UNIV_PAGE_SIZE (1u << UNIV_PAGE_SIZE_SHIFT)
/* Maximum number of parallel threads in a parallelized operation */
#define UNIV_MAX_PARALLELISM 32
......
......@@ -423,8 +423,11 @@ mutex_set_waiters(
mutex_t* mutex, /*!< in: mutex */
ulint n) /*!< in: value to set */
{
#ifndef INNODB_RW_LOCKS_USE_ATOMICS
volatile ulint* ptr; /* declared volatile to ensure that
the value is stored to memory */
#endif
ut_ad(mutex);
#ifdef INNODB_RW_LOCKS_USE_ATOMICS
......
......@@ -4114,6 +4114,10 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
{
int code;
char hex[]= "0123456789abcdef";
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 128 && filename_safe_char[wc])
{
*s= (uchar) wc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment