mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Portability fixes (for windows)
Some changes to the prepared statement protocol to make it easier to use and faster. Makefile.am: Fix to make dist to work with cmd-line-utils client/mysql.cc: Portability fixes client/mysqlbinlog.cc: Portabiliy fixes and remove usafe of FILE configure.in: Fix to make dist to work with cmd-line-utils heap/_check.c: Portability fixes include/config-win.h: Portability fixes include/m_ctype.h: Indentation cleanup include/my_list.h: Portability fixes include/mysql.h: Cleanup of BIND structure include/violite.h: Portability fixes innobase/dict/dict0dict.c: Portability fixes innobase/dict/dict0load.c: Portability fixes innobase/include/os0proc.h: Portability fixes (Heikki, please check) innobase/os/os0proc.c: Portability fixes (Heikki, please check) innobase/ut/ut0ut.c: Portability fixes isam/pack_isam.c: Portability fixes libmysql/libmysql.c: Portability fixes Remove obscure usage of the length parameter for prepared statements. libmysql/libmysql.def: Remove not existing functions libmysqld/lib_sql.cc: Remove compiler warning mysql-test/r/explain.result: Fix after merge mysql-test/r/join.result: Fix after merge mysys/my_once.c: Portability fix mysys/tree.c: Portability fixes sql/field.cc: Portability fixes sql/filesort.cc: move assert.h to mysql_priv.h sql/ha_berkeley.cc: move assert.h to mysql_priv.h sql/ha_innodb.cc: move assert.h to mysql_priv.h sql/item.cc: move assert.h to mysql_priv.h Fixed syntax error sql/item_cmpfunc.cc: move assert.h to mysql_priv.h sql/item_func.cc: move assert.h to mysql_priv.h sql/item_row.cc: move assert.h to mysql_priv.h sql/item_strfunc.cc: Portability fix sql/item_subselect.cc: Portability fix sql/item_sum.cc: move assert.h to mysql_priv.h sql/lex.h: Portability fix sql/lock.cc: move assert.h to mysql_priv.h sql/log.cc: move assert.h to mysql_priv.h sql/log_event.cc: Portability fix sql/mf_iocache.cc: move assert.h to mysql_priv.h sql/mysql_priv.h: move assert.h to mysql_priv.h sql/mysqld.cc: move assert.h to mysql_priv.h sql/opt_range.cc: move assert.h to mysql_priv.h sql/password.c: Portability fix sql/protocol.cc: move assert.h to mysql_priv.h sql/set_var.cc: Portability fix sql/slave.cc: move assert.h to mysql_priv.h sql/spatial.cc: Portability fix sql/sql_acl.cc: move assert.h to mysql_priv.h sql/sql_base.cc: move assert.h to mysql_priv.h sql/sql_cache.cc: move assert.h to mysql_priv.h sql/sql_class.cc: move assert.h to mysql_priv.h sql/sql_handler.cc: move assert.h to mysql_priv.h sql/sql_help.cc: Removed compiler warning sql/sql_lex.cc: Portability fix sql/sql_lex.h: Portability fix sql/sql_parse.cc: move assert.h to mysql_priv.h sql/sql_prepare.cc: move assert.h to mysql_priv.h sql/sql_repl.cc: move assert.h to mysql_priv.h sql/sql_select.cc: move assert.h to mysql_priv.h sql/sql_string.cc: Portability fix sql/sql_string.h: Portability fix sql/sql_table.cc: move assert.h to mysql_priv.h sql/sql_yacc.yy: Portability fix Remove not accessed code strings/ctype-bin.c: Portability fix strings/ctype-mb.c: Portability fix strings/ctype.c: Portability fix tests/client_test.c: A
This commit is contained in:
@ -67,7 +67,8 @@ static void dump_remote_table(NET* net, const char* db, const char* table);
|
||||
static void die(const char* fmt, ...);
|
||||
static MYSQL* safe_connect();
|
||||
|
||||
class Load_log_processor {
|
||||
class Load_log_processor
|
||||
{
|
||||
char target_dir_name[MY_NFILE];
|
||||
int target_dir_name_len;
|
||||
DYNAMIC_ARRAY file_names;
|
||||
@ -103,12 +104,10 @@ class Load_log_processor {
|
||||
void append_to_file(const char* fname, int flags,
|
||||
gptr data, uint size)
|
||||
{
|
||||
FILE *file;
|
||||
if(!(file= my_fopen(fname,flags,MYF(MY_WME))))
|
||||
exit(1);
|
||||
if (my_fwrite(file,data,size,MYF(MY_WME|MY_NABP)))
|
||||
exit(1);
|
||||
if (my_fclose(file,MYF(MY_WME)))
|
||||
File file;
|
||||
if ((file= my_open(fname,flags,MYF(MY_WME)) < 0) ||
|
||||
my_write(file,(byte*) data,size,MYF(MY_WME|MY_NABP)) ||
|
||||
my_close(file,MYF(MY_WME)))
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -176,7 +175,7 @@ public:
|
||||
void process(Create_file_log_event *ce)
|
||||
{
|
||||
const char *fname= create_file(ce);
|
||||
append_to_file (fname,O_CREAT|O_BINARY,ce->block,ce->block_len);
|
||||
append_to_file(fname,O_CREAT|O_BINARY,ce->block,ce->block_len);
|
||||
}
|
||||
void process(Append_block_log_event *ae)
|
||||
{
|
||||
|
Reference in New Issue
Block a user