Skip to content

Commit e3b8e25

Browse files
author
Tor Didriksen
committed
Bug#22127020 GET RID OF DYNAMIC_ARRAY IN ST_MYSQL_OPTIONS
Patch one: libmysqld.c -> libmysqld.cc, client.c -> client.cc
1 parent b508086 commit e3b8e25

File tree

8 files changed

+79
-56
lines changed

8 files changed

+79
-56
lines changed

libmysql/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ SET(CLIENT_SOURCES
165165
get_password.c
166166
libmysql.c
167167
errmsg.c
168-
../sql-common/client.c
168+
../sql-common/client.cc
169169
../sql-common/my_time.c
170170
../sql-common/client_plugin.c
171171
../sql-common/client_authentication.cc

libmysql/client_settings.h

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ extern char * mysql_unix_port;
4040
CLIENT_SESSION_TRACK | \
4141
CLIENT_DEPRECATE_EOF)
4242

43+
C_MODE_START
4344
void read_user_name(char *name);
4445
my_bool handle_local_infile(MYSQL *mysql, const char *net_filename);
4546

@@ -62,6 +63,7 @@ int cli_read_binary_rows(MYSQL_STMT *stmt);
6263
int cli_unbuffered_fetch(MYSQL *mysql, char **row);
6364
const char * cli_read_statistics(MYSQL *mysql);
6465
int cli_read_change_user_result(MYSQL *mysql);
66+
C_MODE_END
6567

6668
#ifdef EMBEDDED_LIBRARY
6769
C_MODE_START

libmysqld/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ ENDFOREACH()
5858
SET(SQL_EMBEDDED_SOURCES
5959
emb_qcache.cc
6060
lib_sql.cc
61-
libmysqld.c
61+
libmysqld.cc
6262
${GEN_SOURCES}
6363
${GEN_YACC_SOURCES}
6464
../client/get_password.c
6565
../libmysql/errmsg.c
6666
../libmysql/libmysql.c
67-
../sql-common/client.c
67+
../sql-common/client.cc
6868
../sql-common/client_plugin.c
6969
../sql-common/my_time.c
7070
../sql-common/my_user.c

libmysqld/lib_sql.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@
4545
using std::min;
4646
using std::max;
4747

48-
extern "C" {
4948

5049
extern unsigned int mysql_server_last_errno;
5150
extern char mysql_server_last_error[MYSQL_ERRMSG_SIZE];
51+
52+
extern "C" {
53+
5254
static my_bool emb_read_query_result(MYSQL *mysql);
5355

5456

libmysqld/libmysqld.c renamed to libmysqld/libmysqld.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
141141
if (db)
142142
client_flag|=CLIENT_CONNECT_WITH_DB;
143143

144-
mysql->info_buffer= my_malloc(PSI_NOT_INSTRUMENTED,
145-
MYSQL_ERRMSG_SIZE, MYF(0));
144+
mysql->info_buffer= static_cast<char*>(my_malloc(PSI_NOT_INSTRUMENTED,
145+
MYSQL_ERRMSG_SIZE, MYF(0)));
146146
mysql->thd= create_embedded_thd(client_flag);
147147

148148
init_embedded_mysql(mysql, client_flag);

0 commit comments

Comments
 (0)