Merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1203567 into lp:percona-server/5.5

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 586
Proposed branch: lp:~sergei.glushchenko/percona-server/5.5-ps-bug1203567
Merge into: lp:percona-server/5.5
Diff against target: 92 lines (+27/-5)
3 files modified
Percona-Server/sql/mysqld.cc (+22/-1)
Percona-Server/sql/sql_connect.cc (+4/-3)
Percona-Server/sql/sys_vars.cc (+1/-1)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1203567
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
George Ormond Lorch III (community) g2 Approve
Review via email: mp+176923@code.launchpad.net

This proposal supersedes a proposal from 2013-07-25.

Description of the change

Bug 1203567: close_socket() is not declared
The reason is missed close_socket from MariaDB in threadpool port.
Fixed by porting close_socket from MariaDB.
This branch also fixes few issues which prevent embedded server from
being able to be built. However this branch is still impossible to
compile with

CFLAGS="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -O0 -g3 -gdwarf-2" CXXFLAGS="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -O0 -g3 -gdwarf-2" cmake .. -DCMAKE_VERBOSE_MAKEFILE=true -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DENABLE_DTRACE=OFF -DENABLE_DOWNLOADS=1 -DWITH_DEBUG=1

because embedded server is broken due to many undefined symbols such as
acl_is_utility_user, init_intvar_from_file, init_global_user_stats, etc.

http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param-valgrind/1/

I did not check test results because the bug was about impossibility of build.

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Originally was proposed to incorrect branch

Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Sergei, you seem to have two commits/revnos (545 and 546) with similar comments for this fix, shouldn't this just be a single commit?

review: Needs Fixing (g2)
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Yes, George, I've done bzr uncommit and repushed branch.

Revision history for this message
George Ormond Lorch III (gl-az) :
review: Approve (g2)
Revision history for this message
Stewart Smith (stewart) wrote :

I'm pretty sure we don't need the #ifdef NETWARE around, although if that's what upstream has, let's keep it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/sql/mysqld.cc'
2--- Percona-Server/sql/mysqld.cc 2013-06-27 15:35:20 +0000
3+++ Percona-Server/sql/mysqld.cc 2013-08-20 17:52:33 +0000
4@@ -1238,6 +1238,27 @@
5 DBUG_VOID_RETURN;
6 }
7
8+#ifdef HAVE_CLOSE_SERVER_SOCK
9+static void close_socket(my_socket sock, const char *info)
10+{
11+ DBUG_ENTER("close_socket");
12+
13+ if (sock != INVALID_SOCKET)
14+ {
15+ DBUG_PRINT("info", ("calling shutdown on %s socket", info));
16+ (void) mysql_socket_shutdown(sock, SHUT_RDWR);
17+#if defined(__NETWARE__)
18+ /*
19+ The following code is disabled for normal systems as it causes MySQL
20+ to hang on AIX 4.3 during shutdown
21+ */
22+ DBUG_PRINT("info", ("calling closesocket on %s socket", info));
23+ (void) closesocket(tmp_sock);
24+#endif
25+ }
26+ DBUG_VOID_RETURN;
27+}
28+#endif
29
30 static void close_server_sock()
31 {
32@@ -4265,6 +4286,7 @@
33 #define decrement_handler_count()
34 #endif /* defined(_WIN32) || defined(HAVE_SMEM) */
35
36+#ifndef EMBEDDED_LIBRARY
37 #if defined(__linux__)
38 /*
39 * Auto detect if we support flash cache on the host system.
40@@ -4355,7 +4377,6 @@
41 }
42 #endif//__linux__
43
44-#ifndef EMBEDDED_LIBRARY
45 #ifndef DBUG_OFF
46 /*
47 Debugging helper function to keep the locale database
48
49=== modified file 'Percona-Server/sql/sql_connect.cc'
50--- Percona-Server/sql/sql_connect.cc 2013-06-01 15:04:43 +0000
51+++ Percona-Server/sql/sql_connect.cc 2013-08-20 17:52:33 +0000
52@@ -56,9 +56,6 @@
53 #define MIN_HANDSHAKE_SIZE 6
54 #endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
55
56-// Increments connection count for user.
57-static int increment_connection_count(THD* thd, bool use_lock);
58-
59 // Uses the THD to update the global stats by user name and client IP
60 void update_global_user_stats(THD* thd, bool create_user, time_t now);
61
62@@ -79,6 +76,10 @@
63 */
64
65 #ifndef NO_EMBEDDED_ACCESS_CHECKS
66+
67+// Increments connection count for user.
68+static int increment_connection_count(THD* thd, bool use_lock);
69+
70 static HASH hash_user_connections;
71
72 int get_or_create_user_conn(THD *thd, const char *user,
73
74=== modified file 'Percona-Server/sql/sys_vars.cc'
75--- Percona-Server/sql/sys_vars.cc 2013-05-15 05:05:18 +0000
76+++ Percona-Server/sql/sys_vars.cc 2013-08-20 17:52:33 +0000
77@@ -2298,6 +2298,7 @@
78 GLOBAL_VAR(thread_cache_size), CMD_LINE(REQUIRED_ARG),
79 VALID_RANGE(0, 16384), DEFAULT(0), BLOCK_SIZE(1));
80
81+#ifdef HAVE_POOL_OF_THREADS
82
83 static bool fix_tp_max_threads(sys_var *, THD *, enum_var_type)
84 {
85@@ -2332,7 +2333,6 @@
86 }
87 #endif
88
89-#ifdef HAVE_POOL_OF_THREADS
90 #ifdef _WIN32
91 static Sys_var_uint Sys_threadpool_min_threads(
92 "thread_pool_min_threads",

Subscribers

People subscribed via source and target branches