summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-17 16:46:34 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-17 16:46:34 +0300
commitf1159b18d930910d5b5b9c454a17b0ee66f853c3 (patch)
tree67d9ac4fb191347f0fff24a4b2b1f0e9fceda319
parent60589aeee03949033c66da5c1eae70d4342179fc (diff)
downloadmariadb-git-f1159b18d930910d5b5b9c454a17b0ee66f853c3.tar.gz
More fixes
-rw-r--r--TODO2
-rw-r--r--extra/comp_err.c6
-rw-r--r--include/my_getopt.h2
-rw-r--r--include/my_global.h2
-rw-r--r--include/my_valgrind.h2
-rw-r--r--include/violite.h4
-rw-r--r--mysql-test/include/have_xtradb.combinations5
-rw-r--r--mysql-test/r/partition_innodb.result2
-rw-r--r--mysql-test/t/partition_innodb.test2
-rw-r--r--sql-common/client.c2
-rw-r--r--sql/derror.cc6
-rw-r--r--sql/net_serv.cc30
-rwxr-xr-xstorage/perfschema/gen_pfs_lex_tokenbin160124 -> 160124 bytes
-rw-r--r--storage/perfschema/pfs_account.cc4
-rw-r--r--storage/perfschema/pfs_instr.cc4
-rw-r--r--storage/perfschema/pfs_server.cc3
-rw-r--r--vio/vio.c8
-rw-r--r--vio/vio_priv.h1
-rw-r--r--vio/viossl.c10
19 files changed, 59 insertions, 36 deletions
diff --git a/TODO b/TODO
index 716cecc7ed8..1bd4d5557e0 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-State of MERGE between MariaDB 5.5 and MySQL 5.6.5
+State of MERGE between MariaDB 5.5 and MySQL 5.6.5-m8
Featured copied/merged
- storage/innodb/*
diff --git a/extra/comp_err.c b/extra/comp_err.c
index bde7d705c75..b4f4b2ea337 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -50,7 +50,7 @@ static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace";
#endif
/* Header for errmsg.sys files */
-uchar file_head[]= { 254, 254, 2, 1 };
+uchar file_head[]= { 254, 254, 2, 2 };
/* Store positions to each error message row to store in errmsg.sys header */
uint file_pos[MAX_ROWS];
@@ -371,8 +371,8 @@ static int create_sys_files(struct languages *lang_head,
bzero((uchar*) head, HEADER_LENGTH);
bmove((uchar *) head, (uchar *) file_head, 4);
head[4]= 1;
- int2store(head + 6, length);
- int2store(head + 8, row_count);
+ int4store(head + 6, length);
+ int2store(head + 10, row_count);
head[30]= csnum;
my_fseek(to, 0l, MY_SEEK_SET, MYF(0));
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 61c4b054615..650f6300796 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -87,8 +87,6 @@ struct my_option
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
-typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...)
- ATTRIBUTE_FORMAT_FPTR(printf, 2, 3);
/**
Used to retrieve a reference to the object (variable) that holds the value
diff --git a/include/my_global.h b/include/my_global.h
index fa9ce649543..12a93bd7712 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1015,9 +1015,9 @@ typedef struct st_mysql_lex_string LEX_STRING;
#define closesocket(A) close(A)
#define SOCKET_EINTR EINTR
#define SOCKET_EAGAIN EAGAIN
-#define SOCKET_ETIMEDOUT SOCKET_EINTR
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
#define SOCKET_EADDRINUSE EADDRINUSE
+#define SOCKET_ETIMEDOUT ETIMEDOUT
#define SOCKET_ECONNRESET ECONNRESET
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
diff --git a/include/my_valgrind.h b/include/my_valgrind.h
index 0aeaef68b50..d32b1f78e15 100644
--- a/include/my_valgrind.h
+++ b/include/my_valgrind.h
@@ -39,7 +39,7 @@
#ifndef DBUG_OFF
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B) ; bfill(A, trash_tmp, C); MEM_UNDEFINED(A, trash_tmp); } while (0)
#else
-#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp= (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0)
+#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0)
#endif
#define TRASH_ALLOC(A,B) TRASH_FILL(A,B,0xA5)
#define TRASH_FREE(A,B) TRASH_FILL(A,B,0x8F)
diff --git a/include/violite.h b/include/violite.h
index 838fc7ee096..661d07d5a3b 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -88,7 +88,6 @@ int vio_keepalive(Vio *vio, my_bool onoff);
my_bool vio_should_retry(Vio *vio);
/* Check that operation was timed out */
my_bool vio_was_timeout(Vio *vio);
-my_bool vio_was_interrupted(Vio *vio);
/* Short text description of the socket for those, who are curious.. */
const char* vio_description(Vio *vio);
/* Return the type of the connection */
@@ -192,12 +191,10 @@ void vio_end(void);
#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
#define vio_should_retry(vio) (vio)->should_retry(vio)
#define vio_was_timeout(vio) (vio)->was_timeout(vio)
-#define vio_was_interrupted(vio) (vio)->was_interrupted(vio)
#define vio_close(vio) ((vio)->vioclose)(vio)
#define vio_shutdown(vio,how) ((vio)->shutdown)(vio,how)
#define vio_peer_addr(vio, buf, prt, buflen) (vio)->peer_addr(vio, buf, prt, buflen)
#define vio_io_wait(vio, event, timeout) (vio)->io_wait(vio, event, timeout)
-#define vio_timeout(vio, which, seconds) (vio)->timeout(vio, which, seconds)
#define vio_is_connected(vio) (vio)->is_connected(vio)
#endif /* !defined(DONT_MAP_VIO) */
@@ -260,7 +257,6 @@ struct st_vio
void (*in_addr)(Vio*, struct sockaddr_storage*);
my_bool (*should_retry)(Vio*);
my_bool (*was_timeout)(Vio*);
- my_bool (*was_interrupted)(Vio*);
int (*vioclose)(Vio*);
my_bool (*is_connected)(Vio*);
int (*shutdown)(Vio *, int);
diff --git a/mysql-test/include/have_xtradb.combinations b/mysql-test/include/have_xtradb.combinations
index b42b72e5785..e05e8f53508 100644
--- a/mysql-test/include/have_xtradb.combinations
+++ b/mysql-test/include/have_xtradb.combinations
@@ -5,11 +5,12 @@ innodb
innodb-cmpmem
innodb-trx
innodb-sys-index
-xtradb-admin-command
+loose-xtradb-admin-command
[xtradb]
innodb
innodb-cmpmem
innodb-trx
innodb-sys-index
-xtradb-admin-command
+loose-xtradb-admin-command
+
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index dd403f64b5c..3215a60387a 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -61,6 +61,7 @@ DROP TABLE t1;
# SELECT is not detected
#
SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency;
+SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay;
SET GLOBAL innodb_thread_concurrency = 1;
CREATE TABLE t1
(user_num BIGINT,
@@ -91,6 +92,7 @@ COMMIT;
# con1, reaping ALTER.
# Disconnecting con1 and switching to default. Cleaning up.
SET GLOBAL innodb_thread_concurrency = @old_innodb_thread_concurrency;
+SET GLOBAL innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay;
DROP TABLE t1;
#
# Bug#50418: DROP PARTITION does not interact with transactions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index 2756f7d1ebb..4c7f55ffa30 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -72,6 +72,7 @@ DROP TABLE t1;
--echo #
SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency;
+SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay;
SET GLOBAL innodb_thread_concurrency = 1;
CREATE TABLE t1
@@ -120,6 +121,7 @@ COMMIT;
--connection default
SET GLOBAL innodb_thread_concurrency = @old_innodb_thread_concurrency;
+SET GLOBAL innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay;
DROP TABLE t1;
diff --git a/sql-common/client.c b/sql-common/client.c
index 05688a33730..8ff26ab12ff 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -775,7 +775,7 @@ restart:
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %lu",
vio_description(net->vio),len));
#ifdef MYSQL_SERVER
- if (net->vio && vio_was_interrupted(net->vio))
+ if (net->vio && (net->last_errno == ER_NET_READ_INTERRUPTED))
return (packet_error);
#endif /*MYSQL_SERVER*/
end_server(mysql);
diff --git a/sql/derror.cc b/sql/derror.cc
index baf7163790d..b0cf80fdd08 100644
--- a/sql/derror.cc
+++ b/sql/derror.cc
@@ -186,12 +186,12 @@ bool read_texts(const char *file_name, const char *language,
goto err;
funktpos=2;
if (head[0] != (uchar) 254 || head[1] != (uchar) 254 ||
- head[2] != 2 || head[3] != 1)
+ head[2] != 2 || head[3] != 2)
goto err; /* purecov: inspected */
textcount=head[4];
error_message_charset_info= system_charset_info;
- length=uint2korr(head+6); count=uint2korr(head+8);
+ length=uint4korr(head+6); count=uint2korr(head+10);
if (count < error_messages)
{
@@ -203,7 +203,7 @@ Error message file '%s' had only %d error messages, but it should contain at lea
}
if (!(*point= (const char**)
- my_malloc((size_t) (length+count*sizeof(char*)),MYF(0))))
+ my_malloc((size_t) (max(length,count*2)+count*sizeof(char*)),MYF(0))))
{
funktpos=3; /* purecov: inspected */
goto err; /* purecov: inspected */
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 08ac93f3091..fc60df27689 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -295,7 +295,7 @@ void net_clear(NET *net, my_bool clear_buffer __attribute__((unused)))
{
size_t count;
int ready;
- while ((ready= net_data_is_ready(net->vio->sd)) > 0)
+ while ((ready= net_data_is_ready(vio_fd(net->vio))) > 0)
{
/* The socket is ready */
if ((long) (count= vio_read(net->vio, net->buff,
@@ -895,7 +895,7 @@ my_real_read(NET *net, size_t *complen)
remain, vio_errno(net->vio), (long) length));
len= packet_error;
net->error= 2; /* Close socket */
- net->last_errno= (vio_was_interrupted(net->vio) ?
+ net->last_errno= (vio_was_timeout(net->vio) ?
ER_NET_READ_INTERRUPTED :
ER_NET_READ_ERROR);
MYSQL_SERVER_my_error(net->last_errno, MYF(0));
@@ -1160,13 +1160,12 @@ void my_net_set_read_timeout(NET *net, uint timeout)
{
DBUG_ENTER("my_net_set_read_timeout");
DBUG_PRINT("enter", ("timeout: %d", timeout));
- if (net->read_timeout == timeout)
- DBUG_VOID_RETURN;
- net->read_timeout= timeout;
-#ifdef NO_ALARM
- if (net->vio)
- vio_timeout(net->vio, 0, timeout);
-#endif
+ if (net->read_timeout != timeout)
+ {
+ net->read_timeout= timeout;
+ if (net->vio)
+ vio_timeout(net->vio, 0, timeout);
+ }
DBUG_VOID_RETURN;
}
@@ -1175,12 +1174,11 @@ void my_net_set_write_timeout(NET *net, uint timeout)
{
DBUG_ENTER("my_net_set_write_timeout");
DBUG_PRINT("enter", ("timeout: %d", timeout));
- if (net->write_timeout == timeout)
- DBUG_VOID_RETURN;
- net->write_timeout= timeout;
-#ifdef NO_ALARM
- if (net->vio)
- vio_timeout(net->vio, 1, timeout);
-#endif
+ if (net->write_timeout != timeout)
+ {
+ net->write_timeout= timeout;
+ if (net->vio)
+ vio_timeout(net->vio, 1, timeout);
+ }
DBUG_VOID_RETURN;
}
diff --git a/storage/perfschema/gen_pfs_lex_token b/storage/perfschema/gen_pfs_lex_token
index 48816282a67..504a29a75f2 100755
--- a/storage/perfschema/gen_pfs_lex_token
+++ b/storage/perfschema/gen_pfs_lex_token
Binary files differ
diff --git a/storage/perfschema/pfs_account.cc b/storage/perfschema/pfs_account.cc
index c9298c7972c..18716478681 100644
--- a/storage/perfschema/pfs_account.cc
+++ b/storage/perfschema/pfs_account.cc
@@ -119,6 +119,10 @@ void cleanup_account(void)
account_array= NULL;
pfs_free(account_instr_class_waits_array);
account_instr_class_waits_array= NULL;
+ pfs_free(account_instr_class_stages_array);
+ account_instr_class_stages_array= 0;
+ pfs_free(account_instr_class_statements_array);
+ account_instr_class_statements_array=0;
account_max= 0;
}
diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc
index 82e768c9be2..44d424e9df6 100644
--- a/storage/perfschema/pfs_instr.cc
+++ b/storage/perfschema/pfs_instr.cc
@@ -467,6 +467,10 @@ void cleanup_instruments(void)
global_instr_class_stages_array= NULL;
pfs_free(global_instr_class_statements_array);
global_instr_class_statements_array= NULL;
+ pfs_free(thread_instr_class_statements_array);
+ thread_instr_class_statements_array= NULL;
+ pfs_free(thread_instr_class_stages_array);
+ thread_instr_class_stages_array= NULL;
DBUG_VOID_RETURN;
}
diff --git a/storage/perfschema/pfs_server.cc b/storage/perfschema/pfs_server.cc
index 1f7010e5b5f..d06e8bcceb6 100644
--- a/storage/perfschema/pfs_server.cc
+++ b/storage/perfschema/pfs_server.cc
@@ -157,7 +157,6 @@ static void destroy_pfs_thread(void *key)
static void cleanup_performance_schema(void)
{
cleanup_instrument_config();
-/* Disabled: Bug#5666
cleanup_instruments();
cleanup_sync_class();
cleanup_thread_class();
@@ -182,8 +181,8 @@ static void cleanup_performance_schema(void)
cleanup_account();
cleanup_account_hash();
cleanup_digest();
+ cleanup_digest_hash();
PFS_atomic::cleanup();
-*/
}
void shutdown_performance_schema(void)
diff --git a/vio/vio.c b/vio/vio.c
index e2a3b9dcf50..a18482f3dfd 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -106,6 +106,8 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
vio->was_timeout =vio_was_timeout;
vio->vioclose =vio_close_pipe;
vio->peer_addr =vio_peer_addr;
+ vio->vioblocking =vio_blocking;
+ vio->is_blocking =vio_is_blocking;
vio->io_wait =no_io_wait;
vio->is_connected =vio_is_connected_pipe;
vio->has_data =has_no_data;
@@ -126,6 +128,8 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
vio->was_timeout =vio_was_timeout;
vio->vioclose =vio_close_shared_memory;
vio->peer_addr =vio_peer_addr;
+ vio->vioblocking =vio_blocking;
+ vio->is_blocking =vio_is_blocking;
vio->io_wait =no_io_wait;
vio->is_connected =vio_is_connected_shared_memory;
vio->has_data =vio_shared_memory_has_data;
@@ -146,6 +150,8 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
vio->was_timeout =vio_was_timeout;
vio->vioclose =vio_ssl_close;
vio->peer_addr =vio_peer_addr;
+ vio->vioblocking =vio_ssl_blocking;
+ vio->is_blocking =vio_is_blocking;
vio->io_wait =vio_io_wait;
vio->is_connected =vio_is_connected;
vio->has_data =vio_ssl_has_data;
@@ -164,6 +170,8 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
vio->was_timeout =vio_was_timeout;
vio->vioclose =vio_close;
vio->peer_addr =vio_peer_addr;
+ vio->vioblocking =vio_blocking;
+ vio->is_blocking =vio_is_blocking;
vio->io_wait =vio_io_wait;
vio->is_connected =vio_is_connected;
vio->shutdown =vio_socket_shutdown;
diff --git a/vio/vio_priv.h b/vio/vio_priv.h
index c1dc090a106..248e1a59b23 100644
--- a/vio/vio_priv.h
+++ b/vio/vio_priv.h
@@ -58,6 +58,7 @@ size_t vio_ssl_write(Vio *vio,const uchar* buf, size_t size);
/* When the workday is over... */
int vio_ssl_close(Vio *vio);
void vio_ssl_delete(Vio *vio);
+int vio_ssl_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode);
my_bool vio_ssl_has_data(Vio *vio);
#endif /* HAVE_OPENSSL */
diff --git a/vio/viossl.c b/vio/viossl.c
index dfca68947cc..74ad97809e2 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -451,6 +451,16 @@ int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout, unsigned long *e
}
+int vio_ssl_blocking(Vio *vio __attribute__((unused)),
+ my_bool set_blocking_mode,
+ my_bool *old_mode)
+{
+ /* Mode is always blocking */
+ *old_mode= 1;
+ /* Return error if we try to change to non_blocking mode */
+ return (set_blocking_mode ? 0 : 1);
+}
+
my_bool vio_ssl_has_data(Vio *vio)
{
return SSL_pending(vio->ssl_arg) > 0 ? TRUE : FALSE;