summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/CMakeLists.txt84
-rw-r--r--libmysqld/lib_sql.cc11
-rw-r--r--libmysqld/libmysql.c19
3 files changed, 25 insertions, 89 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index c133e5a4378..efdf7277e5b 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -43,7 +43,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
libmysql.c ../sql-common/errmsg.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-common/client_plugin.c
../sql/password.c ../sql/discover.cc ../sql/derror.cc
../sql/field.cc ../sql/field_conv.cc ../sql/field_comp.cc
../sql/filesort_utils.cc ../sql/sql_digest.cc
@@ -78,7 +78,8 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_binlog.cc ../sql/sql_manager.cc
../sql/sql_parse.cc ../sql/sql_bootstrap.cc
../sql/sql_partition.cc ../sql/sql_plugin.cc
- ../sql/debug_sync.cc ../sql/opt_table_elimination.cc
+ ../sql/debug_sync.cc ../sql/debug.cc
+ ../sql/opt_table_elimination.cc
../sql/sql_prepare.cc ../sql/sql_rename.cc ../sql/sql_repl.cc
../sql/sql_select.cc ../sql/sql_servers.cc
../sql/group_by_handler.cc ../sql/derived_handler.cc
@@ -86,6 +87,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_show.cc ../sql/sql_state.c
../sql/sql_statistics.cc ../sql/sql_string.cc
../sql/sql_tablespace.cc ../sql/sql_table.cc ../sql/sql_test.cc
+ ../sql/ddl_log.cc
../sql/sql_trigger.cc ../sql/sql_udf.cc ../sql/sql_union.cc
../sql/sql_update.cc ../sql/sql_view.cc ../sql/sql_profile.cc
../sql/gcalc_tools.cc ../sql/gcalc_slicescan.cc
@@ -134,6 +136,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/item_vers.cc
../sql/opt_trace.cc
../sql/xa.cc
+ ../sql/json_table.cc
${GEN_SOURCES}
${MYSYS_LIBWRAP_SOURCE}
)
@@ -309,82 +312,7 @@ mysql_client_register_plugin
mysql_load_plugin
mysql_load_plugin_v
mysql_plugin_options
-# Async API
-mysql_get_timeout_value
-mysql_get_timeout_value_ms
-mysql_get_socket
-mysql_autocommit_cont
-mysql_autocommit_start
-mysql_change_user_cont
-mysql_change_user_start
-mysql_close_cont
-mysql_close_start
-mysql_commit_cont
-mysql_commit_start
-mysql_dump_debug_info_cont
-mysql_dump_debug_info_start
-mysql_fetch_row_cont
-mysql_fetch_row_start
-mysql_free_result_cont
-mysql_free_result_start
-mysql_kill_cont
-mysql_kill_start
-mysql_list_dbs_cont
-mysql_list_dbs_start
-mysql_list_fields_cont
-mysql_list_fields_start
-mysql_list_processes_cont
-mysql_list_processes_start
-mysql_list_tables_cont
-mysql_list_tables_start
-mysql_next_result_cont
-mysql_next_result_start
-mysql_ping_cont
-mysql_ping_start
-mysql_query_cont
-mysql_query_start
-mysql_read_query_result_cont
-mysql_read_query_result_start
-mysql_real_connect_cont
-mysql_real_connect_start
-mysql_real_query_cont
-mysql_real_query_start
-mysql_refresh_cont
-mysql_refresh_start
-mysql_rollback_cont
-mysql_rollback_start
-mysql_select_db_cont
-mysql_select_db_start
-mysql_send_query_cont
-mysql_send_query_start
-mysql_set_character_set_cont
-mysql_set_character_set_start
-mysql_set_server_option_cont
-mysql_set_server_option_start
-mysql_shutdown_cont
-mysql_shutdown_start
-mysql_stat_cont
-mysql_stat_start
-mysql_stmt_close_cont
-mysql_stmt_close_start
-mysql_stmt_execute_cont
-mysql_stmt_execute_start
-mysql_stmt_fetch_cont
-mysql_stmt_fetch_start
-mysql_stmt_free_result_cont
-mysql_stmt_free_result_start
-mysql_stmt_next_result_cont
-mysql_stmt_next_result_start
-mysql_stmt_prepare_cont
-mysql_stmt_prepare_start
-mysql_stmt_reset_cont
-mysql_stmt_reset_start
-mysql_stmt_send_long_data_cont
-mysql_stmt_send_long_data_start
-mysql_stmt_store_result_cont
-mysql_stmt_store_result_start
-mysql_store_result_cont
-mysql_store_result_start
+
#dynamic columns api
dynamic_column_create
dynamic_column_create_many
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index c6493773db0..3d0482d1cd5 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -168,8 +168,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
arg_length= header_length;
}
- result= dispatch_command(command, thd, (char *) arg, arg_length, FALSE,
- FALSE);
+ result= dispatch_command(command, thd, (char *) arg, arg_length);
thd->cur_data= 0;
thd->mysys_var= NULL;
@@ -642,7 +641,11 @@ int init_embedded_server(int argc, char **argv, char **groups)
}
}
- execute_ddl_log_recovery();
+ if (ddl_log_execute_recovery() > 0)
+ {
+ mysql_server_end();
+ return 1;
+ }
mysql_embedded_init= 1;
return 0;
}
@@ -1259,7 +1262,7 @@ bool Protocol_binary::write()
bool Protocol::net_send_ok(THD *thd,
uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong id, const char *message,
- bool, bool)
+ bool)
{
DBUG_ENTER("emb_net_send_ok");
MYSQL_DATA *data;
diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c
index 9a17b9b4f09..2c954cea390 100644
--- a/libmysqld/libmysql.c
+++ b/libmysqld/libmysql.c
@@ -512,7 +512,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
if (my_net_write(net, (uchar*) buf, readcount))
{
DBUG_PRINT("error",
- ("Lost connection to MySQL server during LOAD DATA of local file"));
+ ("Lost connection to server during LOAD DATA of local file"));
set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate);
goto err;
}
@@ -1114,15 +1114,15 @@ ulong STDCALL mysql_thread_id(MYSQL *mysql)
const char * STDCALL mysql_character_set_name(MYSQL *mysql)
{
- return mysql->charset->csname;
+ return mysql->charset->cs_name.str;
}
void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo)
{
csinfo->number = mysql->charset->number;
csinfo->state = mysql->charset->state;
- csinfo->csname = mysql->charset->csname;
- csinfo->name = mysql->charset->name;
+ csinfo->csname = mysql->charset->cs_name.str;
+ csinfo->name = mysql->charset->coll_name.str;
csinfo->comment = mysql->charset->comment;
csinfo->mbminlen = mysql->charset->mbminlen;
csinfo->mbmaxlen = mysql->charset->mbmaxlen;
@@ -1210,16 +1210,21 @@ mysql_hex_string(char *to, const char *from, ulong length)
ulong STDCALL
mysql_escape_string(char *to,const char *from,ulong length)
{
- return (uint) escape_string_for_mysql(default_charset_info, to, 0, from, length);
+ my_bool overflow;
+ return (uint) escape_string_for_mysql(default_charset_info, to, 0, from,
+ length, &overflow);
}
ulong STDCALL
mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
ulong length)
{
+ my_bool overflow;
if (mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)
- return (uint) escape_quotes_for_mysql(mysql->charset, to, 0, from, length);
- return (uint) escape_string_for_mysql(mysql->charset, to, 0, from, length);
+ return (ulong) escape_quotes_for_mysql(mysql->charset, to, 0, from, length,
+ &overflow);
+ return (ulong) escape_string_for_mysql(mysql->charset, to, 0, from, length,
+ &overflow);
}
void STDCALL