Merge lp:~abychko/percona-server/bug1050654 into lp:percona-server/5.5

Proposed by Alexey Bychko
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
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.

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

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

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?

review: Needs Information
Revision history for this message
Alexey Bychko (abychko) wrote : Posted in a previous version of this proposal

seems fix is incomplete, working on ABI test now

Revision history for this message
Alexey Bychko (abychko) wrote :

seems fixed properly now

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote : Posted in a previous version of this proposal

Do we need fixed in mysql-5.5.28/client/mysqladmin.cc here ?

review: Needs Information
Revision history for this message
Alexey Bychko (abychko) wrote : Posted in a previous version of this proposal

build/rpm/mysql-dubious-exports.patch is Fedora patch and contains several functions for mysql compatibility. in PS it will be applied only to RPM. if Debian systems contains the same compatibility symbols, then patch will be applied to the tree and deleted

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

I see mysql_client_errors being added to libmysqlclient_16.1 here -- https://lists.fedoraproject.org/pipermail/scm-commits/2010-December/537257.html

Revision history for this message
Alexey Kopytov (akopytov) wrote :

That was for 5.5.8, i.e. before libmysqlclient_16/18 separation which happened in 5.5.10 as a fix for http://bugs.mysql.com/bug.php?id=60061.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

This looks good to me, but please get Ignacio's opinion.

review: Approve
Revision history for this message
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!

review: Needs Information
Revision history for this message
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.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Fedora is indeed not supported. Centos working fine is enough.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Note that the 5.5 patch was already pushed into Percona Server 5.5.31-30.3.

Revision history for this message
Roel Van de Paar (roel11) wrote :

s/was already pushed/is ready to be pushed/ - the 5.6 patch is missing.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

