summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2016-08-19 15:27:37 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2016-08-19 15:27:37 +0000
commit7b89b9f5108c80f4f270da922d7e6c182a663719 (patch)
tree858a3873942f07610fb26685781e8bdbd3ab2c7f /libmysqld/lib_sql.cc
parentdaff133ddf9a9d120050703c0b5753979c6190e0 (diff)
downloadmariadb-git-7b89b9f5108c80f4f270da922d7e6c182a663719.tar.gz
MDEV-9293 Connector/C integration
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc18
1 files changed, 9 insertions, 9 deletions
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)))