Merge lp:~abychko/percona-server/bug1050654 into lp:percona-server/5.5
- bug1050654
- Merge into 5.5
Status: | Merged |
---|---|
Approved by: | Alexey Kopytov |
Approved revision: | no longer in the source branch. |
Merged at revision: | 506 |
Proposed branch: | lp:~abychko/percona-server/bug1050654 |
Merge into: | lp:percona-server/5.5 |
Diff against target: |
482 lines (+327/-16) 7 files modified
Percona-Server/include/errmsg.h (+1/-0) Percona-Server/libmysql/CMakeLists.txt (+5/-2) Percona-Server/libmysql/errmsg.c (+1/-0) Percona-Server/libmysql/libmysql.map (+146/-0) build/build-rpm.sh (+1/-2) build/percona-server.spec (+15/-12) build/rpm/mysql-dubious-exports.patch (+158/-0) |
To merge this branch: | bzr merge lp:~abychko/percona-server/bug1050654 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ignacio Nin (community) | Needs Information | ||
Alexey Kopytov (community) | Approve | ||
Review via email: mp+146472@code.launchpad.net |
This proposal supersedes a proposal from 2013-01-31.
Commit message
Description of the change
[+] added Fedora linker script to the build to split symbols by versions
jenkins job and install test are ok
[+] added symbols for compatibility
php build and php bundled tests are ok
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal | # |
Alexey Bychko (abychko) wrote : Posted in a previous version of this proposal | # |
seems fix is incomplete, working on ABI test now
Alexey Bychko (abychko) wrote : | # |
seems fixed properly now
Vadim Tkachenko (vadim-tk) wrote : Posted in a previous version of this proposal | # |
Do we need fixed in mysql-5.
Alexey Bychko (abychko) wrote : Posted in a previous version of this proposal | # |
build/rpm/
Raghavendra D Prabhu (raghavendra-prabhu) wrote : | # |
I see mysql_client_errors being added to libmysqlclient_16.1 here -- https:/
Alexey Kopytov (akopytov) wrote : | # |
That was for 5.5.8, i.e. before libmysqlclient_
Alexey Kopytov (akopytov) wrote : | # |
This looks good to me, but please get Ignacio's opinion.
Ignacio Nin (ignacio-nin) wrote : | # |
> This looks good to me, but please get Ignacio's opinion.
Hello,
The patch looks good, however the description for lp:1050654 doesn't seem to describe correctly the bug/feature anymore, since the error reported doesn't apply anymore (also notice similarites to bug lp:1031427).
At the time, what does exactly the bug fix -- does it give compatibility with remi's repos? Also, should this be tested on Fedora?
Thanks!
Alexey Bychko (abychko) wrote : | # |
yes, it can give compatibility with remi, atomic and other repos. i have it tested on Centos and we have customers running this patch for production. ovais@ can give the details.
i don't know if the fix should be tested on Fedora, because it's not fully supported distribution.
Roel Van de Paar (roel11) wrote : | # |
Fedora is indeed not supported. Centos working fine is enough.
Roel Van de Paar (roel11) wrote : | # |
Note that the 5.5 patch was already pushed into Percona Server 5.5.31-30.3.
Roel Van de Paar (roel11) wrote : | # |
s/was already pushed/is ready to be pushed/ - the 5.6 patch is missing.
Alexey Kopytov (akopytov) wrote : | # |
OK, changing to WiP, since we now require 5.6 MPs.
Preview Diff
1 | === modified file 'Percona-Server/include/errmsg.h' | |||
2 | --- Percona-Server/include/errmsg.h 2011-06-30 15:46:53 +0000 | |||
3 | +++ Percona-Server/include/errmsg.h 2013-04-09 12:03:23 +0000 | |||
4 | @@ -25,6 +25,7 @@ | |||
5 | 25 | void init_client_errs(void); | 25 | void init_client_errs(void); |
6 | 26 | void finish_client_errs(void); | 26 | void finish_client_errs(void); |
7 | 27 | extern const char *client_errors[]; /* Error messages */ | 27 | extern const char *client_errors[]; /* Error messages */ |
8 | 28 | extern const char **mysql_client_errors; /* Error messages */ | ||
9 | 28 | #ifdef __cplusplus | 29 | #ifdef __cplusplus |
10 | 29 | } | 30 | } |
11 | 30 | #endif | 31 | #endif |
12 | 31 | 32 | ||
13 | === modified file 'Percona-Server/libmysql/CMakeLists.txt' | |||
14 | --- Percona-Server/libmysql/CMakeLists.txt 2012-02-16 09:48:16 +0000 | |||
15 | +++ Percona-Server/libmysql/CMakeLists.txt 2013-04-09 12:03:23 +0000 | |||
16 | @@ -208,8 +208,11 @@ | |||
17 | 208 | IF(NOT libmysql_link_flag) | 208 | IF(NOT libmysql_link_flag) |
18 | 209 | SET(libmysql_link_flags) | 209 | SET(libmysql_link_flags) |
19 | 210 | ENDIF() | 210 | ENDIF() |
22 | 211 | SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS | 211 | IF(INSTALL_LAYOUT STREQUAL "RPM") |
23 | 212 | "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}") | 212 | SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libmysql.map ${LINK_FLAG_NO_UNDEFINED}") |
24 | 213 | ELSE() | ||
25 | 214 | SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}") | ||
26 | 215 | ENDIF(INSTALL_LAYOUT STREQUAL "RPM") | ||
27 | 213 | ENDIF() | 216 | ENDIF() |
28 | 214 | # clean direct output needs to be set several targets have the same name | 217 | # clean direct output needs to be set several targets have the same name |
29 | 215 | #(mysqlclient in this case) | 218 | #(mysqlclient in this case) |
30 | 216 | 219 | ||
31 | === modified file 'Percona-Server/libmysql/errmsg.c' | |||
32 | --- Percona-Server/libmysql/errmsg.c 2011-06-30 15:46:53 +0000 | |||
33 | +++ Percona-Server/libmysql/errmsg.c 2013-04-09 12:03:23 +0000 | |||
34 | @@ -23,6 +23,7 @@ | |||
35 | 23 | #include <my_sys.h> | 23 | #include <my_sys.h> |
36 | 24 | #include "errmsg.h" | 24 | #include "errmsg.h" |
37 | 25 | 25 | ||
38 | 26 | const char **mysql_client_errors = client_errors; | ||
39 | 26 | const char *client_errors[]= | 27 | const char *client_errors[]= |
40 | 27 | { | 28 | { |
41 | 28 | "Unknown MySQL error", | 29 | "Unknown MySQL error", |
42 | 29 | 30 | ||
43 | === added file 'Percona-Server/libmysql/libmysql.map' | |||
44 | --- Percona-Server/libmysql/libmysql.map 1970-01-01 00:00:00 +0000 | |||
45 | +++ Percona-Server/libmysql/libmysql.map 2013-04-09 12:03:23 +0000 | |||
46 | @@ -0,0 +1,146 @@ | |||
47 | 1 | # symbols exported from mysql 5.1 | ||
48 | 2 | libmysqlclient_16 { | ||
49 | 3 | global: | ||
50 | 4 | _fini; | ||
51 | 5 | _init; | ||
52 | 6 | my_init; | ||
53 | 7 | myodbc_remove_escape; | ||
54 | 8 | mysql_affected_rows; | ||
55 | 9 | mysql_autocommit; | ||
56 | 10 | mysql_change_user; | ||
57 | 11 | mysql_character_set_name; | ||
58 | 12 | mysql_close; | ||
59 | 13 | mysql_commit; | ||
60 | 14 | mysql_data_seek; | ||
61 | 15 | mysql_debug; | ||
62 | 16 | mysql_dump_debug_info; | ||
63 | 17 | mysql_embedded; | ||
64 | 18 | mysql_eof; | ||
65 | 19 | mysql_errno; | ||
66 | 20 | mysql_error; | ||
67 | 21 | mysql_escape_string; | ||
68 | 22 | mysql_fetch_field; | ||
69 | 23 | mysql_fetch_field_direct; | ||
70 | 24 | mysql_fetch_fields; | ||
71 | 25 | mysql_fetch_lengths; | ||
72 | 26 | mysql_fetch_row; | ||
73 | 27 | mysql_field_count; | ||
74 | 28 | mysql_field_seek; | ||
75 | 29 | mysql_field_tell; | ||
76 | 30 | mysql_free_result; | ||
77 | 31 | mysql_get_character_set_info; | ||
78 | 32 | mysql_get_client_info; | ||
79 | 33 | mysql_get_client_version; | ||
80 | 34 | mysql_get_host_info; | ||
81 | 35 | mysql_get_parameters; | ||
82 | 36 | mysql_get_proto_info; | ||
83 | 37 | mysql_get_server_info; | ||
84 | 38 | mysql_get_server_version; | ||
85 | 39 | mysql_get_ssl_cipher; | ||
86 | 40 | mysql_hex_string; | ||
87 | 41 | mysql_info; | ||
88 | 42 | mysql_init; | ||
89 | 43 | mysql_insert_id; | ||
90 | 44 | mysql_kill; | ||
91 | 45 | mysql_list_dbs; | ||
92 | 46 | mysql_list_fields; | ||
93 | 47 | mysql_list_processes; | ||
94 | 48 | mysql_list_tables; | ||
95 | 49 | mysql_more_results; | ||
96 | 50 | mysql_next_result; | ||
97 | 51 | mysql_num_fields; | ||
98 | 52 | mysql_num_rows; | ||
99 | 53 | mysql_options; | ||
100 | 54 | mysql_ping; | ||
101 | 55 | mysql_query; | ||
102 | 56 | mysql_read_query_result; | ||
103 | 57 | mysql_real_connect; | ||
104 | 58 | mysql_real_escape_string; | ||
105 | 59 | mysql_real_query; | ||
106 | 60 | mysql_refresh; | ||
107 | 61 | mysql_rollback; | ||
108 | 62 | mysql_row_seek; | ||
109 | 63 | mysql_row_tell; | ||
110 | 64 | mysql_select_db; | ||
111 | 65 | mysql_send_query; | ||
112 | 66 | mysql_server_end; | ||
113 | 67 | mysql_server_init; | ||
114 | 68 | mysql_set_character_set; | ||
115 | 69 | mysql_set_local_infile_default; | ||
116 | 70 | mysql_set_local_infile_handler; | ||
117 | 71 | mysql_set_server_option; | ||
118 | 72 | mysql_shutdown; | ||
119 | 73 | mysql_sqlstate; | ||
120 | 74 | mysql_ssl_set; | ||
121 | 75 | mysql_stat; | ||
122 | 76 | mysql_stmt_affected_rows; | ||
123 | 77 | mysql_stmt_attr_get; | ||
124 | 78 | mysql_stmt_attr_set; | ||
125 | 79 | mysql_stmt_bind_param; | ||
126 | 80 | mysql_stmt_bind_result; | ||
127 | 81 | mysql_stmt_close; | ||
128 | 82 | mysql_stmt_data_seek; | ||
129 | 83 | mysql_stmt_errno; | ||
130 | 84 | mysql_stmt_error; | ||
131 | 85 | mysql_stmt_execute; | ||
132 | 86 | mysql_stmt_fetch; | ||
133 | 87 | mysql_stmt_fetch_column; | ||
134 | 88 | mysql_stmt_field_count; | ||
135 | 89 | mysql_stmt_free_result; | ||
136 | 90 | mysql_stmt_init; | ||
137 | 91 | mysql_stmt_insert_id; | ||
138 | 92 | mysql_stmt_num_rows; | ||
139 | 93 | mysql_stmt_param_count; | ||
140 | 94 | mysql_stmt_param_metadata; | ||
141 | 95 | mysql_stmt_prepare; | ||
142 | 96 | mysql_stmt_reset; | ||
143 | 97 | mysql_stmt_result_metadata; | ||
144 | 98 | mysql_stmt_row_seek; | ||
145 | 99 | mysql_stmt_row_tell; | ||
146 | 100 | mysql_stmt_send_long_data; | ||
147 | 101 | mysql_stmt_sqlstate; | ||
148 | 102 | mysql_stmt_store_result; | ||
149 | 103 | mysql_store_result; | ||
150 | 104 | mysql_thread_end; | ||
151 | 105 | mysql_thread_id; | ||
152 | 106 | mysql_thread_init; | ||
153 | 107 | mysql_thread_safe; | ||
154 | 108 | mysql_use_result; | ||
155 | 109 | mysql_warning_count; | ||
156 | 110 | # These are documented in Paul DuBois' MySQL book, so we treat them as part | ||
157 | 111 | # of the de-facto API. | ||
158 | 112 | free_defaults; | ||
159 | 113 | handle_options; | ||
160 | 114 | load_defaults; | ||
161 | 115 | my_print_help; | ||
162 | 116 | # This isn't really documented anywhere, but it seems to be part of the | ||
163 | 117 | # de-facto API as well. We're not going to export the deprecated version | ||
164 | 118 | # make_scrambled_password, however. | ||
165 | 119 | my_make_scrambled_password; | ||
166 | 120 | local: | ||
167 | 121 | *; | ||
168 | 122 | }; | ||
169 | 123 | # symbols added in mysql 5.5 | ||
170 | 124 | libmysqlclient_18 { | ||
171 | 125 | global: | ||
172 | 126 | mysql_client_find_plugin; | ||
173 | 127 | mysql_client_register_plugin; | ||
174 | 128 | mysql_load_plugin; | ||
175 | 129 | mysql_load_plugin_v; | ||
176 | 130 | mysql_plugin_options; | ||
177 | 131 | mysql_stmt_next_result; | ||
178 | 132 | # | ||
179 | 133 | # Ideally the following symbols wouldn't be exported, but various applications | ||
180 | 134 | # require them. We limit the namespace damage by prefixing mysql_ | ||
181 | 135 | # (see mysql-dubious-exports.patch), which means the symbols are not present | ||
182 | 136 | # in libmysqlclient_16. | ||
183 | 137 | # | ||
184 | 138 | # mysql-connector-odbc requires these | ||
185 | 139 | mysql_default_charset_info; | ||
186 | 140 | mysql_get_charset; | ||
187 | 141 | mysql_get_charset_by_csname; | ||
188 | 142 | mysql_net_realloc; | ||
189 | 143 | # PHP's mysqli.so requires this (via the ER() macro) | ||
190 | 144 | client_errors; | ||
191 | 145 | mysql_client_errors; | ||
192 | 146 | }; | ||
193 | 0 | 147 | ||
194 | === modified file 'build/build-rpm.sh' | |||
195 | --- build/build-rpm.sh 2013-03-06 10:47:52 +0000 | |||
196 | +++ build/build-rpm.sh 2013-04-09 12:03:23 +0000 | |||
197 | @@ -121,7 +121,7 @@ | |||
198 | 121 | 121 | ||
199 | 122 | # Create directories for rpmbuild if these don't exist | 122 | # Create directories for rpmbuild if these don't exist |
200 | 123 | (cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS) | 123 | (cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS) |
202 | 124 | 124 | cp -f $(readlink -f $(dirname $0))/rpm/*.patch ${WORKDIR}/SOURCES/ | |
203 | 125 | ( | 125 | ( |
204 | 126 | cd "$SOURCEDIR" | 126 | cd "$SOURCEDIR" |
205 | 127 | 127 | ||
206 | @@ -133,7 +133,6 @@ | |||
207 | 133 | then | 133 | then |
208 | 134 | sed -i 's/lib64/lib/' "$PRODUCT/cmake/install_layout.cmake" | 134 | sed -i 's/lib64/lib/' "$PRODUCT/cmake/install_layout.cmake" |
209 | 135 | fi | 135 | fi |
210 | 136 | |||
211 | 137 | # Create tarball for build | 136 | # Create tarball for build |
212 | 138 | tar czf "$WORKDIR_ABS/SOURCES/$PRODUCT.tar.gz" "$PRODUCT/"* | 137 | tar czf "$WORKDIR_ABS/SOURCES/$PRODUCT.tar.gz" "$PRODUCT/"* |
213 | 139 | 138 | ||
214 | 140 | 139 | ||
215 | === modified file 'build/percona-server.spec' | |||
216 | --- build/percona-server.spec 2013-04-08 06:26:11 +0000 | |||
217 | +++ build/percona-server.spec 2013-04-09 12:03:23 +0000 | |||
218 | @@ -209,10 +209,10 @@ | |||
219 | 209 | ############################################################################## | 209 | ############################################################################## |
220 | 210 | 210 | ||
221 | 211 | %if %{commercial} | 211 | %if %{commercial} |
223 | 212 | %define license_files_server %{src_dir}/LICENSE.mysql | 212 | %define license_files_server LICENSE.mysql |
224 | 213 | %define license_type Commercial | 213 | %define license_type Commercial |
225 | 214 | %else | 214 | %else |
227 | 215 | %define license_files_server %{src_dir}/COPYING %{src_dir}/README | 215 | %define license_files_server COPYING README |
228 | 216 | %define license_type GPL | 216 | %define license_type GPL |
229 | 217 | %endif | 217 | %endif |
230 | 218 | 218 | ||
231 | @@ -228,6 +228,7 @@ | |||
232 | 228 | Distribution: %{distro_description} | 228 | Distribution: %{distro_description} |
233 | 229 | License: Copyright (c) 2000, 2010, %{mysql_vendor}. All rights reserved. Use is subject to license terms. Under %{license_type} license as shown in the Description field. | 229 | License: Copyright (c) 2000, 2010, %{mysql_vendor}. All rights reserved. Use is subject to license terms. Under %{license_type} license as shown in the Description field. |
234 | 230 | Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{majorversion}.%{minorversion}/source/%{src_dir}.tar.gz | 230 | Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{majorversion}.%{minorversion}/source/%{src_dir}.tar.gz |
235 | 231 | Patch1: mysql-dubious-exports.patch | ||
236 | 231 | URL: http://www.percona.com/ | 232 | URL: http://www.percona.com/ |
237 | 232 | Packager: Percona MySQL Development Team <mysqldev@percona.com> | 233 | Packager: Percona MySQL Development Team <mysqldev@percona.com> |
238 | 233 | Vendor: %{percona_server_vendor} | 234 | Vendor: %{percona_server_vendor} |
239 | @@ -323,8 +324,10 @@ | |||
240 | 323 | 324 | ||
241 | 324 | ############################################################################## | 325 | ############################################################################## |
242 | 325 | %prep | 326 | %prep |
245 | 326 | %setup -T -a 0 -c -n %{src_dir} | 327 | %setup -n %{src_dir} |
246 | 327 | 328 | # | |
247 | 329 | %patch1 -p1 | ||
248 | 330 | # | ||
249 | 328 | ############################################################################## | 331 | ############################################################################## |
250 | 329 | %build | 332 | %build |
251 | 330 | 333 | ||
252 | @@ -337,7 +340,7 @@ | |||
253 | 337 | echo "Configuring HandlerSocket" | 340 | echo "Configuring HandlerSocket" |
254 | 338 | CXX="${HS_CXX:-g++}" \ | 341 | CXX="${HS_CXX:-g++}" \ |
255 | 339 | MYSQL_CFLAGS="-I $RPM_BUILD_DIR/%{src_dir}/release/include" \ | 342 | MYSQL_CFLAGS="-I $RPM_BUILD_DIR/%{src_dir}/release/include" \ |
257 | 340 | ./configure --with-mysql-source=$RPM_BUILD_DIR/%{src_dir}/%{src_dir} \ | 343 | ./configure --with-mysql-source=$RPM_BUILD_DIR/%{src_dir} \ |
258 | 341 | --with-mysql-bindir=$RPM_BUILD_DIR/%{src_dir}/release/scripts \ | 344 | --with-mysql-bindir=$RPM_BUILD_DIR/%{src_dir}/release/scripts \ |
259 | 342 | --with-mysql-plugindir=%{_libdir}/mysql/plugin \ | 345 | --with-mysql-plugindir=%{_libdir}/mysql/plugin \ |
260 | 343 | --libdir=%{_libdir} \ | 346 | --libdir=%{_libdir} \ |
261 | @@ -350,7 +353,7 @@ | |||
262 | 350 | cd UDF | 353 | cd UDF |
263 | 351 | CXX="${UDF_CXX:-g++}"\ | 354 | CXX="${UDF_CXX:-g++}"\ |
264 | 352 | CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \ | 355 | CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \ |
266 | 353 | ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/%{src_dir}/include \ | 356 | ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/include \ |
267 | 354 | --libdir=%{_libdir}/mysql/plugin | 357 | --libdir=%{_libdir}/mysql/plugin |
268 | 355 | make all | 358 | make all |
269 | 356 | cd - | 359 | cd - |
270 | @@ -405,7 +408,7 @@ | |||
271 | 405 | -e 's/ $//'` | 408 | -e 's/ $//'` |
272 | 406 | # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before | 409 | # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before |
273 | 407 | # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM | 410 | # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM |
275 | 408 | ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ | 411 | ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ |
276 | 409 | -DCMAKE_BUILD_TYPE=Debug \ | 412 | -DCMAKE_BUILD_TYPE=Debug \ |
277 | 410 | -DWITH_EMBEDDED_SERVER=OFF \ | 413 | -DWITH_EMBEDDED_SERVER=OFF \ |
278 | 411 | -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ | 414 | -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ |
279 | @@ -422,7 +425,7 @@ | |||
280 | 422 | cd release | 425 | cd release |
281 | 423 | # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before | 426 | # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before |
282 | 424 | # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM | 427 | # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM |
284 | 425 | ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ | 428 | ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ |
285 | 426 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | 429 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
286 | 427 | -DWITH_EMBEDDED_SERVER=OFF \ | 430 | -DWITH_EMBEDDED_SERVER=OFF \ |
287 | 428 | -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ | 431 | -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ |
288 | @@ -432,7 +435,7 @@ | |||
289 | 432 | -DWITH_PAM=ON | 435 | -DWITH_PAM=ON |
290 | 433 | echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG | 436 | echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG |
291 | 434 | make ${MAKE_JFLAG} | 437 | make ${MAKE_JFLAG} |
293 | 435 | cd ../%{src_dir} | 438 | cd ../ |
294 | 436 | d="`pwd`" | 439 | d="`pwd`" |
295 | 437 | BuildHandlerSocket | 440 | BuildHandlerSocket |
296 | 438 | BuildUDF | 441 | BuildUDF |
297 | @@ -499,10 +502,10 @@ | |||
298 | 499 | cd $MBD/release | 502 | cd $MBD/release |
299 | 500 | make DESTDIR=$RBR benchdir_root=%{_datadir} install | 503 | make DESTDIR=$RBR benchdir_root=%{_datadir} install |
300 | 501 | d="`pwd`" | 504 | d="`pwd`" |
302 | 502 | cd $MBD/%{src_dir}/storage/HandlerSocket-Plugin-for-MySQL | 505 | cd $MBD/storage/HandlerSocket-Plugin-for-MySQL |
303 | 503 | make DESTDIR=$RBR benchdir_root=%{_datadir} install | 506 | make DESTDIR=$RBR benchdir_root=%{_datadir} install |
304 | 504 | cd "$d" | 507 | cd "$d" |
306 | 505 | cd $MBD/%{src_dir}/UDF | 508 | cd $MBD/UDF |
307 | 506 | make DESTDIR=$RBR benchdir_root=%{_datadir} install | 509 | make DESTDIR=$RBR benchdir_root=%{_datadir} install |
308 | 507 | cd "$d" | 510 | cd "$d" |
309 | 508 | ) | 511 | ) |
310 | @@ -531,7 +534,7 @@ | |||
311 | 531 | touch $RBR%{_sysconfdir}/my.cnf | 534 | touch $RBR%{_sysconfdir}/my.cnf |
312 | 532 | 535 | ||
313 | 533 | # Install SELinux files in datadir | 536 | # Install SELinux files in datadir |
315 | 534 | install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \ | 537 | install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \ |
316 | 535 | $RBR%{_datadir}/mysql/SELinux/RHEL4 | 538 | $RBR%{_datadir}/mysql/SELinux/RHEL4 |
317 | 536 | 539 | ||
318 | 537 | %if %{WITH_TCMALLOC} | 540 | %if %{WITH_TCMALLOC} |
319 | 538 | 541 | ||
320 | === added directory 'build/rpm' | |||
321 | === added file 'build/rpm/mysql-dubious-exports.patch' | |||
322 | --- build/rpm/mysql-dubious-exports.patch 1970-01-01 00:00:00 +0000 | |||
323 | +++ build/rpm/mysql-dubious-exports.patch 2013-04-09 12:03:23 +0000 | |||
324 | @@ -0,0 +1,158 @@ | |||
325 | 1 | Prefix mysql_ to the real names of several symbols that have to be exported | ||
326 | 2 | from libmysqlclient because mysql-connector-odbc and/or PHP depend on them. | ||
327 | 3 | This limits the intrusion on application namespace. | ||
328 | 4 | |||
329 | 5 | Also, remove all traces of make_scrambled_password and | ||
330 | 6 | make_scrambled_password_323, so that references to these functions draw | ||
331 | 7 | compile-time warnings, per a suggestion from Paul Howarth in bug #690346. | ||
332 | 8 | It doesn't seem worth trying to get rid of all the internal symbols exposed | ||
333 | 9 | by mysql.h, but these two are relatively easy to get rid of. | ||
334 | 10 | |||
335 | 11 | |||
336 | 12 | diff -up mysql-5.5.28/client/mysqladmin.cc.p8 mysql-5.5.28/client/mysqladmin.cc | ||
337 | 13 | --- mysql-5.5.28/client/mysqladmin.cc.p8 2012-08-29 10:50:46.000000000 +0200 | ||
338 | 14 | +++ mysql-5.5.28/client/mysqladmin.cc 2012-12-06 14:16:14.598520859 +0100 | ||
339 | 15 | @@ -21,6 +21,7 @@ | ||
340 | 16 | #include <my_pthread.h> /* because of signal() */ | ||
341 | 17 | #include <sys/stat.h> | ||
342 | 18 | #include <mysql.h> | ||
343 | 19 | +#include <password.h> /* my_make_scrambled_password_323, my_make_scrambled_password */ | ||
344 | 20 | #include <sql_common.h> | ||
345 | 21 | #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ | ||
346 | 22 | |||
347 | 23 | @@ -989,9 +990,9 @@ static int execute_commands(MYSQL *mysql | ||
348 | 24 | } | ||
349 | 25 | } | ||
350 | 26 | if (old) | ||
351 | 27 | - make_scrambled_password_323(crypted_pw, typed_password); | ||
352 | 28 | + my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password)); | ||
353 | 29 | else | ||
354 | 30 | - make_scrambled_password(crypted_pw, typed_password); | ||
355 | 31 | + my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password)); | ||
356 | 32 | } | ||
357 | 33 | else | ||
358 | 34 | crypted_pw[0]=0; /* No password */ | ||
359 | 35 | diff -up mysql-5.5.28/include/mysql_com.h.p8 mysql-5.5.28/include/mysql_com.h | ||
360 | 36 | --- mysql-5.5.28/include/mysql_com.h.p8 2012-08-29 10:50:46.000000000 +0200 | ||
361 | 37 | +++ mysql-5.5.28/include/mysql_com.h 2012-12-06 14:16:14.599520860 +0100 | ||
362 | 38 | @@ -452,6 +452,7 @@ my_bool my_net_init(NET *net, Vio* vio); | ||
363 | 39 | void my_net_local_init(NET *net); | ||
364 | 40 | void net_end(NET *net); | ||
365 | 41 | void net_clear(NET *net, my_bool clear_buffer); | ||
366 | 42 | +#define net_realloc mysql_net_realloc /* namespace sanity */ | ||
367 | 43 | my_bool net_realloc(NET *net, size_t length); | ||
368 | 44 | my_bool net_flush(NET *net); | ||
369 | 45 | my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); | ||
370 | 46 | @@ -533,14 +534,12 @@ double my_rnd(struct rand_struct *); | ||
371 | 47 | void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st); | ||
372 | 48 | |||
373 | 49 | void hash_password(unsigned long *to, const char *password, unsigned int password_len); | ||
374 | 50 | -void make_scrambled_password_323(char *to, const char *password); | ||
375 | 51 | void scramble_323(char *to, const char *message, const char *password); | ||
376 | 52 | my_bool check_scramble_323(const unsigned char *reply, const char *message, | ||
377 | 53 | unsigned long *salt); | ||
378 | 54 | void get_salt_from_password_323(unsigned long *res, const char *password); | ||
379 | 55 | void make_password_from_salt_323(char *to, const unsigned long *salt); | ||
380 | 56 | |||
381 | 57 | -void make_scrambled_password(char *to, const char *password); | ||
382 | 58 | void scramble(char *to, const char *message, const char *password); | ||
383 | 59 | my_bool check_scramble(const unsigned char *reply, const char *message, | ||
384 | 60 | const unsigned char *hash_stage2); | ||
385 | 61 | diff -up mysql-5.5.28/include/mysql.h.pp.p8 mysql-5.5.28/include/mysql.h.pp | ||
386 | 62 | --- mysql-5.5.28/include/mysql.h.pp.p8 2012-08-29 10:50:46.000000000 +0200 | ||
387 | 63 | +++ mysql-5.5.28/include/mysql.h.pp 2012-12-06 14:16:14.598520859 +0100 | ||
388 | 64 | @@ -86,7 +86,7 @@ my_bool my_net_init(NET *net, Vio* vio); | ||
389 | 65 | void my_net_local_init(NET *net); | ||
390 | 66 | void net_end(NET *net); | ||
391 | 67 | void net_clear(NET *net, my_bool clear_buffer); | ||
392 | 68 | -my_bool net_realloc(NET *net, size_t length); | ||
393 | 69 | +my_bool mysql_net_realloc(NET *net, size_t length); | ||
394 | 70 | my_bool net_flush(NET *net); | ||
395 | 71 | my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); | ||
396 | 72 | my_bool net_write_command(NET *net,unsigned char command, | ||
397 | 73 | @@ -128,13 +128,11 @@ void randominit(struct rand_struct *, un | ||
398 | 74 | double my_rnd(struct rand_struct *); | ||
399 | 75 | void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st); | ||
400 | 76 | void hash_password(unsigned long *to, const char *password, unsigned int password_len); | ||
401 | 77 | -void make_scrambled_password_323(char *to, const char *password); | ||
402 | 78 | void scramble_323(char *to, const char *message, const char *password); | ||
403 | 79 | my_bool check_scramble_323(const unsigned char *reply, const char *message, | ||
404 | 80 | unsigned long *salt); | ||
405 | 81 | void get_salt_from_password_323(unsigned long *res, const char *password); | ||
406 | 82 | void make_password_from_salt_323(char *to, const unsigned long *salt); | ||
407 | 83 | -void make_scrambled_password(char *to, const char *password); | ||
408 | 84 | void scramble(char *to, const char *message, const char *password); | ||
409 | 85 | my_bool check_scramble(const unsigned char *reply, const char *message, | ||
410 | 86 | const unsigned char *hash_stage2); | ||
411 | 87 | diff -up mysql-5.5.28/include/my_sys.h.p8 mysql-5.5.28/include/my_sys.h | ||
412 | 88 | --- mysql-5.5.28/include/my_sys.h.p8 2012-12-06 14:09:15.218170154 +0100 | ||
413 | 89 | +++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:16:14.598520859 +0100 | ||
414 | 90 | @@ -218,6 +218,7 @@ extern uint my_large_page_size; | ||
415 | 91 | |||
416 | 92 | /* charsets */ | ||
417 | 93 | #define MY_ALL_CHARSETS_SIZE 2048 | ||
418 | 94 | +#define default_charset_info mysql_default_charset_info /* namespace sanity */ | ||
419 | 95 | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; | ||
420 | 96 | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; | ||
421 | 97 | extern CHARSET_INFO compiled_charsets[]; | ||
422 | 98 | @@ -895,6 +896,9 @@ extern uint get_charset_number(const cha | ||
423 | 99 | extern uint get_collation_number(const char *name); | ||
424 | 100 | extern const char *get_charset_name(uint cs_number); | ||
425 | 101 | |||
426 | 102 | +#define get_charset mysql_get_charset /* namespace sanity */ | ||
427 | 103 | +#define get_charset_by_csname mysql_get_charset_by_csname | ||
428 | 104 | + | ||
429 | 105 | extern CHARSET_INFO *get_charset(uint cs_number, myf flags); | ||
430 | 106 | extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); | ||
431 | 107 | extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, | ||
432 | 108 | diff -up mysql-5.5.28/sql/password.c.p8 mysql-5.5.28/sql/password.c | ||
433 | 109 | --- mysql-5.5.28/sql/password.c.p8 2012-08-29 10:50:46.000000000 +0200 | ||
434 | 110 | +++ mysql-5.5.28/sql/password.c 2012-12-06 14:16:14.599520860 +0100 | ||
435 | 111 | @@ -155,23 +155,6 @@ void my_make_scrambled_password_323(char | ||
436 | 112 | |||
437 | 113 | |||
438 | 114 | /* | ||
439 | 115 | - Wrapper around my_make_scrambled_password_323() to maintain client lib ABI | ||
440 | 116 | - compatibility. | ||
441 | 117 | - In server code usage of my_make_scrambled_password_323() is preferred to | ||
442 | 118 | - avoid strlen(). | ||
443 | 119 | - SYNOPSIS | ||
444 | 120 | - make_scrambled_password_323() | ||
445 | 121 | - to OUT store scrambled password here | ||
446 | 122 | - password IN NULL-terminated string with user-supplied password | ||
447 | 123 | -*/ | ||
448 | 124 | - | ||
449 | 125 | -void make_scrambled_password_323(char *to, const char *password) | ||
450 | 126 | -{ | ||
451 | 127 | - my_make_scrambled_password_323(to, password, strlen(password)); | ||
452 | 128 | -} | ||
453 | 129 | - | ||
454 | 130 | - | ||
455 | 131 | -/* | ||
456 | 132 | Scramble string with password. | ||
457 | 133 | Used in pre 4.1 authentication phase. | ||
458 | 134 | SYNOPSIS | ||
459 | 135 | @@ -434,23 +417,6 @@ void my_make_scrambled_password(char *to | ||
460 | 136 | |||
461 | 137 | |||
462 | 138 | /* | ||
463 | 139 | - Wrapper around my_make_scrambled_password() to maintain client lib ABI | ||
464 | 140 | - compatibility. | ||
465 | 141 | - In server code usage of my_make_scrambled_password() is preferred to | ||
466 | 142 | - avoid strlen(). | ||
467 | 143 | - SYNOPSIS | ||
468 | 144 | - make_scrambled_password() | ||
469 | 145 | - buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string | ||
470 | 146 | - password IN NULL-terminated password string | ||
471 | 147 | -*/ | ||
472 | 148 | - | ||
473 | 149 | -void make_scrambled_password(char *to, const char *password) | ||
474 | 150 | -{ | ||
475 | 151 | - my_make_scrambled_password(to, password, strlen(password)); | ||
476 | 152 | -} | ||
477 | 153 | - | ||
478 | 154 | - | ||
479 | 155 | -/* | ||
480 | 156 | Produce an obscure octet sequence from password and random | ||
481 | 157 | string, recieved from the server. This sequence corresponds to the | ||
482 | 158 | password, but password can not be easily restored from it. The sequence |
See http:// bazaar. launchpad. net/~maria- captains/ maria/5. 5/revision/ 3644.1. 2 for the detailed problem analysis and proposed fix.
That fix, however, introduced another problem: https:/ /mariadb. atlassian. net/browse/ MDEV-4127
But should we consider that approach to fix the problem in general?