Commit 10db9f4b authored by marko@hundin.mysql.fi's avatar marko@hundin.mysql.fi

Merge marko@build.mysql.com:/home/bk/mysql-4.0

into hundin.mysql.fi:/home/marko/l/mysql-4.0
parents 8ab135a7 a2a1e43c
...@@ -7,25 +7,25 @@ ...@@ -7,25 +7,25 @@
CFG=mysqlclient - Win32 Debug CFG=mysqlclient - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "mysqlclient.mak". !MESSAGE NMAKE /f "mysqlclient.mak".
!MESSAGE !MESSAGE
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "mysqlclient.mak" CFG="mysqlclient - Win32 Debug" !MESSAGE NMAKE /f "mysqlclient.mak" CFG="mysqlclient - Win32 Debug"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "mysqlclient - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "mysqlclient - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mysqlclient - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE "mysqlclient - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "" # PROP Scc_ProjName ""
# PROP Scc_LocalPath "" # PROP Scc_LocalPath ""
CPP=xicl6.exe CPP=cl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "mysqlclient - Win32 Release" !IF "$(CFG)" == "mysqlclient - Win32 Release"
...@@ -48,7 +48,7 @@ RSC=rc.exe ...@@ -48,7 +48,7 @@ RSC=rc.exe
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LIB32=xilink6.exe -lib LIB32=link.exe -lib
# ADD BASE LIB32 /nologo # ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_release\mysqlclient.lib" # ADD LIB32 /nologo /out:"..\lib_release\mysqlclient.lib"
...@@ -72,11 +72,11 @@ LIB32=xilink6.exe -lib ...@@ -72,11 +72,11 @@ LIB32=xilink6.exe -lib
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LIB32=xilink6.exe -lib LIB32=link.exe -lib
# ADD BASE LIB32 /nologo # ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_debug\mysqlclient.lib" # ADD LIB32 /nologo /out:"..\lib_debug\mysqlclient.lib"
!ENDIF !ENDIF
# Begin Target # Begin Target
...@@ -228,7 +228,7 @@ SOURCE=..\mysys\mf_iocache2.c ...@@ -228,7 +228,7 @@ SOURCE=..\mysys\mf_iocache2.c
# ADD CPP /Od # ADD CPP /Od
!ENDIF !ENDIF
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -482,6 +482,10 @@ SOURCE=..\strings\strxmov.c ...@@ -482,6 +482,10 @@ SOURCE=..\strings\strxmov.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\strings\strxnmov.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c SOURCE=..\mysys\thr_mutex.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -38,6 +38,9 @@ Package=<5> ...@@ -38,6 +38,9 @@ Package=<5>
Package=<4> Package=<4>
{{{ {{{
Begin Project Dependency
Project_Dep_Name mysys
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
......
...@@ -56,7 +56,7 @@ static bool get_interval_info(const char *str,uint length,uint count, ...@@ -56,7 +56,7 @@ static bool get_interval_info(const char *str,uint length,uint count,
{ {
longlong value; longlong value;
for (value=0; str != end && isdigit(*str) ; str++) for (value=0; str != end && isdigit(*str) ; str++)
value=value*10LL + (long) (*str - '0'); value=value*LL(10) + (long) (*str - '0');
values[i]= value; values[i]= value;
while (str != end && !isdigit(*str)) while (str != end && !isdigit(*str))
str++; str++;
...@@ -1015,9 +1015,9 @@ bool Item_date_add_interval::get_date(TIME *ltime, bool fuzzy_date) ...@@ -1015,9 +1015,9 @@ bool Item_date_add_interval::get_date(TIME *ltime, bool fuzzy_date)
days--; days--;
sec+=3600*LL(24); sec+=3600*LL(24);
} }
ltime->second=sec % 60; ltime->second= (uint)(sec % 60);
ltime->minute=sec/60 % 60; ltime->minute= (uint)(sec/60 % 60);
ltime->hour=sec/3600; ltime->hour= (uint)(sec/3600);
daynr= calc_daynr(ltime->year,ltime->month,1) + days; daynr= calc_daynr(ltime->year,ltime->month,1) + days;
if ((ulonglong) daynr >= 3652424) // Day number from year 0 to 9999-12-31 if ((ulonglong) daynr >= 3652424) // Day number from year 0 to 9999-12-31
goto null_date; goto null_date;
......
...@@ -1862,12 +1862,12 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli) ...@@ -1862,12 +1862,12 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli)
else else
{ {
slave_print_error(rli,expected_error, slave_print_error(rli,expected_error,
"query '%s' partially completed on the master \ "query partially completed on the master \
(error on master: %d) \ (error on master: %d) \
and was aborted. There is a chance that your master is inconsistent at this \ and was aborted. There is a chance that your master is inconsistent at this \
point. If you are sure that your master is ok, run this query manually on the\ point. If you are sure that your master is ok, run this query manually on the\
slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;\ slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;\
START SLAVE; .", thd->query, expected_error); START SLAVE; . Query: '%s'", expected_error, thd->query);
thd->query_error= 1; thd->query_error= 1;
} }
goto end; goto end;
...@@ -1896,15 +1896,13 @@ point. If you are sure that your master is ok, run this query manually on the\ ...@@ -1896,15 +1896,13 @@ point. If you are sure that your master is ok, run this query manually on the\
{ {
slave_print_error(rli, 0, slave_print_error(rli, 0,
"\ "\
Query '%s' caused different errors on master and slave. \ Query caused different errors on master and slave. \
Error on master: '%s' (%d), Error on slave: '%s' (%d). \ Error on master: '%s' (%d), Error on slave: '%s' (%d). \
Default database: '%s'", Default database: '%s'. Query: '%s'",
query,
ER_SAFE(expected_error), ER_SAFE(expected_error),
expected_error, expected_error,
actual_error ? thd->net.last_error: "no error", actual_error ? thd->net.last_error: "no error",
actual_error, actual_error, print_slave_db_safe(db), query);
print_slave_db_safe(db));
thd->query_error= 1; thd->query_error= 1;
} }
/* /*
...@@ -1919,11 +1917,10 @@ Default database: '%s'", ...@@ -1919,11 +1917,10 @@ Default database: '%s'",
else if (thd->query_error || thd->fatal_error) else if (thd->query_error || thd->fatal_error)
{ {
slave_print_error(rli,actual_error, slave_print_error(rli,actual_error,
"Error '%s' on query '%s'. Default database: '%s'", "Error '%s' on query. Default database: '%s'. Query: '%s'",
(actual_error ? thd->net.last_error : (actual_error ? thd->net.last_error :
"unexpected success or fatal error"), "unexpected success or fatal error"),
query, print_slave_db_safe(db), query);
print_slave_db_safe(db));
thd->query_error= 1; thd->query_error= 1;
} }
} /* End of if (db_ok(... */ } /* End of if (db_ok(... */
......
...@@ -3674,7 +3674,7 @@ relay logs", ...@@ -3674,7 +3674,7 @@ relay logs",
"Change the value of a variable. Please note that this option is deprecated;you can set variables directly with --variable-name=value.", "Change the value of a variable. Please note that this option is deprecated;you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"show-slave-auth-info", OPT_SHOW_SLAVE_AUTH_INFO, {"show-slave-auth-info", OPT_SHOW_SLAVE_AUTH_INFO,
"Show user and password in SHOW SLAVE STATUS", "Show user and password in SHOW SLAVE HOSTS on this master",
(gptr*) &opt_show_slave_auth_info, (gptr*) &opt_show_slave_auth_info, 0, (gptr*) &opt_show_slave_auth_info, (gptr*) &opt_show_slave_auth_info, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"concurrent-insert", OPT_CONCURRENT_INSERT, {"concurrent-insert", OPT_CONCURRENT_INSERT,
......
...@@ -1776,7 +1776,7 @@ int register_slave_on_master(MYSQL* mysql) ...@@ -1776,7 +1776,7 @@ int register_slave_on_master(MYSQL* mysql)
packet.append((char)0); packet.append((char)0);
if (report_password) if (report_password)
net_store_data(&packet, report_user); net_store_data(&packet, report_password);
else else
packet.append((char)0); packet.append((char)0);
......
...@@ -2255,9 +2255,15 @@ static void mysql_rm_tmp_tables(void) ...@@ -2255,9 +2255,15 @@ static void mysql_rm_tmp_tables(void)
** Remove all SQLxxx tables from directory ** Remove all SQLxxx tables from directory
*/ */
for (idx=2 ; idx < (uint) dirp->number_off_files ; idx++) for (idx=0 ; idx < (uint) dirp->number_off_files ; idx++)
{ {
file=dirp->dir_entry+idx; file=dirp->dir_entry+idx;
/* skiping . and .. */
if (file->name[0] == '.' && (!file->name[1] ||
(file->name[1] == '.' && !file->name[2])))
continue;
if (!bcmp(file->name,tmp_file_prefix,tmp_file_prefix_length)) if (!bcmp(file->name,tmp_file_prefix,tmp_file_prefix_length))
{ {
sprintf(filePath,"%s%s",mysql_tmpdir,file->name); /* purecov: inspected */ sprintf(filePath,"%s%s",mysql_tmpdir,file->name); /* purecov: inspected */
......
...@@ -237,7 +237,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, ...@@ -237,7 +237,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
tot_list_next= &tot_list; tot_list_next= &tot_list;
for (uint idx=2 ; for (uint idx=0 ;
idx < (uint) dirp->number_off_files && !thd->killed ; idx < (uint) dirp->number_off_files && !thd->killed ;
idx++) idx++)
{ {
...@@ -245,6 +245,11 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, ...@@ -245,6 +245,11 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
char *extension; char *extension;
DBUG_PRINT("info",("Examining: %s", file->name)); DBUG_PRINT("info",("Examining: %s", file->name));
/* skiping . and .. */
if (file->name[0] == '.' && (!file->name[1] ||
(file->name[1] == '.' && !file->name[2])))
continue;
/* Check if file is a raid directory */ /* Check if file is a raid directory */
if ((isdigit(file->name[0]) || if ((isdigit(file->name[0]) ||
(file->name[0] >= 'a' && file->name[0] <= 'f')) && (file->name[0] >= 'a' && file->name[0] <= 'f')) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment