summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-10-14 17:50:44 +0300
committermonty@hundin.mysql.fi <>2002-10-14 17:50:44 +0300
commita975cecf4278e234916f8b6b48b41a2104d6a804 (patch)
treec79c25cc391968bfcdb07eaf6c69e1d0bf26358a
parent91c8660c5adaef78f50431a72719b2240be7ed13 (diff)
parent3c7f6a98357a0867a0a16c4c2a636ec83bdf72fd (diff)
downloadmariadb-git-a975cecf4278e234916f8b6b48b41a2104d6a804.tar.gz
Merge
-rw-r--r--VC++Files/client/mysqlclient.dsp4
-rwxr-xr-xVC++Files/fix-project-files7
-rw-r--r--VC++Files/libmysql/libmysql.dsp5
-rw-r--r--VC++Files/libmysqld/libmysqld.dsp39
-rw-r--r--VC++Files/myisam/myisam.dsp24
-rw-r--r--VC++Files/mysys/mysys.dsp4
-rw-r--r--VC++Files/sql/mysqld.dsp34
-rw-r--r--VC++Files/strings/strings.dsp4
-rw-r--r--client/mysql.cc4
-rw-r--r--heap/_check.c8
-rw-r--r--include/mysql.h10
-rw-r--r--libmysql/libmysql.def5
-rw-r--r--sql/ha_innodb.cc4
-rw-r--r--sql/init.cc1
-rw-r--r--sql/log.cc1
-rw-r--r--sql/net_pkg.cc4
-rw-r--r--sql/sql_db.cc7
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_parse.cc5
-rw-r--r--sql/sql_prepare.cc1
-rw-r--r--sql/sql_select.cc7
-rw-r--r--sql/sql_show.cc5
-rw-r--r--sql/sql_union.cc4
23 files changed, 136 insertions, 53 deletions
diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp
index d03623cedb9..7bc38eb913a 100644
--- a/VC++Files/client/mysqlclient.dsp
+++ b/VC++Files/client/mysqlclient.dsp
@@ -136,6 +136,10 @@ SOURCE="..\strings\ctype-latin1_de.c"
# End Source File
# Begin Source File
+SOURCE="..\strings\ctype-simple.c"
+# End Source File
+# Begin Source File
+
SOURCE="..\strings\ctype-sjis.c"
# End Source File
# Begin Source File
diff --git a/VC++Files/fix-project-files b/VC++Files/fix-project-files
new file mode 100755
index 00000000000..b63ceab318a
--- /dev/null
+++ b/VC++Files/fix-project-files
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+#
+# Change linefeed -> return+linefeed for all VC++ project files
+#
+
+find . \( -name "*.dsp" -o -name "*.dsw" \) -print | grep -v "SCCS" | xargs replace '\r\$' ' ' '\$' ' ' --
diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp
index ea5ef096561..6b86c69917c 100644
--- a/VC++Files/libmysql/libmysql.dsp
+++ b/VC++Files/libmysql/libmysql.dsp
@@ -147,6 +147,10 @@ SOURCE="..\strings\ctype-latin1_de.c"
# End Source File
# Begin Source File
+SOURCE="..\strings\ctype-simple.c"
+# End Source File
+# Begin Source File
+
SOURCE="..\strings\ctype-sjis.c"
# End Source File
# Begin Source File
@@ -256,6 +260,7 @@ SOURCE=..\mysys\my_alloc.c
# Begin Source File
SOURCE=..\mysys\my_compress.c
+# ADD CPP /I "../zlib"
# End Source File
# Begin Source File
diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp
index bd20c75a24e..6eeb1fcd603 100644
--- a/VC++Files/libmysqld/libmysqld.dsp
+++ b/VC++Files/libmysqld/libmysqld.dsp
@@ -43,8 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /FR /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /FR /FD /mktyplib203 /win32 # ADD BASE MTL /c
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x416 /d "NDEBUG"
# ADD RSC /l 0x416 /d "NDEBUG"
@@ -53,8 +52,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib"
-# SUBTRACT LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib # SUBTRACT LINK32 /nologo /dll /pdb:none /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib"
!ELSEIF "$(CFG)" == "libmysqld - Win32 Debug"
@@ -70,8 +68,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /Gm /Zi /Od /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD CPP /nologo /MT /W3 /Gm /Zi /Od /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /mktyplib203 /win32 # ADD BASE MTL /c
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x416 /d "_DEBUG"
# ADD RSC /l 0x416 /d "_DEBUG"
@@ -80,8 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_debug\dbug.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\innodb.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib:"LIBCMTD" /out:"../lib_debug/libmysqld.dll" /implib:"../lib_debug/libmysqld.lib" /pdbtype:sept
-# SUBTRACT LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_debug\dbug.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\innodb.lib # SUBTRACT LINK32 /nologo /dll /pdb:none /debug /machine:I386 /nodefaultlib:"LIBCMTD" /out:"../lib_debug/libmysqld.dll" /implib:"../lib_debug/libmysqld.lib"
!ENDIF
@@ -119,6 +115,10 @@ SOURCE=..\libmysql\get_password.c
# End Source File
# Begin Source File
+SOURCE=..\sql\gstream.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\sql\ha_berkeley.cpp
# End Source File
# Begin Source File
@@ -176,6 +176,7 @@ SOURCE=..\sql\item_create.cpp
# Begin Source File
SOURCE=..\sql\item_func.cpp
+# ADD CPP /I "../zlib"
# End Source File
# Begin Source File
@@ -183,6 +184,10 @@ SOURCE=..\sql\item_strfunc.cpp
# End Source File
# Begin Source File
+SOURCE=..\sql\item_subselect.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\sql\item_sum.cpp
# End Source File
# Begin Source File
@@ -271,7 +276,7 @@ SOURCE=..\sql\set_var.cpp
# End Source File
# Begin Source File
-SOURCE=..\sql\slave.cpp
+SOURCE=..\sql\spatial.cpp
# End Source File
# Begin Source File
@@ -307,10 +312,18 @@ SOURCE=..\sql\sql_delete.cpp
# End Source File
# Begin Source File
+SOURCE=..\sql\sql_derived.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\sql\sql_do.cpp
# End Source File
# Begin Source File
+SOURCE=..\sql\sql_error.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\sql\sql_handler.cpp
# End Source File
# Begin Source File
@@ -327,10 +340,6 @@ SOURCE=..\sql\sql_list.cpp
# End Source File
# Begin Source File
-SOURCE=..\sql\sql_load.cpp
-# End Source File
-# Begin Source File
-
SOURCE=..\sql\sql_manager.cpp
# End Source File
# Begin Source File
@@ -340,6 +349,10 @@ SOURCE=..\sql\sql_map.cpp
# Begin Source File
SOURCE=..\sql\sql_parse.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\sql\sql_prepare.cpp
# End Source File
# Begin Source File
diff --git a/VC++Files/myisam/myisam.dsp b/VC++Files/myisam/myisam.dsp
index 8346cddbc54..96cb85f7139 100644
--- a/VC++Files/myisam/myisam.dsp
+++ b/VC++Files/myisam/myisam.dsp
@@ -265,8 +265,28 @@ SOURCE=.\mi_write.c
# End Source File
# Begin Source File
+SOURCE=.\rt_index.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rt_key.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rt_mbr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rt_split.c
+# End Source File
+# Begin Source File
+
SOURCE=.\sort.c
# End Source File
+# Begin Source File
+
+SOURCE=.\sp_key.c
+# End Source File
# End Group
# Begin Group "Header Files"
@@ -279,6 +299,10 @@ SOURCE=.\ft_eval.h
SOURCE=.\myisamdef.h
# End Source File
+# Begin Source File
+
+SOURCE=.\rt_index.h
+# End Source File
# End Group
# End Target
# End Project
diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp
index c4c21d9a6db..fb92fce0e2e 100644
--- a/VC++Files/mysys/mysys.dsp
+++ b/VC++Files/mysys/mysys.dsp
@@ -326,6 +326,10 @@ SOURCE=.\my_getwd.c
# End Source File
# Begin Source File
+SOURCE=.\my_handler.c
+# End Source File
+# Begin Source File
+
SOURCE=.\my_init.c
# End Source File
# Begin Source File
diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp
index ac5550ad2b2..47b61fb9c37 100644
--- a/VC++Files/sql/mysqld.dsp
+++ b/VC++Files/sql/mysqld.dsp
@@ -282,6 +282,10 @@ SOURCE=.\filesort.cpp
# End Source File
# Begin Source File
+SOURCE=.\gstream.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\ha_berkeley.cpp
# End Source File
# Begin Source File
@@ -460,17 +464,25 @@ SOURCE=.\item_func.cpp
!IF "$(CFG)" == "mysqld - Win32 Release"
+# ADD CPP /I "../zlib"
+
!ELSEIF "$(CFG)" == "mysqld - Win32 Debug"
-# ADD CPP /G5
+# ADD CPP /G5 /I "../zlib"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "mysqld - Win32 nt"
+# ADD CPP /I "../zlib"
+
!ELSEIF "$(CFG)" == "mysqld - Win32 Max nt"
+# ADD CPP /I "../zlib"
+
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
+# ADD CPP /I "../zlib"
+
!ENDIF
# End Source File
@@ -496,6 +508,10 @@ SOURCE=.\item_strfunc.cpp
# End Source File
# Begin Source File
+SOURCE=.\item_subselect.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\item_sum.cpp
!IF "$(CFG)" == "mysqld - Win32 Release"
@@ -811,6 +827,10 @@ SOURCE=.\slave.cpp
# End Source File
# Begin Source File
+SOURCE=.\spatial.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\sql_acl.cpp
!IF "$(CFG)" == "mysqld - Win32 Release"
@@ -927,10 +947,18 @@ SOURCE=.\sql_delete.cpp
# End Source File
# Begin Source File
+SOURCE=.\sql_derived.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\sql_do.cpp
# End Source File
# Begin Source File
+SOURCE=.\sql_error.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\sql_handler.cpp
# End Source File
# Begin Source File
@@ -1059,6 +1087,10 @@ SOURCE=.\sql_parse.cpp
# End Source File
# Begin Source File
+SOURCE=.\sql_prepare.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\sql_rename.cpp
# End Source File
# Begin Source File
diff --git a/VC++Files/strings/strings.dsp b/VC++Files/strings/strings.dsp
index 52655947790..1433b8d05f6 100644
--- a/VC++Files/strings/strings.dsp
+++ b/VC++Files/strings/strings.dsp
@@ -128,6 +128,10 @@ SOURCE=".\ctype-latin1_de.c"
# End Source File
# Begin Source File
+SOURCE=".\ctype-simple.c"
+# End Source File
+# Begin Source File
+
SOURCE=".\ctype-sjis.c"
# End Source File
# Begin Source File
diff --git a/client/mysql.cc b/client/mysql.cc
index 769a2b94e78..0e54a5e1c32 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -91,8 +91,8 @@ extern "C" {
#define vidattr(A) {} // Can't get this to work
#endif
-#ifdef __WIN__
-#define cmp_database(A,B) my_strcasecmp((A),(B))
+#ifdef FN_NO_CASE_SENCE
+#define cmp_database(A,B) my_strcasecmp(system_charset_info, (A), (B))
#else
#define cmp_database(A,B) strcmp((A),(B))
#endif
diff --git a/heap/_check.c b/heap/_check.c
index fcc40a5413d..4a6482901d9 100644
--- a/heap/_check.c
+++ b/heap/_check.c
@@ -116,13 +116,11 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
SEARCH_FIND | SEARCH_SAME, &not_used))
{
error= 1;
- DBUG_PRINT("error",("Record in wrong link: Link %d Record: %lx\n",
- key, recpos));
+ DBUG_PRINT("error",("Record in wrong link: key: %d Record: %lx\n",
+ keynr, recpos));
}
else
- {
found++;
- }
key= tree_search_next(&keydef->rb_tree, &info->last_pos,
offsetof(TREE_ELEMENT, left),
offsetof(TREE_ELEMENT, right));
@@ -130,7 +128,7 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
}
if (found != records)
{
- DBUG_PRINT("error",("Found %ld of %ld records", found, records));
+ DBUG_PRINT("error",("Found %lu of %lu records", found, records));
error= 1;
}
if (print_status)
diff --git a/include/mysql.h b/include/mysql.h
index 64b118ca8b1..710f5006724 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -275,7 +275,7 @@ my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql);
unsigned int STDCALL mysql_errno(MYSQL *mysql);
const char * STDCALL mysql_error(MYSQL *mysql);
-uint STDCALL mysql_warning_count(MYSQL *mysql);
+unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
const char * STDCALL mysql_info(MYSQL *mysql);
unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
const char * STDCALL mysql_character_set_name(MYSQL *mysql);
@@ -427,7 +427,7 @@ typedef struct st_mysql_bind
/* The following are for internal use. Set by mysql_bind_param */
long bind_length; /* Default length of data */
my_bool long_ended; /* All data supplied for long */
- uint param_number; /* For null count and error messages */
+ unsigned int param_number; /* For null count and error messages */
void (*store_param_func)(NET *net, struct st_mysql_bind *param);
char *(*fetch_result)(struct st_mysql_bind *, const char *row);
} MYSQL_BIND;
@@ -448,7 +448,7 @@ typedef struct st_mysql_stmt
unsigned long field_count; /* fields count */
unsigned long long_length; /* long buffer alloced length */
unsigned long stmt_id; /* Id for prepared statement */
- uint last_errno; /* error code */
+ unsigned int last_errno; /* error code */
enum MY_STMT_STATE state; /* statement state */
char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
my_bool long_alloced; /* flag to indicate long alloced */
@@ -463,14 +463,14 @@ unsigned long STDCALL mysql_param_count(MYSQL_STMT * stmt);
my_bool STDCALL mysql_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bind);
my_bool STDCALL mysql_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bind);
my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
-uint STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
+unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
my_bool STDCALL mysql_commit(MYSQL * mysql);
my_bool STDCALL mysql_rollback(MYSQL * mysql);
my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
int STDCALL mysql_fetch(MYSQL_STMT *stmt);
my_bool STDCALL mysql_send_long_data(MYSQL_STMT *stmt,
- uint param_number,
+ unsigned int param_number,
const char *data,
unsigned long length,
my_bool last_data);
diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def
index c15d6be61f4..a7fb4d378e5 100644
--- a/libmysql/libmysql.def
+++ b/libmysql/libmysql.def
@@ -1,6 +1,6 @@
LIBRARY LIBMYSQL
-DESCRIPTION 'MySQL 4.0 Client Library'
-VERSION 5.0
+DESCRIPTION 'MySQL 4.1 Client Library'
+VERSION 6.0
EXPORTS
mysql_affected_rows
mysql_close
@@ -59,7 +59,6 @@ EXPORTS
list_add
list_delete
max_allowed_packet
- my_casecmp
my_init
my_end
my_strdup
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 02f1d33b1dc..f75f431ad52 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -3155,8 +3155,8 @@ innobase_drop_database(
memcpy(namebuf, ptr, len);
namebuf[len] = '/';
namebuf[len + 1] = '\0';
-#ifdef __WIN__
- casedn_str(namebuf);
+#ifdef FN_NO_CASE_SENCE
+ my_casedn_str(system_charset_info, namebuf);
#endif
trx = trx_allocate_for_mysql();
diff --git a/sql/init.cc b/sql/init.cc
index 052ee16925e..8834fd3a89c 100644
--- a/sql/init.cc
+++ b/sql/init.cc
@@ -24,7 +24,6 @@ void unireg_init(ulong options)
{
uint i;
double nr;
- CHARSET_INFO *cs;
DBUG_ENTER("unireg_init");
MYSYS_PROGRAM_DONT_USE_CURSES();
diff --git a/sql/log.cc b/sql/log.cc
index 59f99e3460e..8cb1577d745 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -973,7 +973,6 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command,
last_time=skr;
struct tm tm_tmp;
struct tm *start;
- ulong length;
localtime_r(&skr,&tm_tmp);
start=&tm_tmp;
/* Note that my_b_write() assumes it knows the length for this */
diff --git a/sql/net_pkg.cc b/sql/net_pkg.cc
index 9f91db95052..1da625e776f 100644
--- a/sql/net_pkg.cc
+++ b/sql/net_pkg.cc
@@ -273,12 +273,12 @@ send_eof(THD *thd, bool no_flush)
{
if (!no_flush && (thd->client_capabilities & CLIENT_PROTOCOL_41))
{
- char buff[5];
+ uchar buff[5];
uint tmp= min(thd->total_warn_count, 65535);
buff[0]=254;
int2store(buff+1, tmp);
int2store(buff+3, 0); // No flags yet
- VOID(my_net_write(net,buff,5));
+ VOID(my_net_write(net,(char*) buff,5));
VOID(net_flush(net));
}
else
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 1d843b78d4e..58b12bca00d 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -69,7 +69,6 @@ static bool write_db_opt(const char *path, HA_CREATE_INFO *create)
error=0;
my_close(file,MYF(0));
}
-exit:
return error;
}
@@ -104,7 +103,7 @@ static bool load_db_opt(const char *path, HA_CREATE_INFO *create)
IO_CACHE cache;
init_io_cache(&cache, file, IO_SIZE, READ_CACHE, 0, 0, MYF(0));
- while ((int) (nbytes= my_b_gets(&cache, (byte*) buf, sizeof(buf))) > 0)
+ while ((int) (nbytes= my_b_gets(&cache, (char*) buf, sizeof(buf))) > 0)
{
char *pos= buf+nbytes-1;
/* Remove end space and control characters */
@@ -251,10 +250,8 @@ exit2:
int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
{
char path[FN_REFLEN+16];
- MY_DIR *dirp;
long result=1;
int error = 0;
- register File file;
uint create_options = create_info ? create_info->options : 0;
DBUG_ENTER("mysql_alter_db");
@@ -602,7 +599,7 @@ bool mysql_change_db(THD *thd, const char *name)
int mysqld_show_create_db(THD *thd, const char *dbname)
{
- int length, db_length;
+ int length;
char path[FN_REFLEN], *to;
uint db_access;
bool found_libchar;
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index fe708d3b782..f301e4c8af0 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -210,7 +210,7 @@ private:
SELECT_LEX_UNIT - unit of selects (UNION, INTERSECT, ...) group
SELECT_LEXs
*/
-class st_lex;
+struct st_lex;
class st_select_lex;
class THD;
class select_result;
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 7902e66043d..e096ef7869e 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1287,6 +1287,7 @@ mysql_execute_command(THD *thd)
int res= 0;
LEX *lex= &thd->lex;
TABLE_LIST *tables= (TABLE_LIST*) lex->select_lex.table_list.first;
+ TABLE_LIST *cursor;
SELECT_LEX *select_lex= &lex->select_lex;
SELECT_LEX_UNIT *unit= &lex->unit;
DBUG_ENTER("mysql_execute_command");
@@ -1343,7 +1344,7 @@ mysql_execute_command(THD *thd)
DBUG_VOID_RETURN;
}
//check rights
- for (TABLE_LIST *cursor= tables;
+ for (cursor= tables;
cursor;
cursor= cursor->next)
if (cursor->derived)
@@ -1361,7 +1362,7 @@ mysql_execute_command(THD *thd)
}
thd->send_explain_fields(explain_result);
// EXPLAIN derived tables
- for (TABLE_LIST *cursor= tables;
+ for (cursor= tables;
cursor;
cursor= cursor->next)
if (cursor->derived)
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index a085795fa76..bd115f0fc1e 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -634,7 +634,6 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length)
{
MEM_ROOT thd_root = thd->mem_root;
PREP_STMT stmt;
- bool error;
DBUG_ENTER("mysql_stmt_prepare");
bzero((char*) &stmt, sizeof(stmt));
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 09d41e2891b..801a3e556d5 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -171,7 +171,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
result->abort();
if (res || thd->net.report_error)
{
- send_error(thd, 0, MYF(0));
+ send_error(thd, 0, NullS);
res= 1;
}
delete result;
@@ -7176,7 +7176,6 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
bool distinct,const char *message)
{
List<Item> field_list;
- Item *item;
List<Item> item_list;
THD *thd=join->thd;
SELECT_LEX *select_lex = &(join->thd->lex.select_lex);
@@ -7190,7 +7189,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
if (message)
{
- item_list.push_back(new Item_int((int)thd->lex.select->select_number));
+ item_list.push_back(new Item_int((int32) thd->lex.select->select_number));
item_list.push_back(new Item_string(thd->lex.select->type,
strlen(thd->lex.select->type),
default_charset_info));
@@ -7217,7 +7216,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
tmp2.length(0);
item_list.empty();
- item_list.push_back(new Item_int((int)thd->lex.select->select_number));
+ item_list.push_back(new Item_int((int32) thd->lex.select->select_number));
item_list.push_back(new Item_string(thd->lex.select->type,
strlen(thd->lex.select->type),
default_charset_info));
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 214cd321562..d6fe2f3772a 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -230,7 +230,7 @@ int mysqld_show_table_types(THD *thd)
const char *option_name= show_comp_option_name[(int) *types->value];
if (*types->value == SHOW_OPTION_YES &&
- !strcasecmp(default_type_name, types->type))
+ !my_strcasecmp(system_charset_info, default_type_name, types->type))
option_name= "DEFAULT";
net_store_data(packet, option_name);
net_store_data(packet, types->comment);
@@ -1398,7 +1398,6 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
int mysqld_show_charsets(THD *thd, const char *wild)
{
- uint i;
char buff[8192];
String packet2(buff,sizeof(buff),default_charset_info);
List<Item> field_list;
@@ -1425,7 +1424,7 @@ int mysqld_show_charsets(THD *thd, const char *wild)
net_store_data(&packet2,convert,cs[0]->name);
net_store_data(&packet2,(uint32) cs[0]->number);
net_store_data(&packet2,(uint32) cs[0]->strxfrm_multiply);
- net_store_data(&packet2,(uint32) cs[0]->mbmaxlen ? cs[0]->mbmaxlen : 1);
+ net_store_data(&packet2,(uint32) (cs[0]->mbmaxlen ? cs[0]->mbmaxlen : 1));
if (my_net_write(&thd->net, (char*) packet2.ptr(),packet2.length()))
goto err;
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 74cb8f6ffea..01b0eb9e6ec 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -116,7 +116,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *result)
TMP_TABLE_PARAM tmp_table_param;
this->thd= thd;
this->result= result;
- SELECT_LEX *lex_select_save= thd->lex.select;
+ SELECT_LEX *lex_select_save= thd->lex.select, *sl;
/* Global option */
if (((void*)(global_parameters)) == ((void*)this))
@@ -184,7 +184,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *result)
// prepare selects
joins.empty();
- for (SELECT_LEX *sl= first_select(); sl; sl= sl->next_select())
+ for (sl= first_select(); sl; sl= sl->next_select())
{
JOIN *join= new JOIN(thd, sl->item_list,
sl->options | thd->options | SELECT_NO_UNLOCK |