OK, changing to WiP, since we now require 5.6 MPs.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 void init_client_errs(void);
6 void finish_client_errs(void);
7 extern const char *client_errors[]; /* Error messages */
8+extern const char **mysql_client_errors; /* Error messages */
9 #ifdef __cplusplus
10 }
11 #endif
12
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 IF(NOT libmysql_link_flag)
18 SET(libmysql_link_flags)
19 ENDIF()
20- SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
21- "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}")
22+ IF(INSTALL_LAYOUT STREQUAL "RPM")
23+ SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libmysql.map ${LINK_FLAG_NO_UNDEFINED}")
24+ ELSE()
25+ SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}")
26+ ENDIF(INSTALL_LAYOUT STREQUAL "RPM")
27 ENDIF()
28 # clean direct output needs to be set several targets have the same name
29 #(mysqlclient in this case)
30
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 #include <my_sys.h>
36 #include "errmsg.h"
37
38+const char **mysql_client_errors = client_errors;
39 const char *client_errors[]=
40 {
41 "Unknown MySQL error",
42
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+# symbols exported from mysql 5.1
48+libmysqlclient_16 {
49+ global:
50+ _fini;
51+ _init;
52+ my_init;
53+ myodbc_remove_escape;
54+ mysql_affected_rows;
55+ mysql_autocommit;
56+ mysql_change_user;
57+ mysql_character_set_name;
58+ mysql_close;
59+ mysql_commit;
60+ mysql_data_seek;
61+ mysql_debug;
62+ mysql_dump_debug_info;
63+ mysql_embedded;
64+ mysql_eof;
65+ mysql_errno;
66+ mysql_error;
67+ mysql_escape_string;
68+ mysql_fetch_field;
69+ mysql_fetch_field_direct;
70+ mysql_fetch_fields;
71+ mysql_fetch_lengths;
72+ mysql_fetch_row;
73+ mysql_field_count;
74+ mysql_field_seek;
75+ mysql_field_tell;
76+ mysql_free_result;
77+ mysql_get_character_set_info;
78+ mysql_get_client_info;
79+ mysql_get_client_version;
80+ mysql_get_host_info;
81+ mysql_get_parameters;
82+ mysql_get_proto_info;
83+ mysql_get_server_info;
84+ mysql_get_server_version;
85+ mysql_get_ssl_cipher;
86+ mysql_hex_string;
87+ mysql_info;
88+ mysql_init;
89+ mysql_insert_id;
90+ mysql_kill;
91+ mysql_list_dbs;
92+ mysql_list_fields;
93+ mysql_list_processes;
94+ mysql_list_tables;
95+ mysql_more_results;
96+ mysql_next_result;
97+ mysql_num_fields;
98+ mysql_num_rows;
99+ mysql_options;
100+ mysql_ping;
101+ mysql_query;
102+ mysql_read_query_result;
103+ mysql_real_connect;
104+ mysql_real_escape_string;
105+ mysql_real_query;
106+ mysql_refresh;
107+ mysql_rollback;
108+ mysql_row_seek;
109+ mysql_row_tell;
110+ mysql_select_db;
111+ mysql_send_query;
112+ mysql_server_end;
113+ mysql_server_init;
114+ mysql_set_character_set;
115+ mysql_set_local_infile_default;
116+ mysql_set_local_infile_handler;
117+ mysql_set_server_option;
118+ mysql_shutdown;
119+ mysql_sqlstate;
120+ mysql_ssl_set;
121+ mysql_stat;
122+ mysql_stmt_affected_rows;
123+ mysql_stmt_attr_get;
124+ mysql_stmt_attr_set;
125+ mysql_stmt_bind_param;
126+ mysql_stmt_bind_result;
127+ mysql_stmt_close;
128+ mysql_stmt_data_seek;
129+ mysql_stmt_errno;
130+ mysql_stmt_error;
131+ mysql_stmt_execute;
132+ mysql_stmt_fetch;
133+ mysql_stmt_fetch_column;
134+ mysql_stmt_field_count;
135+ mysql_stmt_free_result;
136+ mysql_stmt_init;
137+ mysql_stmt_insert_id;
138+ mysql_stmt_num_rows;
139+ mysql_stmt_param_count;
140+ mysql_stmt_param_metadata;
141+ mysql_stmt_prepare;
142+ mysql_stmt_reset;
143+ mysql_stmt_result_metadata;
144+ mysql_stmt_row_seek;
145+ mysql_stmt_row_tell;
146+ mysql_stmt_send_long_data;
147+ mysql_stmt_sqlstate;
148+ mysql_stmt_store_result;
149+ mysql_store_result;
150+ mysql_thread_end;
151+ mysql_thread_id;
152+ mysql_thread_init;
153+ mysql_thread_safe;
154+ mysql_use_result;
155+ mysql_warning_count;
156+# These are documented in Paul DuBois' MySQL book, so we treat them as part
157+# of the de-facto API.
158+ free_defaults;
159+ handle_options;
160+ load_defaults;
161+ my_print_help;
162+# This isn't really documented anywhere, but it seems to be part of the
163+# de-facto API as well. We're not going to export the deprecated version
164+# make_scrambled_password, however.
165+ my_make_scrambled_password;
166+ local:
167+ *;
168+};
169+# symbols added in mysql 5.5
170+libmysqlclient_18 {
171+ global:
172+ mysql_client_find_plugin;
173+ mysql_client_register_plugin;
174+ mysql_load_plugin;
175+ mysql_load_plugin_v;
176+ mysql_plugin_options;
177+ mysql_stmt_next_result;
178+#
179+# Ideally the following symbols wouldn't be exported, but various applications
180+# require them. We limit the namespace damage by prefixing mysql_
181+# (see mysql-dubious-exports.patch), which means the symbols are not present
182+# in libmysqlclient_16.
183+#
184+# mysql-connector-odbc requires these
185+ mysql_default_charset_info;
186+ mysql_get_charset;
187+ mysql_get_charset_by_csname;
188+ mysql_net_realloc;
189+# PHP's mysqli.so requires this (via the ER() macro)
190+ client_errors;
191+ mysql_client_errors;
192+};
193
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
199 # Create directories for rpmbuild if these don't exist
200 (cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
201-
202+cp -f $(readlink -f $(dirname $0))/rpm/*.patch ${WORKDIR}/SOURCES/
203 (
204 cd "$SOURCEDIR"
205
206@@ -133,7 +133,6 @@
207 then
208 sed -i 's/lib64/lib/' "$PRODUCT/cmake/install_layout.cmake"
209 fi
210-
211 # Create tarball for build
212 tar czf "$WORKDIR_ABS/SOURCES/$PRODUCT.tar.gz" "$PRODUCT/"*
213
214
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 ##############################################################################
220
221 %if %{commercial}
222-%define license_files_server %{src_dir}/LICENSE.mysql
223+%define license_files_server LICENSE.mysql
224 %define license_type Commercial
225 %else
226-%define license_files_server %{src_dir}/COPYING %{src_dir}/README
227+%define license_files_server COPYING README
228 %define license_type GPL
229 %endif
230
231@@ -228,6 +228,7 @@
232 Distribution: %{distro_description}
233 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 Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{majorversion}.%{minorversion}/source/%{src_dir}.tar.gz
235+Patch1: mysql-dubious-exports.patch
236 URL: http://www.percona.com/
237 Packager: Percona MySQL Development Team <mysqldev@percona.com>
238 Vendor: %{percona_server_vendor}
239@@ -323,8 +324,10 @@
240
241 ##############################################################################
242 %prep
243-%setup -T -a 0 -c -n %{src_dir}
244-
245+%setup -n %{src_dir}
246+#
247+%patch1 -p1
248+#
249 ##############################################################################
250 %build
251
252@@ -337,7 +340,7 @@
253 echo "Configuring HandlerSocket"
254 CXX="${HS_CXX:-g++}" \
255 MYSQL_CFLAGS="-I $RPM_BUILD_DIR/%{src_dir}/release/include" \
256- ./configure --with-mysql-source=$RPM_BUILD_DIR/%{src_dir}/%{src_dir} \
257+ ./configure --with-mysql-source=$RPM_BUILD_DIR/%{src_dir} \
258 --with-mysql-bindir=$RPM_BUILD_DIR/%{src_dir}/release/scripts \
259 --with-mysql-plugindir=%{_libdir}/mysql/plugin \
260 --libdir=%{_libdir} \
261@@ -350,7 +353,7 @@
262 cd UDF
263 CXX="${UDF_CXX:-g++}"\
264 CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \
265- ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/%{src_dir}/include \
266+ ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/include \
267 --libdir=%{_libdir}/mysql/plugin
268 make all
269 cd -
270@@ -405,7 +408,7 @@
271 -e 's/ $//'`
272 # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
273 # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
274- ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
275+ ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
276 -DCMAKE_BUILD_TYPE=Debug \
277 -DWITH_EMBEDDED_SERVER=OFF \
278 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
279@@ -422,7 +425,7 @@
280 cd release
281 # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
282 # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
283- ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
284+ ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
285 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
286 -DWITH_EMBEDDED_SERVER=OFF \
287 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
288@@ -432,7 +435,7 @@
289 -DWITH_PAM=ON
290 echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
291 make ${MAKE_JFLAG}
292- cd ../%{src_dir}
293+ cd ../
294 d="`pwd`"
295 BuildHandlerSocket
296 BuildUDF
297@@ -499,10 +502,10 @@
298 cd $MBD/release
299 make DESTDIR=$RBR benchdir_root=%{_datadir} install
300 d="`pwd`"
301- cd $MBD/%{src_dir}/storage/HandlerSocket-Plugin-for-MySQL
302+ cd $MBD/storage/HandlerSocket-Plugin-for-MySQL
303 make DESTDIR=$RBR benchdir_root=%{_datadir} install
304 cd "$d"
305- cd $MBD/%{src_dir}/UDF
306+ cd $MBD/UDF
307 make DESTDIR=$RBR benchdir_root=%{_datadir} install
308 cd "$d"
309 )
310@@ -531,7 +534,7 @@
311 touch $RBR%{_sysconfdir}/my.cnf
312
313 # Install SELinux files in datadir
314-install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \
315+install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \
316 $RBR%{_datadir}/mysql/SELinux/RHEL4
317
318 %if %{WITH_TCMALLOC}
319
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+Prefix mysql_ to the real names of several symbols that have to be exported
326+from libmysqlclient because mysql-connector-odbc and/or PHP depend on them.
327+This limits the intrusion on application namespace.
328+
329+Also, remove all traces of make_scrambled_password and
330+make_scrambled_password_323, so that references to these functions draw
331+compile-time warnings, per a suggestion from Paul Howarth in bug #690346.
332+It doesn't seem worth trying to get rid of all the internal symbols exposed
333+by mysql.h, but these two are relatively easy to get rid of.
334+
335+
336+diff -up mysql-5.5.28/client/mysqladmin.cc.p8 mysql-5.5.28/client/mysqladmin.cc
337+--- mysql-5.5.28/client/mysqladmin.cc.p8 2012-08-29 10:50:46.000000000 +0200
338++++ mysql-5.5.28/client/mysqladmin.cc 2012-12-06 14:16:14.598520859 +0100
339+@@ -21,6 +21,7 @@
340+ #include <my_pthread.h> /* because of signal() */
341+ #include <sys/stat.h>
342+ #include <mysql.h>
343++#include <password.h> /* my_make_scrambled_password_323, my_make_scrambled_password */
344+ #include <sql_common.h>
345+ #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
346+
347+@@ -989,9 +990,9 @@ static int execute_commands(MYSQL *mysql
348+ }
349+ }
350+ if (old)
351+- make_scrambled_password_323(crypted_pw, typed_password);
352++ my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password));
353+ else
354+- make_scrambled_password(crypted_pw, typed_password);
355++ my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password));
356+ }
357+ else
358+ crypted_pw[0]=0; /* No password */
359+diff -up mysql-5.5.28/include/mysql_com.h.p8 mysql-5.5.28/include/mysql_com.h
360+--- mysql-5.5.28/include/mysql_com.h.p8 2012-08-29 10:50:46.000000000 +0200
361++++ mysql-5.5.28/include/mysql_com.h 2012-12-06 14:16:14.599520860 +0100
362+@@ -452,6 +452,7 @@ my_bool my_net_init(NET *net, Vio* vio);
363+ void my_net_local_init(NET *net);
364+ void net_end(NET *net);
365+ void net_clear(NET *net, my_bool clear_buffer);
366++#define net_realloc mysql_net_realloc /* namespace sanity */
367+ my_bool net_realloc(NET *net, size_t length);
368+ my_bool net_flush(NET *net);
369+ my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
370+@@ -533,14 +534,12 @@ double my_rnd(struct rand_struct *);
371+ void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
372+
373+ void hash_password(unsigned long *to, const char *password, unsigned int password_len);
374+-void make_scrambled_password_323(char *to, const char *password);
375+ void scramble_323(char *to, const char *message, const char *password);
376+ my_bool check_scramble_323(const unsigned char *reply, const char *message,
377+ unsigned long *salt);
378+ void get_salt_from_password_323(unsigned long *res, const char *password);
379+ void make_password_from_salt_323(char *to, const unsigned long *salt);
380+
381+-void make_scrambled_password(char *to, const char *password);
382+ void scramble(char *to, const char *message, const char *password);
383+ my_bool check_scramble(const unsigned char *reply, const char *message,
384+ const unsigned char *hash_stage2);
385+diff -up mysql-5.5.28/include/mysql.h.pp.p8 mysql-5.5.28/include/mysql.h.pp
386+--- mysql-5.5.28/include/mysql.h.pp.p8 2012-08-29 10:50:46.000000000 +0200
387++++ mysql-5.5.28/include/mysql.h.pp 2012-12-06 14:16:14.598520859 +0100
388+@@ -86,7 +86,7 @@ my_bool my_net_init(NET *net, Vio* vio);
389+ void my_net_local_init(NET *net);
390+ void net_end(NET *net);
391+ void net_clear(NET *net, my_bool clear_buffer);
392+-my_bool net_realloc(NET *net, size_t length);
393++my_bool mysql_net_realloc(NET *net, size_t length);
394+ my_bool net_flush(NET *net);
395+ my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
396+ my_bool net_write_command(NET *net,unsigned char command,
397+@@ -128,13 +128,11 @@ void randominit(struct rand_struct *, un
398+ double my_rnd(struct rand_struct *);
399+ void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
400+ void hash_password(unsigned long *to, const char *password, unsigned int password_len);
401+-void make_scrambled_password_323(char *to, const char *password);
402+ void scramble_323(char *to, const char *message, const char *password);
403+ my_bool check_scramble_323(const unsigned char *reply, const char *message,
404+ unsigned long *salt);
405+ void get_salt_from_password_323(unsigned long *res, const char *password);
406+ void make_password_from_salt_323(char *to, const unsigned long *salt);
407+-void make_scrambled_password(char *to, const char *password);
408+ void scramble(char *to, const char *message, const char *password);
409+ my_bool check_scramble(const unsigned char *reply, const char *message,
410+ const unsigned char *hash_stage2);
411+diff -up mysql-5.5.28/include/my_sys.h.p8 mysql-5.5.28/include/my_sys.h
412+--- mysql-5.5.28/include/my_sys.h.p8 2012-12-06 14:09:15.218170154 +0100
413++++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:16:14.598520859 +0100
414+@@ -218,6 +218,7 @@ extern uint my_large_page_size;
415+
416+ /* charsets */
417+ #define MY_ALL_CHARSETS_SIZE 2048
418++#define default_charset_info mysql_default_charset_info /* namespace sanity */
419+ extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
420+ extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
421+ extern CHARSET_INFO compiled_charsets[];
422+@@ -895,6 +896,9 @@ extern uint get_charset_number(const cha
423+ extern uint get_collation_number(const char *name);
424+ extern const char *get_charset_name(uint cs_number);
425+
426++#define get_charset mysql_get_charset /* namespace sanity */
427++#define get_charset_by_csname mysql_get_charset_by_csname
428++
429+ extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
430+ extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
431+ extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
432+diff -up mysql-5.5.28/sql/password.c.p8 mysql-5.5.28/sql/password.c
433+--- mysql-5.5.28/sql/password.c.p8 2012-08-29 10:50:46.000000000 +0200
434++++ mysql-5.5.28/sql/password.c 2012-12-06 14:16:14.599520860 +0100
435+@@ -155,23 +155,6 @@ void my_make_scrambled_password_323(char
436+
437+
438+ /*
439+- Wrapper around my_make_scrambled_password_323() to maintain client lib ABI
440+- compatibility.
441+- In server code usage of my_make_scrambled_password_323() is preferred to
442+- avoid strlen().
443+- SYNOPSIS
444+- make_scrambled_password_323()
445+- to OUT store scrambled password here
446+- password IN NULL-terminated string with user-supplied password
447+-*/
448+-
449+-void make_scrambled_password_323(char *to, const char *password)
450+-{
451+- my_make_scrambled_password_323(to, password, strlen(password));
452+-}
453+-
454+-
455+-/*
456+ Scramble string with password.
457+ Used in pre 4.1 authentication phase.
458+ SYNOPSIS
459+@@ -434,23 +417,6 @@ void my_make_scrambled_password(char *to
460+
461+
462+ /*
463+- Wrapper around my_make_scrambled_password() to maintain client lib ABI
464+- compatibility.
465+- In server code usage of my_make_scrambled_password() is preferred to
466+- avoid strlen().
467+- SYNOPSIS
468+- make_scrambled_password()
469+- buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string
470+- password IN NULL-terminated password string
471+-*/
472+-
473+-void make_scrambled_password(char *to, const char *password)
474+-{
475+- my_make_scrambled_password(to, password, strlen(password));
476+-}
477+-
478+-
479+-/*
480+ Produce an obscure octet sequence from password and random
481+ string, recieved from the server. This sequence corresponds to the
482+ password, but password can not be easily restored from it. The sequence

Subscribers

People subscribed via source and target branches