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
=== modified file 'Percona-Server/include/errmsg.h'
--- Percona-Server/include/errmsg.h 2011-06-30 15:46:53 +0000
+++ Percona-Server/include/errmsg.h 2013-04-09 12:03:23 +0000
@@ -25,6 +25,7 @@
25void init_client_errs(void);25void init_client_errs(void);
26void finish_client_errs(void);26void finish_client_errs(void);
27extern const char *client_errors[]; /* Error messages */27extern const char *client_errors[]; /* Error messages */
28extern const char **mysql_client_errors; /* Error messages */
28#ifdef __cplusplus29#ifdef __cplusplus
29}30}
30#endif31#endif
3132
=== modified file 'Percona-Server/libmysql/CMakeLists.txt'
--- Percona-Server/libmysql/CMakeLists.txt 2012-02-16 09:48:16 +0000
+++ Percona-Server/libmysql/CMakeLists.txt 2013-04-09 12:03:23 +0000
@@ -208,8 +208,11 @@
208 IF(NOT libmysql_link_flag)208 IF(NOT libmysql_link_flag)
209 SET(libmysql_link_flags)209 SET(libmysql_link_flags)
210 ENDIF()210 ENDIF()
211 SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS 211 IF(INSTALL_LAYOUT STREQUAL "RPM")
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}")
213 ELSE()
214 SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}")
215 ENDIF(INSTALL_LAYOUT STREQUAL "RPM")
213 ENDIF() 216 ENDIF()
214 # clean direct output needs to be set several targets have the same name217 # clean direct output needs to be set several targets have the same name
215 #(mysqlclient in this case)218 #(mysqlclient in this case)
216219
=== modified file 'Percona-Server/libmysql/errmsg.c'
--- Percona-Server/libmysql/errmsg.c 2011-06-30 15:46:53 +0000
+++ Percona-Server/libmysql/errmsg.c 2013-04-09 12:03:23 +0000
@@ -23,6 +23,7 @@
23#include <my_sys.h>23#include <my_sys.h>
24#include "errmsg.h"24#include "errmsg.h"
2525
26const char **mysql_client_errors = client_errors;
26const char *client_errors[]=27const char *client_errors[]=
27{28{
28 "Unknown MySQL error",29 "Unknown MySQL error",
2930
=== added file 'Percona-Server/libmysql/libmysql.map'
--- Percona-Server/libmysql/libmysql.map 1970-01-01 00:00:00 +0000
+++ Percona-Server/libmysql/libmysql.map 2013-04-09 12:03:23 +0000
@@ -0,0 +1,146 @@
1# symbols exported from mysql 5.1
2libmysqlclient_16 {
3 global:
4 _fini;
5 _init;
6 my_init;
7 myodbc_remove_escape;
8 mysql_affected_rows;
9 mysql_autocommit;
10 mysql_change_user;
11 mysql_character_set_name;
12 mysql_close;
13 mysql_commit;
14 mysql_data_seek;
15 mysql_debug;
16 mysql_dump_debug_info;
17 mysql_embedded;
18 mysql_eof;
19 mysql_errno;
20 mysql_error;
21 mysql_escape_string;
22 mysql_fetch_field;
23 mysql_fetch_field_direct;
24 mysql_fetch_fields;
25 mysql_fetch_lengths;
26 mysql_fetch_row;
27 mysql_field_count;
28 mysql_field_seek;
29 mysql_field_tell;
30 mysql_free_result;
31 mysql_get_character_set_info;
32 mysql_get_client_info;
33 mysql_get_client_version;
34 mysql_get_host_info;
35 mysql_get_parameters;
36 mysql_get_proto_info;
37 mysql_get_server_info;
38 mysql_get_server_version;
39 mysql_get_ssl_cipher;
40 mysql_hex_string;
41 mysql_info;
42 mysql_init;
43 mysql_insert_id;
44 mysql_kill;
45 mysql_list_dbs;
46 mysql_list_fields;
47 mysql_list_processes;
48 mysql_list_tables;
49 mysql_more_results;
50 mysql_next_result;
51 mysql_num_fields;
52 mysql_num_rows;
53 mysql_options;
54 mysql_ping;
55 mysql_query;
56 mysql_read_query_result;
57 mysql_real_connect;
58 mysql_real_escape_string;
59 mysql_real_query;
60 mysql_refresh;
61 mysql_rollback;
62 mysql_row_seek;
63 mysql_row_tell;
64 mysql_select_db;
65 mysql_send_query;
66 mysql_server_end;
67 mysql_server_init;
68 mysql_set_character_set;
69 mysql_set_local_infile_default;
70 mysql_set_local_infile_handler;
71 mysql_set_server_option;
72 mysql_shutdown;
73 mysql_sqlstate;
74 mysql_ssl_set;
75 mysql_stat;
76 mysql_stmt_affected_rows;
77 mysql_stmt_attr_get;
78 mysql_stmt_attr_set;
79 mysql_stmt_bind_param;
80 mysql_stmt_bind_result;
81 mysql_stmt_close;
82 mysql_stmt_data_seek;
83 mysql_stmt_errno;
84 mysql_stmt_error;
85 mysql_stmt_execute;
86 mysql_stmt_fetch;
87 mysql_stmt_fetch_column;
88 mysql_stmt_field_count;
89 mysql_stmt_free_result;
90 mysql_stmt_init;
91 mysql_stmt_insert_id;
92 mysql_stmt_num_rows;
93 mysql_stmt_param_count;
94 mysql_stmt_param_metadata;
95 mysql_stmt_prepare;
96 mysql_stmt_reset;
97 mysql_stmt_result_metadata;
98 mysql_stmt_row_seek;
99 mysql_stmt_row_tell;
100 mysql_stmt_send_long_data;
101 mysql_stmt_sqlstate;
102 mysql_stmt_store_result;
103 mysql_store_result;
104 mysql_thread_end;
105 mysql_thread_id;
106 mysql_thread_init;
107 mysql_thread_safe;
108 mysql_use_result;
109 mysql_warning_count;
110# These are documented in Paul DuBois' MySQL book, so we treat them as part
111# of the de-facto API.
112 free_defaults;
113 handle_options;
114 load_defaults;
115 my_print_help;
116# This isn't really documented anywhere, but it seems to be part of the
117# de-facto API as well. We're not going to export the deprecated version
118# make_scrambled_password, however.
119 my_make_scrambled_password;
120 local:
121 *;
122};
123# symbols added in mysql 5.5
124libmysqlclient_18 {
125 global:
126 mysql_client_find_plugin;
127 mysql_client_register_plugin;
128 mysql_load_plugin;
129 mysql_load_plugin_v;
130 mysql_plugin_options;
131 mysql_stmt_next_result;
132#
133# Ideally the following symbols wouldn't be exported, but various applications
134# require them. We limit the namespace damage by prefixing mysql_
135# (see mysql-dubious-exports.patch), which means the symbols are not present
136# in libmysqlclient_16.
137#
138# mysql-connector-odbc requires these
139 mysql_default_charset_info;
140 mysql_get_charset;
141 mysql_get_charset_by_csname;
142 mysql_net_realloc;
143# PHP's mysqli.so requires this (via the ER() macro)
144 client_errors;
145 mysql_client_errors;
146};
0147
=== modified file 'build/build-rpm.sh'
--- build/build-rpm.sh 2013-03-06 10:47:52 +0000
+++ build/build-rpm.sh 2013-04-09 12:03:23 +0000
@@ -121,7 +121,7 @@
121121
122# Create directories for rpmbuild if these don't exist122# Create directories for rpmbuild if these don't exist
123(cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)123(cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
124124cp -f $(readlink -f $(dirname $0))/rpm/*.patch ${WORKDIR}/SOURCES/
125(125(
126 cd "$SOURCEDIR"126 cd "$SOURCEDIR"
127 127
@@ -133,7 +133,6 @@
133 then133 then
134 sed -i 's/lib64/lib/' "$PRODUCT/cmake/install_layout.cmake"134 sed -i 's/lib64/lib/' "$PRODUCT/cmake/install_layout.cmake"
135 fi135 fi
136
137 # Create tarball for build136 # Create tarball for build
138 tar czf "$WORKDIR_ABS/SOURCES/$PRODUCT.tar.gz" "$PRODUCT/"*137 tar czf "$WORKDIR_ABS/SOURCES/$PRODUCT.tar.gz" "$PRODUCT/"*
139138
140139
=== modified file 'build/percona-server.spec'
--- build/percona-server.spec 2013-04-08 06:26:11 +0000
+++ build/percona-server.spec 2013-04-09 12:03:23 +0000
@@ -209,10 +209,10 @@
209##############################################################################209##############################################################################
210210
211%if %{commercial}211%if %{commercial}
212%define license_files_server %{src_dir}/LICENSE.mysql212%define license_files_server LICENSE.mysql
213%define license_type Commercial213%define license_type Commercial
214%else214%else
215%define license_files_server %{src_dir}/COPYING %{src_dir}/README215%define license_files_server COPYING README
216%define license_type GPL216%define license_type GPL
217%endif217%endif
218218
@@ -228,6 +228,7 @@
228Distribution: %{distro_description}228Distribution: %{distro_description}
229License: 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.229License: 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.
230Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{majorversion}.%{minorversion}/source/%{src_dir}.tar.gz230Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{majorversion}.%{minorversion}/source/%{src_dir}.tar.gz
231Patch1: mysql-dubious-exports.patch
231URL: http://www.percona.com/232URL: http://www.percona.com/
232Packager: Percona MySQL Development Team <mysqldev@percona.com>233Packager: Percona MySQL Development Team <mysqldev@percona.com>
233Vendor: %{percona_server_vendor}234Vendor: %{percona_server_vendor}
@@ -323,8 +324,10 @@
323324
324##############################################################################325##############################################################################
325%prep326%prep
326%setup -T -a 0 -c -n %{src_dir}327%setup -n %{src_dir}
327328#
329%patch1 -p1
330#
328##############################################################################331##############################################################################
329%build332%build
330333
@@ -337,7 +340,7 @@
337 echo "Configuring HandlerSocket"340 echo "Configuring HandlerSocket"
338 CXX="${HS_CXX:-g++}" \341 CXX="${HS_CXX:-g++}" \
339 MYSQL_CFLAGS="-I $RPM_BUILD_DIR/%{src_dir}/release/include" \342 MYSQL_CFLAGS="-I $RPM_BUILD_DIR/%{src_dir}/release/include" \
340 ./configure --with-mysql-source=$RPM_BUILD_DIR/%{src_dir}/%{src_dir} \343 ./configure --with-mysql-source=$RPM_BUILD_DIR/%{src_dir} \
341 --with-mysql-bindir=$RPM_BUILD_DIR/%{src_dir}/release/scripts \344 --with-mysql-bindir=$RPM_BUILD_DIR/%{src_dir}/release/scripts \
342 --with-mysql-plugindir=%{_libdir}/mysql/plugin \345 --with-mysql-plugindir=%{_libdir}/mysql/plugin \
343 --libdir=%{_libdir} \346 --libdir=%{_libdir} \
@@ -350,7 +353,7 @@
350 cd UDF353 cd UDF
351 CXX="${UDF_CXX:-g++}"\354 CXX="${UDF_CXX:-g++}"\
352 CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \355 CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \
353 ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/%{src_dir}/include \356 ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/include \
354 --libdir=%{_libdir}/mysql/plugin357 --libdir=%{_libdir}/mysql/plugin
355 make all358 make all
356 cd -359 cd -
@@ -405,7 +408,7 @@
405 -e 's/ $//'`408 -e 's/ $//'`
406 # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before409 # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
407 # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM410 # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
408 ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \411 ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
409 -DCMAKE_BUILD_TYPE=Debug \412 -DCMAKE_BUILD_TYPE=Debug \
410 -DWITH_EMBEDDED_SERVER=OFF \413 -DWITH_EMBEDDED_SERVER=OFF \
411 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \414 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
@@ -422,7 +425,7 @@
422 cd release425 cd release
423 # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before426 # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
424 # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM427 # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
425 ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \428 ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
426 -DCMAKE_BUILD_TYPE=RelWithDebInfo \429 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
427 -DWITH_EMBEDDED_SERVER=OFF \430 -DWITH_EMBEDDED_SERVER=OFF \
428 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \431 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
@@ -432,7 +435,7 @@
432 -DWITH_PAM=ON435 -DWITH_PAM=ON
433 echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG436 echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
434 make ${MAKE_JFLAG}437 make ${MAKE_JFLAG}
435 cd ../%{src_dir}438 cd ../
436 d="`pwd`"439 d="`pwd`"
437 BuildHandlerSocket440 BuildHandlerSocket
438 BuildUDF441 BuildUDF
@@ -499,10 +502,10 @@
499 cd $MBD/release502 cd $MBD/release
500 make DESTDIR=$RBR benchdir_root=%{_datadir} install503 make DESTDIR=$RBR benchdir_root=%{_datadir} install
501 d="`pwd`"504 d="`pwd`"
502 cd $MBD/%{src_dir}/storage/HandlerSocket-Plugin-for-MySQL505 cd $MBD/storage/HandlerSocket-Plugin-for-MySQL
503 make DESTDIR=$RBR benchdir_root=%{_datadir} install506 make DESTDIR=$RBR benchdir_root=%{_datadir} install
504 cd "$d"507 cd "$d"
505 cd $MBD/%{src_dir}/UDF508 cd $MBD/UDF
506 make DESTDIR=$RBR benchdir_root=%{_datadir} install509 make DESTDIR=$RBR benchdir_root=%{_datadir} install
507 cd "$d"510 cd "$d"
508)511)
@@ -531,7 +534,7 @@
531touch $RBR%{_sysconfdir}/my.cnf534touch $RBR%{_sysconfdir}/my.cnf
532535
533# Install SELinux files in datadir536# Install SELinux files in datadir
534install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \537install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \
535 $RBR%{_datadir}/mysql/SELinux/RHEL4538 $RBR%{_datadir}/mysql/SELinux/RHEL4
536539
537%if %{WITH_TCMALLOC}540%if %{WITH_TCMALLOC}
538541
=== added directory 'build/rpm'
=== added file 'build/rpm/mysql-dubious-exports.patch'
--- build/rpm/mysql-dubious-exports.patch 1970-01-01 00:00:00 +0000
+++ build/rpm/mysql-dubious-exports.patch 2013-04-09 12:03:23 +0000
@@ -0,0 +1,158 @@
1Prefix mysql_ to the real names of several symbols that have to be exported
2from libmysqlclient because mysql-connector-odbc and/or PHP depend on them.
3This limits the intrusion on application namespace.
4
5Also, remove all traces of make_scrambled_password and
6make_scrambled_password_323, so that references to these functions draw
7compile-time warnings, per a suggestion from Paul Howarth in bug #690346.
8It doesn't seem worth trying to get rid of all the internal symbols exposed
9by mysql.h, but these two are relatively easy to get rid of.
10
11
12diff -up mysql-5.5.28/client/mysqladmin.cc.p8 mysql-5.5.28/client/mysqladmin.cc
13--- mysql-5.5.28/client/mysqladmin.cc.p8 2012-08-29 10:50:46.000000000 +0200
14+++ mysql-5.5.28/client/mysqladmin.cc 2012-12-06 14:16:14.598520859 +0100
15@@ -21,6 +21,7 @@
16 #include <my_pthread.h> /* because of signal() */
17 #include <sys/stat.h>
18 #include <mysql.h>
19+#include <password.h> /* my_make_scrambled_password_323, my_make_scrambled_password */
20 #include <sql_common.h>
21 #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
22
23@@ -989,9 +990,9 @@ static int execute_commands(MYSQL *mysql
24 }
25 }
26 if (old)
27- make_scrambled_password_323(crypted_pw, typed_password);
28+ my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password));
29 else
30- make_scrambled_password(crypted_pw, typed_password);
31+ my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password));
32 }
33 else
34 crypted_pw[0]=0; /* No password */
35diff -up mysql-5.5.28/include/mysql_com.h.p8 mysql-5.5.28/include/mysql_com.h
36--- mysql-5.5.28/include/mysql_com.h.p8 2012-08-29 10:50:46.000000000 +0200
37+++ mysql-5.5.28/include/mysql_com.h 2012-12-06 14:16:14.599520860 +0100
38@@ -452,6 +452,7 @@ my_bool my_net_init(NET *net, Vio* vio);
39 void my_net_local_init(NET *net);
40 void net_end(NET *net);
41 void net_clear(NET *net, my_bool clear_buffer);
42+#define net_realloc mysql_net_realloc /* namespace sanity */
43 my_bool net_realloc(NET *net, size_t length);
44 my_bool net_flush(NET *net);
45 my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
46@@ -533,14 +534,12 @@ double my_rnd(struct rand_struct *);
47 void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
48
49 void hash_password(unsigned long *to, const char *password, unsigned int password_len);
50-void make_scrambled_password_323(char *to, const char *password);
51 void scramble_323(char *to, const char *message, const char *password);
52 my_bool check_scramble_323(const unsigned char *reply, const char *message,
53 unsigned long *salt);
54 void get_salt_from_password_323(unsigned long *res, const char *password);
55 void make_password_from_salt_323(char *to, const unsigned long *salt);
56
57-void make_scrambled_password(char *to, const char *password);
58 void scramble(char *to, const char *message, const char *password);
59 my_bool check_scramble(const unsigned char *reply, const char *message,
60 const unsigned char *hash_stage2);
61diff -up mysql-5.5.28/include/mysql.h.pp.p8 mysql-5.5.28/include/mysql.h.pp
62--- mysql-5.5.28/include/mysql.h.pp.p8 2012-08-29 10:50:46.000000000 +0200
63+++ mysql-5.5.28/include/mysql.h.pp 2012-12-06 14:16:14.598520859 +0100
64@@ -86,7 +86,7 @@ my_bool my_net_init(NET *net, Vio* vio);
65 void my_net_local_init(NET *net);
66 void net_end(NET *net);
67 void net_clear(NET *net, my_bool clear_buffer);
68-my_bool net_realloc(NET *net, size_t length);
69+my_bool mysql_net_realloc(NET *net, size_t length);
70 my_bool net_flush(NET *net);
71 my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
72 my_bool net_write_command(NET *net,unsigned char command,
73@@ -128,13 +128,11 @@ void randominit(struct rand_struct *, un
74 double my_rnd(struct rand_struct *);
75 void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
76 void hash_password(unsigned long *to, const char *password, unsigned int password_len);
77-void make_scrambled_password_323(char *to, const char *password);
78 void scramble_323(char *to, const char *message, const char *password);
79 my_bool check_scramble_323(const unsigned char *reply, const char *message,
80 unsigned long *salt);
81 void get_salt_from_password_323(unsigned long *res, const char *password);
82 void make_password_from_salt_323(char *to, const unsigned long *salt);
83-void make_scrambled_password(char *to, const char *password);
84 void scramble(char *to, const char *message, const char *password);
85 my_bool check_scramble(const unsigned char *reply, const char *message,
86 const unsigned char *hash_stage2);
87diff -up mysql-5.5.28/include/my_sys.h.p8 mysql-5.5.28/include/my_sys.h
88--- mysql-5.5.28/include/my_sys.h.p8 2012-12-06 14:09:15.218170154 +0100
89+++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:16:14.598520859 +0100
90@@ -218,6 +218,7 @@ extern uint my_large_page_size;
91
92 /* charsets */
93 #define MY_ALL_CHARSETS_SIZE 2048
94+#define default_charset_info mysql_default_charset_info /* namespace sanity */
95 extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
96 extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
97 extern CHARSET_INFO compiled_charsets[];
98@@ -895,6 +896,9 @@ extern uint get_charset_number(const cha
99 extern uint get_collation_number(const char *name);
100 extern const char *get_charset_name(uint cs_number);
101
102+#define get_charset mysql_get_charset /* namespace sanity */
103+#define get_charset_by_csname mysql_get_charset_by_csname
104+
105 extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
106 extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
107 extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
108diff -up mysql-5.5.28/sql/password.c.p8 mysql-5.5.28/sql/password.c
109--- mysql-5.5.28/sql/password.c.p8 2012-08-29 10:50:46.000000000 +0200
110+++ mysql-5.5.28/sql/password.c 2012-12-06 14:16:14.599520860 +0100
111@@ -155,23 +155,6 @@ void my_make_scrambled_password_323(char
112
113
114 /*
115- Wrapper around my_make_scrambled_password_323() to maintain client lib ABI
116- compatibility.
117- In server code usage of my_make_scrambled_password_323() is preferred to
118- avoid strlen().
119- SYNOPSIS
120- make_scrambled_password_323()
121- to OUT store scrambled password here
122- password IN NULL-terminated string with user-supplied password
123-*/
124-
125-void make_scrambled_password_323(char *to, const char *password)
126-{
127- my_make_scrambled_password_323(to, password, strlen(password));
128-}
129-
130-
131-/*
132 Scramble string with password.
133 Used in pre 4.1 authentication phase.
134 SYNOPSIS
135@@ -434,23 +417,6 @@ void my_make_scrambled_password(char *to
136
137
138 /*
139- Wrapper around my_make_scrambled_password() to maintain client lib ABI
140- compatibility.
141- In server code usage of my_make_scrambled_password() is preferred to
142- avoid strlen().
143- SYNOPSIS
144- make_scrambled_password()
145- buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string
146- password IN NULL-terminated password string
147-*/
148-
149-void make_scrambled_password(char *to, const char *password)
150-{
151- my_make_scrambled_password(to, password, strlen(password));
152-}
153-
154-
155-/*
156 Produce an obscure octet sequence from password and random
157 string, recieved from the server. This sequence corresponds to the
158 password, but password can not be easily restored from it. The sequence

Subscribers

People subscribed via source and target branches