diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-08-19 15:27:37 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-08-19 15:27:37 +0000 |
commit | 7b89b9f5108c80f4f270da922d7e6c182a663719 (patch) | |
tree | 858a3873942f07610fb26685781e8bdbd3ab2c7f /libmysqld | |
parent | daff133ddf9a9d120050703c0b5753979c6190e0 (diff) | |
download | mariadb-git-7b89b9f5108c80f4f270da922d7e6c182a663719.tar.gz |
MDEV-9293 Connector/C integration
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 4 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 368f30f8317..688522a6cd6 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -37,8 +37,8 @@ ${CMAKE_BINARY_DIR}/sql/lex_hash.h SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED TRUE) SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc - ../libmysql/libmysql.c ../libmysql/errmsg.c ../client/get_password.c - ../sql-common/client.c ../sql-common/my_time.c + ../libmysql/libmysql.c ../libmysql/errmsg.c ../mysys/get_password.c + ../sql-common/client.c ../sql-common/my_user.c ../sql-common/pack.c ../sql-common/client_plugin.c ../sql-common/mysql_async.c ../sql/password.c ../sql/discover.cc ../sql/derror.cc diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 4a84e63f222..311dc0a5b9a 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -647,7 +647,7 @@ void end_embedded_server() void init_embedded_mysql(MYSQL *mysql, int client_flag) { THD *thd = (THD *)mysql->thd; - thd->mysql= mysql; + thd->emb_mysql= mysql; mysql->server_version= server_version; mysql->client_flag= client_flag; init_alloc_root(&mysql->field_alloc, 8192, 0, MYF(0)); @@ -929,7 +929,7 @@ static bool write_eof_packet(THD *thd, uint server_status, uint statement_warn_count) { - if (!thd->mysql) // bootstrap file handling + if (!thd->emb_mysql) // bootstrap file handling return FALSE; /* The following test should never be true, but it's better to do it @@ -1013,7 +1013,7 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags) MYSQL_DATA *data; DBUG_ENTER("send_result_set_metadata"); - if (!thd->mysql) // bootstrap file handling + if (!thd->emb_mysql) // bootstrap file handling DBUG_RETURN(0); if (begin_dataset()) @@ -1118,7 +1118,7 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags) bool Protocol::write() { - if (!thd->mysql) // bootstrap file handling + if (!thd->emb_mysql) // bootstrap file handling return false; *next_field= 0; @@ -1176,7 +1176,7 @@ net_send_ok(THD *thd, { DBUG_ENTER("emb_net_send_ok"); MYSQL_DATA *data; - MYSQL *mysql= thd->mysql; + MYSQL *mysql= thd->emb_mysql; if (!mysql) // bootstrap file handling DBUG_RETURN(FALSE); @@ -1220,7 +1220,7 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err, MYSQL_DATA *data= thd->cur_data; struct embedded_query_result *ei; - if (!thd->mysql) // bootstrap file handling + if (!thd->emb_mysql) // bootstrap file handling { fprintf(stderr, "ERROR: %d %s\n", sql_errno, err); return TRUE; @@ -1250,7 +1250,7 @@ void Protocol_text::prepare_for_resend() MYSQL_DATA *data= thd->cur_data; DBUG_ENTER("send_data"); - if (!thd->mysql) // bootstrap file handling + if (!thd->emb_mysql) // bootstrap file handling DBUG_VOID_RETURN; data->rows++; @@ -1283,7 +1283,7 @@ bool Protocol_text::store_null() bool Protocol::net_store_data(const uchar *from, size_t length) { char *field_buf; - if (!thd->mysql) // bootstrap file handling + if (!thd->emb_mysql) // bootstrap file handling return FALSE; if (!(field_buf= (char*) alloc_root(alloc, length + sizeof(uint) + 1))) @@ -1306,7 +1306,7 @@ bool Protocol::net_store_data_cs(const uchar *from, size_t length, uint conv_length= to_cs->mbmaxlen * length / from_cs->mbminlen; uint dummy_error; char *field_buf; - if (!thd->mysql) // bootstrap file handling + if (!thd->emb_mysql) // bootstrap file handling return false; if (!(field_buf= (char*) alloc_root(alloc, conv_length + sizeof(uint) + 1))) |