summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs/manual.texi6
-rw-r--r--client/mysql.cc38
-rw-r--r--client/mysqladmin.c12
-rw-r--r--client/mysqldump.c84
-rw-r--r--client/mysqlimport.c13
-rw-r--r--client/mysqltest.c36
-rw-r--r--dbug/dbug.c179
-rw-r--r--dbug/factorial.c4
-rw-r--r--include/config-os2.h822
-rw-r--r--include/errmsg.h1
-rw-r--r--include/global.h34
-rw-r--r--include/my_pthread.h50
-rw-r--r--include/my_sys.h1
-rw-r--r--include/mysql_com.h6
-rw-r--r--include/thr_alarm.h2
-rw-r--r--isam/isamchk.c103
-rw-r--r--isam/isamlog.c208
-rw-r--r--isam/test1.c8
-rw-r--r--isam/test2.c59
-rw-r--r--isam/test_all.res207
-rw-r--r--libmysql/get_password.c7
-rw-r--r--libmysql/libmysql.c7
-rw-r--r--libmysql/net.c23
-rw-r--r--libmysql/violite.c39
-rw-r--r--merge/_locking.c4
-rw-r--r--merge/close.c3
-rw-r--r--merge/create.c3
-rw-r--r--merge/extra.c6
-rw-r--r--merge/open.c8
-rw-r--r--merge/panic.c4
-rw-r--r--merge/rsame.c8
-rw-r--r--merge/update.c6
-rw-r--r--myisam/ft_eval.c4
-rw-r--r--myisam/ft_search.c2
-rw-r--r--myisam/ft_test1.c4
-rw-r--r--myisam/ftdefs.h2
-rw-r--r--myisam/mi_check.c4
-rw-r--r--myisam/mi_test1.c3
-rw-r--r--myisam/mi_test2.c46
-rwxr-xr-xmyisam/mi_test_all.sh7
-rw-r--r--myisam/myisamlog.c10
-rw-r--r--myisam/myisampack.c68
-rw-r--r--myisam/sort.c13
-rw-r--r--myisammrg/myrg_delete.c6
-rw-r--r--myisammrg/myrg_locking.c6
-rw-r--r--myisammrg/myrg_open.c8
-rw-r--r--myisammrg/myrg_panic.c3
-rw-r--r--mysql-test/t/backup.test2
-rw-r--r--mysql-test/t/show_check.test2
-rw-r--r--mysys/charset.c16
-rw-r--r--mysys/default.c4
-rw-r--r--mysys/getopt.c4
-rw-r--r--mysys/getopt1.c2
-rw-r--r--mysys/list.c8
-rw-r--r--mysys/mf_dirname.c2
-rw-r--r--mysys/mf_format.c2
-rw-r--r--mysys/mf_path.c2
-rw-r--r--mysys/mf_qsort.c4
-rw-r--r--mysys/mf_tempfile.c17
-rw-r--r--mysys/my_clock.c4
-rw-r--r--mysys/my_copy.c2
-rw-r--r--mysys/my_create.c4
-rw-r--r--mysys/my_getwd.c14
-rw-r--r--mysys/my_init.c2
-rw-r--r--mysys/my_lib.c15
-rw-r--r--mysys/my_lock.c58
-rw-r--r--mysys/my_malloc.c2
-rw-r--r--mysys/my_mkdir.c4
-rw-r--r--mysys/my_open.c4
-rw-r--r--mysys/my_os2cond.c188
-rw-r--r--mysys/my_os2dirsrch.c182
-rw-r--r--mysys/my_os2dirsrch.h77
-rw-r--r--mysys/my_os2dlfcn.c74
-rw-r--r--mysys/my_os2dlfcn.h039
-rw-r--r--mysys/my_os2file64.c341
-rw-r--r--mysys/my_os2mutex.c98
-rw-r--r--mysys/my_os2thread.c126
-rw-r--r--mysys/my_os2tls.c144
-rw-r--r--mysys/my_pthread.c2
-rw-r--r--mysys/my_realloc.c2
-rw-r--r--mysys/my_redel.c2
-rw-r--r--mysys/my_static.c2
-rw-r--r--mysys/my_tempnam.c17
-rw-r--r--mysys/my_thr_init.c6
-rw-r--r--mysys/my_write.c40
-rw-r--r--mysys/test_charset.c2
-rw-r--r--mysys/thr_alarm.c14
-rw-r--r--mysys/tree.c2
-rw-r--r--os2/ChangeLog.os223
-rw-r--r--os2/MySQL-All.icc13
-rw-r--r--os2/MySQL-Client.icc87
-rw-r--r--os2/MySQL-Client.irs2335
-rw-r--r--os2/MySQL-Lib.icc72
-rw-r--r--os2/MySQL-Opt.icc53
-rw-r--r--os2/MySQL-ReadLine.icc27
-rw-r--r--os2/MySQL-Source.icc298
-rw-r--r--os2/MySQL-Sql.icc117
-rw-r--r--os2/MySQL-Util.icc134
-rw-r--r--os2/MySQL-Util.irs3067
-rw-r--r--os2/MySQL-binlog.icc68
-rw-r--r--os2/MySQL-binlog.irs7
-rw-r--r--os2/MySQL-sql.irs13
-rw-r--r--os2/build-all.cmd11
-rw-r--r--os2/build-all.log39
-rw-r--r--os2/mysql.base127
-rw-r--r--os2/mysql.ih7
-rw-r--r--os2/readme.os2190
-rw-r--r--os2/rint.cmd4
-rw-r--r--os2/rint.objbin0 -> 334 bytes
-rw-r--r--os2/rint.s32
-rw-r--r--sql/field.cc2
-rw-r--r--sql/field.h4
-rw-r--r--sql/gen_lex_hash.cc2
-rw-r--r--sql/hostname.cc2
-rw-r--r--sql/item_func.cc6
-rw-r--r--sql/item_strfunc.cc6
-rw-r--r--sql/log_event.cc2
-rw-r--r--sql/md5.c36
-rw-r--r--sql/mini_client.cc42
-rw-r--r--sql/mysql_priv.h4
-rw-r--r--sql/mysqld.cc108
-rw-r--r--sql/net_serv.cc22
-rw-r--r--sql/slave.cc2
-rw-r--r--sql/sql_base.cc4
-rw-r--r--sql/sql_db.cc4
-rw-r--r--sql/sql_insert.cc4
-rw-r--r--sql/sql_load.cc2
-rw-r--r--sql/sql_parse.cc16
-rw-r--r--sql/sql_table.cc20
-rw-r--r--sql/sql_udf.cc2
-rw-r--r--sql/violite.c32
-rw-r--r--strings/ctype-big5.c4
-rw-r--r--strings/ctype-gbk.c4
-rw-r--r--strings/ctype-sjis.c6
-rw-r--r--strings/ctype-tis620.c4
-rw-r--r--strings/ctype.c4
-rw-r--r--strings/strnlen.c2
137 files changed, 9927 insertions, 852 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index a1ddd969b91..6b042d899c0 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -46155,6 +46155,8 @@ incredible help we got in managing the MySQL mailing lists.
@item Igor Romanenko @email{igor@@frog.kiev.ua}
@code{mysqldump} (previously @code{msqldump}, but ported and enhanced by
Monty).
+@item Yuri Dario
+For keeping up and extending the MySQL OS/2 port.
@item Tim Bunce, Alligator Descartes
For the @code{DBD} (Perl) interface.
@item Tim Bunce
@@ -46282,6 +46284,8 @@ MySQL server.
@item Albert Chin-A-Young.
Configure updates for Tru64, large file support and better TCP wrappers
support.
+@item John Birrell
+Emulation of pthread_mutex() for OS/2.
@end table
Other contributors, bugfinders, and testers: James H. Thompson, Maurizio
@@ -46543,6 +46547,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.42
@itemize @bullet
@item
+Applied large patch for OS/2 from Yuri Dario.
+@item
Fixed problem with InnoDB when one could get the error @code{Can't
execute the given command...} even when one didn't have an active
transaction.
diff --git a/client/mysql.cc b/client/mysql.cc
index 8d926a54840..e4db7e93256 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -77,7 +77,7 @@ extern "C" {
#undef bcmp // Fix problem with new readline
#undef bzero
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
#include <conio.h>
#else
#include <readline/readline.h>
@@ -569,7 +569,7 @@ static int get_options(int argc, char **argv)
set_all_changeable_vars(changeable_vars);
while ((c=getopt_long(argc,argv,
- "?ABCD:LfgGHinNoqrstTU::vVw::WEe:h:O:P:S:u:#::p::",
+ (char*) "?ABCD:LfgGHinNoqrstTU::vVw::WEe:h:O:P:S:u:#::p::",
long_options, &option_index)) != EOF)
{
switch(c) {
@@ -767,10 +767,20 @@ static int get_options(int argc, char **argv)
return(0);
}
+#if defined(OS2)
+static char* readline( char* prompt)
+{
+#if defined(OS2)
+ static char linebuffer[254];
+#endif
+ puts( prompt);
+ return gets( linebuffer);
+}
+#endif
static int read_lines(bool execute_commands)
{
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
char linebuffer[254];
#endif
char *line;
@@ -790,7 +800,7 @@ static int read_lines(bool execute_commands)
}
else
{
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
if (opt_outfile && glob_buffer.is_empty())
fflush(OUTFILE);
tee_fputs(glob_buffer.is_empty() ? "mysql> " :
@@ -1483,7 +1493,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
static void init_pager()
{
-#ifndef __WIN__
+#if !defined( __WIN__) && !defined( OS2)
if (!opt_nopager)
{
if (!(PAGER= popen(pager, "w")))
@@ -1499,7 +1509,7 @@ static void init_pager()
static void end_pager()
{
-#ifndef __WIN__
+#if !defined( __WIN__) && !defined( OS2)
if (!opt_nopager)
pclose(PAGER);
#endif
@@ -2337,6 +2347,9 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
va_start(args, fmt);
(void) vfprintf(file, fmt, args);
+#ifdef OS2
+ fflush( file);
+#endif
if (opt_outfile)
(void) vfprintf(OUTFILE, fmt, args);
va_end(args);
@@ -2346,6 +2359,9 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
void tee_fputs(const char *s, FILE *file)
{
fputs(s, file);
+#ifdef OS2
+ fflush( file);
+#endif
if (opt_outfile)
fputs(s, OUTFILE);
}
@@ -2355,6 +2371,9 @@ void tee_puts(const char *s, FILE *file)
{
fputs(s, file);
fputs("\n", file);
+#ifdef OS2
+ fflush( file);
+#endif
if (opt_outfile)
{
fputs(s, OUTFILE);
@@ -2365,11 +2384,14 @@ void tee_puts(const char *s, FILE *file)
void tee_putc(int c, FILE *file)
{
putc(c, file);
+#ifdef OS2
+ fflush( file);
+#endif
if (opt_outfile)
putc(c, OUTFILE);
}
-#ifdef __WIN__
+#if defined( __WIN__) || defined( OS2)
#include <time.h>
#else
#include <sys/times.h>
@@ -2379,7 +2401,7 @@ void tee_putc(int c, FILE *file)
static ulong start_timer(void)
{
-#ifdef __WIN__
+#if defined( __WIN__) || defined( OS2)
return clock();
#else
struct tms tms_tmp;
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index 3570cefc4ae..e95d6492949 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -132,7 +132,7 @@ static struct option long_options[] = {
{0, 0, 0, 0}
};
-CHANGEABLE_VAR changeable_vars[] = {
+static CHANGEABLE_VAR changeable_vars[] = {
{ "connect_timeout", (long*) &opt_connect_timeout, 0, 0, 3600*12, 0, 1},
{ "shutdown_timeout", (long*) &opt_shutdown_timeout, SHUTDOWN_DEF_TIMEOUT, 0,
3600*12, 0, 1},
@@ -152,7 +152,8 @@ int main(int argc,char *argv[])
load_defaults("my",load_default_groups,&argc,&argv);
set_all_changeable_vars( changeable_vars );
- while ((c=getopt_long(argc,argv,"h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:",
+ while ((c=getopt_long(argc,argv,
+ (char*) "h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:",
long_options, &option_index)) != EOF)
{
switch(c) {
@@ -1121,14 +1122,15 @@ static void wait_pidfile(char *pidfile)
uint count=0;
system_filename(buff,pidfile);
- while ((fd = open(buff, O_RDONLY)) >= 0 && count++ < opt_shutdown_timeout)
+ while ((fd = my_open(buff, O_RDONLY, MYF(0))) >= 0 &&
+ count++ < opt_shutdown_timeout)
{
- close(fd);
+ my_close(fd,MYF(0));
sleep(1);
}
if (fd >= 0)
{
- close(fd);
+ my_close(fd,MYF(0));
fprintf(stderr,
"Warning; Aborted waiting on pid file: '%s' after %d seconds\n",
buff, count-1);
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 4893c13a0a0..29629940fb5 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -85,11 +85,11 @@ static int first_error=0;
extern ulong net_buffer_length;
static DYNAMIC_STRING extended_row;
#include "sslopt-vars.h"
-FILE *result_file;
+FILE *md_result_file;
-enum options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_KEYWORDS,
- OPT_LOCKS, OPT_DROP, OPT_OPTIMIZE, OPT_DELAYED, OPT_TABLES,
- OPT_CHARSETS_DIR, OPT_DEFAULT_CHARSET};
+enum md_options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC,
+ OPT_KEYWORDS, OPT_LOCKS, OPT_DROP, OPT_OPTIMIZE, OPT_DELAYED,
+ OPT_TABLES, MD_OPT_CHARSETS_DIR, MD_OPT_DEFAULT_CHARSET};
static struct option long_options[] =
{
@@ -98,12 +98,12 @@ static struct option long_options[] =
{"add-drop-table", no_argument, 0, OPT_DROP},
{"add-locks", no_argument, 0, OPT_LOCKS},
{"allow-keywords", no_argument, 0, OPT_KEYWORDS},
- {"character-sets-dir",required_argument,0, OPT_CHARSETS_DIR},
+ {"character-sets-dir",required_argument,0, MD_OPT_CHARSETS_DIR},
{"complete-insert", no_argument, 0, 'c'},
{"compress", no_argument, 0, 'C'},
{"databases", no_argument, 0, 'B'},
{"debug", optional_argument, 0, '#'},
- {"default-character-set", required_argument, 0, OPT_DEFAULT_CHARSET},
+ {"default-character-set", required_argument, 0, MD_OPT_DEFAULT_CHARSET},
{"delayed-insert", no_argument, 0, OPT_DELAYED},
{"extended-insert", no_argument, 0, 'e'},
{"fields-terminated-by", required_argument, 0, (int) OPT_FTB},
@@ -145,7 +145,7 @@ static struct option long_options[] =
static const char *load_default_groups[]= { "mysqldump","client",0 };
-CHANGEABLE_VAR changeable_vars[] = {
+CHANGEABLE_VAR md_changeable_vars[] = {
{ "max_allowed_packet", (long*) &max_allowed_packet,24*1024*1024,4096,
24*1024L*1024L,MALLOC_OVERHEAD,1024},
{ "net_buffer_length", (long*) &net_buffer_length,1024*1024L-1025,4096,
@@ -265,10 +265,10 @@ puts("\
print_defaults("my",load_default_groups);
printf("\nPossible variables for option --set-variable (-O) are:\n");
- for (i=0 ; changeable_vars[i].name ; i++)
+ for (i=0 ; md_changeable_vars[i].name ; i++)
printf("%-20s current value: %lu\n",
- changeable_vars[i].name,
- (ulong) *changeable_vars[i].varptr);
+ md_changeable_vars[i].name,
+ (ulong) *md_changeable_vars[i].varptr);
} /* usage */
@@ -290,9 +290,9 @@ static int get_options(int *argc,char ***argv)
int c,option_index;
my_bool tty_password=0;
- result_file=stdout;
+ md_result_file=stdout;
load_defaults("my",load_default_groups,argc,argv);
- set_all_changeable_vars(changeable_vars);
+ set_all_changeable_vars(md_changeable_vars);
while ((c=getopt_long(*argc,*argv,
"#::p::h:u:O:P:r:S:T:EBaAcCdefFlnqtvVw:?Ix",
long_options, &option_index)) != EOF)
@@ -307,10 +307,10 @@ static int get_options(int *argc,char ***argv)
case 'A':
opt_alldbs=1;
break;
- case OPT_DEFAULT_CHARSET:
+ case MD_OPT_DEFAULT_CHARSET:
default_charset= optarg;
break;
- case OPT_CHARSETS_DIR:
+ case MD_OPT_CHARSETS_DIR:
charsets_dir= optarg;
break;
case 'f':
@@ -332,7 +332,7 @@ static int get_options(int *argc,char ***argv)
break;
#endif
case 'O':
- if (set_changeable_var(optarg, changeable_vars))
+ if (set_changeable_var(optarg, md_changeable_vars))
{
usage();
return(1);
@@ -355,7 +355,7 @@ static int get_options(int *argc,char ***argv)
opt_mysql_port= (unsigned int) atoi(optarg);
break;
case 'r':
- if (!(result_file = my_fopen(optarg, O_WRONLY | O_BINARY,
+ if (!(md_result_file = my_fopen(optarg, O_WRONLY | O_BINARY,
MYF(MY_WME))))
exit(1);
break;
@@ -602,7 +602,7 @@ static uint getTableStructure(char *table, char* db)
char *strpos, *table_name;
const char *delayed;
char name_buff[NAME_LEN+3],table_buff[NAME_LEN+3];
- FILE *sql_file = result_file;
+ FILE *sql_file = md_result_file;
DBUG_ENTER("getTableStructure");
delayed= opt_delayed ? " DELAYED " : "";
@@ -973,14 +973,14 @@ static void dumpTable(uint numFields, char *table)
}
else
{
- fprintf(result_file,"\n#\n# Dumping data for table '%s'\n", table);
+ fprintf(md_result_file,"\n#\n# Dumping data for table '%s'\n", table);
sprintf(query, "SELECT * FROM %s", quote_name(table,table_buff));
if (where)
{
- fprintf(result_file,"# WHERE: %s\n",where);
+ fprintf(md_result_file,"# WHERE: %s\n",where);
strxmov(strend(query), " WHERE ",where,NullS);
}
- fputs("#\n\n", result_file);
+ fputs("#\n\n", md_result_file);
if (mysql_query(sock, query))
{
@@ -1007,7 +1007,7 @@ static void dumpTable(uint numFields, char *table)
}
if (opt_lock)
- fprintf(result_file,"LOCK TABLES %s WRITE;\n",
+ fprintf(md_result_file,"LOCK TABLES %s WRITE;\n",
quote_name(table,table_buff));
total_length=net_buffer_length; /* Force row break */
@@ -1021,7 +1021,7 @@ static void dumpTable(uint numFields, char *table)
ulong *lengths=mysql_fetch_lengths(res);
rownr++;
if (!extended_insert)
- fputs(insert_pat,result_file);
+ fputs(insert_pat,md_result_file);
mysql_field_seek(res,0);
for (i = 0; i < mysql_num_fields(res); i++)
@@ -1075,17 +1075,17 @@ static void dumpTable(uint numFields, char *table)
else
{
if (i)
- fputc(',',result_file);
+ fputc(',',md_result_file);
if (row[i])
{
if (!IS_NUM_FIELD(field))
- unescape(result_file, row[i], lengths[i]);
+ unescape(md_result_file, row[i], lengths[i]);
else
- fputs(row[i],result_file);
+ fputs(row[i],md_result_file);
}
else
{
- fputs("NULL",result_file);
+ fputs("NULL",md_result_file);
}
}
}
@@ -1098,25 +1098,25 @@ static void dumpTable(uint numFields, char *table)
if (total_length + row_length < net_buffer_length)
{
total_length += row_length;
- fputc(',',result_file); /* Always row break */
- fputs(extended_row.str,result_file);
+ fputc(',',md_result_file); /* Always row break */
+ fputs(extended_row.str,md_result_file);
}
else
{
if (row_break)
- fputs(";\n", result_file);
+ fputs(";\n", md_result_file);
row_break=1; /* This is first row */
- fputs(insert_pat,result_file);
- fputs(extended_row.str,result_file);
+ fputs(insert_pat,md_result_file);
+ fputs(extended_row.str,md_result_file);
total_length = row_length+init_length;
}
}
else
- fputs(");\n", result_file);
+ fputs(");\n", md_result_file);
}
if (extended_insert && row_break)
- fputs(";\n", result_file); /* If not empty table */
- fflush(result_file);
+ fputs(";\n", md_result_file); /* If not empty table */
+ fflush(md_result_file);
if (mysql_errno(sock))
{
sprintf(query,"%s: Error %d: %s when dumping table '%s' at row: %ld\n",
@@ -1130,7 +1130,7 @@ static void dumpTable(uint numFields, char *table)
return;
}
if (opt_lock)
- fputs("UNLOCK TABLES;\n", result_file);
+ fputs("UNLOCK TABLES;\n", md_result_file);
mysql_free_result(res);
}
} /* dumpTable */
@@ -1206,11 +1206,11 @@ static int init_dumping(char *database)
{
if (opt_databases || opt_alldbs)
{
- fprintf(result_file,"\n#\n# Current Database: %s\n#\n", database);
+ fprintf(md_result_file,"\n#\n# Current Database: %s\n#\n", database);
if (!opt_create_db)
- fprintf(result_file,"\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ %s;\n",
+ fprintf(md_result_file,"\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ %s;\n",
database);
- fprintf(result_file,"\nUSE %s;\n", database);
+ fprintf(md_result_file,"\nUSE %s;\n", database);
}
}
if (extended_insert)
@@ -1342,7 +1342,7 @@ int main(int argc, char **argv)
if (dbConnect(current_host, current_user, opt_password))
exit(EX_MYSQLERR);
if (!path)
- write_heder(result_file, *argv);
+ write_heder(md_result_file, *argv);
if (opt_first_slave)
{
@@ -1378,9 +1378,9 @@ int main(int argc, char **argv)
}
}
dbDisconnect(current_host);
- fputs("\n", result_file);
- if (result_file != stdout)
- my_fclose(result_file, MYF(0));
+ fputs("\n", md_result_file);
+ if (md_result_file != stdout)
+ my_fclose(md_result_file, MYF(0));
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
if (extended_insert)
dynstr_free(&extended_row);
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 79f0a8d584e..cbdedf56cbe 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -41,7 +41,7 @@ static char *field_escape(char *to,const char *from,uint length);
static char *add_load_option(char *ptr,const char *object,
const char *statement);
-static my_bool verbose=0,lock_tables=0,ignore_errors=0,delete=0,
+static my_bool verbose=0,lock_tables=0,ignore_errors=0,opt_delete=0,
replace=0,silent=0,ignore=0,opt_compress=0,opt_local_file=0;
static MYSQL mysql_connection;
@@ -54,8 +54,8 @@ static uint opt_mysql_port=0;
static my_string opt_mysql_unix_port=0;
#include "sslopt-vars.h"
-enum options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC,
- OPT_LOW_PRIORITY, OPT_CHARSETS_DIR, OPT_DEFAULT_CHARSET};
+enum mi_options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC,
+ OPT_LOW_PRIORITY, OPT_CHARSETS_DIR, OPT_DEFAULT_CHARSET};
static struct option long_options[] =
{
@@ -173,7 +173,8 @@ static int get_options(int *argc, char ***argv)
int c, option_index;
my_bool tty_password=0;
- while ((c=getopt_long(*argc,*argv,"#::p::c:h:u:P:S:CdfilLrsvV?IW",
+ while ((c=getopt_long(*argc,*argv,
+ (char*) "#::p::c:h:u:P:S:CdfilLrsvV?IW",
long_options, &option_index)) != EOF)
{
switch(c) {
@@ -190,7 +191,7 @@ static int get_options(int *argc, char ***argv)
charsets_dir= optarg;
break;
case 'd':
- delete= 1;
+ opt_delete= 1;
break;
case 'f':
ignore_errors= 1;
@@ -313,7 +314,7 @@ static int write_to_table(char *filename, MYSQL *sock)
else
my_load_path(hard_path, filename, NULL); /* filename includes the path */
- if (delete)
+ if (opt_delete)
{
if (verbose)
fprintf(stdout, "Deleting the old data from table %s\n", tablename);
diff --git a/client/mysqltest.c b/client/mysqltest.c
index f6d87352a6c..2d8c4e00416 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -51,7 +51,11 @@
#include <mysql.h>
#include <mysql_version.h>
#include <m_ctype.h>
-#include <my_config.h>
+#ifdef OS2
+#include <config-os2.h>
+#else
+ #include <my_config.h>
+#endif
#include <my_dir.h>
#include <hash.h>
#include <mysqld_error.h>
@@ -829,6 +833,17 @@ int do_sleep(struct st_query* q)
if (!*p)
die("Missing argument in sleep\n");
t.tv_usec = 0;
+
+#ifdef OS2
+
+ if (opt_sleep)
+ DosSleep( opt_sleep * 1000);
+ else
+ DosSleep( atof( p) * 1000);
+
+ return 0;
+
+#else
if (opt_sleep)
t.tv_sec = opt_sleep;
else
@@ -858,6 +873,7 @@ int do_sleep(struct st_query* q)
}
t.tv_usec *= dec_mul;
return select(0,0,0,0, &t);
+#endif
}
static void get_file_name(char *filename, struct st_query* q)
@@ -1881,8 +1897,8 @@ static VAR* var_init(VAR* v, const char* name, int name_len, const char* val,
static void var_free(void* v)
{
- my_free(((VAR*)v)->str_val, MYF(MY_WME));
- my_free(v, MYF(MY_WME));
+ my_free(((VAR*) v)->str_val, MYF(MY_WME));
+ my_free((char*) v, MYF(MY_WME));
}
@@ -2744,7 +2760,7 @@ uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
{
reg1 REPLACE *rep_pos;
reg2 REPLACE_STRING *rep_str;
- my_string to,end,pos,new;
+ my_string to,end,pos,new_str;
end=(to= *start) + *max_length-1;
rep_pos=rep+1;
@@ -2756,10 +2772,10 @@ uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
if (to == end)
{
(*max_length)+=8192;
- if (!(new=my_realloc(*start,*max_length,MYF(MY_WME))))
+ if (!(new_str=my_realloc(*start,*max_length,MYF(MY_WME))))
return (uint) -1;
- to=new+(to - *start);
- end=(*start=new)+ *max_length-1;
+ to=new_str+(to - *start);
+ end=(*start=new_str)+ *max_length-1;
}
*to++= *from++;
}
@@ -2771,10 +2787,10 @@ uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
if (to == end)
{
(*max_length)*=2;
- if (!(new=my_realloc(*start,*max_length,MYF(MY_WME))))
+ if (!(new_str=my_realloc(*start,*max_length,MYF(MY_WME))))
return (uint) -1;
- to=new+(to - *start);
- end=(*start=new)+ *max_length-1;
+ to=new_str+(to - *start);
+ end=(*start=new_str)+ *max_length-1;
}
*to++= *pos;
}
diff --git a/dbug/dbug.c b/dbug/dbug.c
index f600b281007..1fb8755d605 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -307,6 +307,7 @@ static char *static_strtok(char *s1,pchar chr);
* Macros and defines for testing file accessibility under UNIX and MSDOS.
*/
+#undef EXISTS
#if !defined(HAVE_ACCESS) || defined(MSDOS)
#define EXISTS(pathname) (FALSE) /* Assume no existance */
#define Writable(name) (TRUE)
@@ -489,8 +490,7 @@ static CODE_STATE static_code_state = { 0,0,"?func","?file",NULL,0,NULL,
*
*/
-void _db_push_ (control)
-const char *control;
+void _db_push_ (const char *control)
{
reg1 char *scan;
reg2 struct link *temp;
@@ -691,15 +691,14 @@ void _db_pop_ ()
*
*/
-void _db_enter_ (_func_, _file_, _line_, _sfunc_, _sfile_, _slevel_,
- _sframep_)
-const char *_func_;
-const char *_file_;
-uint _line_;
-const char **_sfunc_;
-const char **_sfile_;
-uint *_slevel_;
-char ***_sframep_ __attribute__((unused));
+void _db_enter_ (
+const char *_func_,
+const char *_file_,
+uint _line_,
+const char **_sfunc_,
+const char **_sfile_,
+uint *_slevel_,
+char ***_sframep_ __attribute__((unused)))
{
reg1 CODE_STATE *state;
@@ -777,11 +776,11 @@ char ***_sframep_ __attribute__((unused));
*
*/
-void _db_return_ (_line_, _sfunc_, _sfile_, _slevel_)
-uint _line_;
-const char **_sfunc_;
-const char **_sfile_;
-uint *_slevel_;
+void _db_return_ (
+uint _line_,
+const char **_sfunc_,
+const char **_sfile_,
+uint *_slevel_)
{
CODE_STATE *state;
@@ -851,9 +850,9 @@ uint *_slevel_;
*
*/
-void _db_pargs_ (_line_, keyword)
-uint _line_;
-const char *keyword;
+void _db_pargs_ (
+uint _line_,
+const char *keyword)
{
CODE_STATE *state=code_state();
state->u_line = _line_;
@@ -934,10 +933,11 @@ void _db_doprnt_ (const char *format,...)
* Is used to examine corrputed memory or arrays.
*/
-void _db_dump_(_line_,keyword,memory,length)
-uint _line_,length;
-const char *keyword;
-const char *memory;
+void _db_dump_(
+uint _line_,
+const char *keyword,
+const char *memory,
+uint length)
{
int pos;
char dbuff[90];
@@ -1004,11 +1004,11 @@ const char *memory;
*
*/
-static struct link *ListParse (ctlp)
-char *ctlp;
+static struct link *ListParse (
+char *ctlp)
{
REGISTER char *start;
- REGISTER struct link *new;
+ REGISTER struct link *new_malloc;
REGISTER struct link *head;
head = NULL;
@@ -1020,10 +1020,10 @@ char *ctlp;
if (*ctlp == ',') {
*ctlp++ = EOS;
}
- new = (struct link *) DbugMalloc (sizeof (struct link));
- new -> str = StrDup (start);
- new -> next_link = head;
- head = new;
+ new_malloc = (struct link *) DbugMalloc (sizeof (struct link));
+ new_malloc -> str = StrDup (start);
+ new_malloc -> next_link = head;
+ head = new_malloc;
}
return (head);
}
@@ -1052,9 +1052,9 @@ char *ctlp;
*
*/
-static BOOLEAN InList (linkp, cp)
-struct link *linkp;
-const char *cp;
+static BOOLEAN InList (
+struct link *linkp,
+const char *cp)
{
REGISTER struct link *scan;
REGISTER BOOLEAN result;
@@ -1098,7 +1098,7 @@ const char *cp;
static void PushState ()
{
- REGISTER struct state *new;
+ REGISTER struct state *new_malloc;
if (!init_done)
{
@@ -1106,19 +1106,19 @@ static void PushState ()
init_done=TRUE;
}
(void) code_state(); /* Alloc memory */
- new = (struct state *) DbugMalloc (sizeof (struct state));
- new -> flags = 0;
- new -> delay = 0;
- new -> maxdepth = MAXDEPTH;
- new -> sub_level=0;
- new -> out_file = stderr;
- new -> prof_file = (FILE*) 0;
- new -> functions = NULL;
- new -> p_functions = NULL;
- new -> keywords = NULL;
- new -> processes = NULL;
- new -> next_state = stack;
- stack=new;
+ new_malloc = (struct state *) DbugMalloc (sizeof (struct state));
+ new_malloc -> flags = 0;
+ new_malloc -> delay = 0;
+ new_malloc -> maxdepth = MAXDEPTH;
+ new_malloc -> sub_level=0;
+ new_malloc -> out_file = stderr;
+ new_malloc -> prof_file = (FILE*) 0;
+ new_malloc -> functions = NULL;
+ new_malloc -> p_functions = NULL;
+ new_malloc -> keywords = NULL;
+ new_malloc -> processes = NULL;
+ new_malloc -> next_state = stack;
+ stack=new_malloc;
}
@@ -1216,8 +1216,8 @@ static BOOLEAN DoProfile ()
*
*/
-BOOLEAN _db_keyword_ (keyword)
-const char *keyword;
+BOOLEAN _db_keyword_ (
+const char *keyword)
{
REGISTER BOOLEAN result;
CODE_STATE *state;
@@ -1256,8 +1256,8 @@ const char *keyword;
*
*/
-static void Indent (indent)
-int indent;
+static void Indent (
+int indent)
{
REGISTER int count;
@@ -1289,8 +1289,8 @@ int indent;
*
*/
-static void FreeList (linkp)
-struct link *linkp;
+static void FreeList (
+struct link *linkp)
{
REGISTER struct link *old;
@@ -1325,13 +1325,13 @@ struct link *linkp;
*/
-static char *StrDup (str)
-const char *str;
+static char *StrDup (
+const char *str)
{
- reg1 char *new;
- new = DbugMalloc ((int) strlen (str) + 1);
- (void) strcpy (new, str);
- return (new);
+ reg1 char *new_malloc;
+ new_malloc = DbugMalloc ((int) strlen (str) + 1);
+ (void) strcpy (new_malloc, str);
+ return (new_malloc);
}
@@ -1354,8 +1354,8 @@ const char *str;
*
*/
-static void DoPrefix (_line_)
-uint _line_;
+static void DoPrefix (
+uint _line_)
{
CODE_STATE *state;
state=code_state();
@@ -1419,7 +1419,7 @@ static void DBUGOpenFile (const char *name,int append)
}
else
{
- if (!Writable(name))
+ if (!Writable((char*)name))
{
(void) fprintf (stderr, ERR_OPEN, _db_process_, name);
perror ("");
@@ -1528,8 +1528,8 @@ static FILE *OpenProfile (const char *name)
*
*/
-static void CloseFile (fp)
-FILE *fp;
+static void CloseFile (
+FILE *fp)
{
if (fp != stderr && fp != stdout) {
if (fclose (fp) == EOF) {
@@ -1590,14 +1590,14 @@ static void DbugExit (const char *why)
*
*/
-static char *DbugMalloc (size)
-int size;
+static char *DbugMalloc (
+int size)
{
- register char *new;
+ register char *new_malloc;
- if (!(new = malloc ((unsigned int) size)))
+ if (!(new_malloc = (char*) malloc ((unsigned int) size)))
DbugExit ("out of memory");
- return (new);
+ return (new_malloc);
}
@@ -1606,9 +1606,9 @@ int size;
* separator (to allow directory-paths in dos).
*/
-static char *static_strtok (s1, separator)
-char *s1;
-pchar separator;
+static char *static_strtok (
+char *s1,
+pchar separator)
{
static char *end = NULL;
reg1 char *rtnval,*cpy;
@@ -1692,8 +1692,8 @@ static char *BaseName (const char *pathname)
#ifndef Writable
-static BOOLEAN Writable (pathname)
-char *pathname;
+static BOOLEAN Writable (
+char *pathname)
{
REGISTER BOOLEAN granted;
REGISTER char *lastslash;
@@ -1746,8 +1746,8 @@ char *pathname;
*/
#ifndef ChangeOwner
-static void ChangeOwner (pathname)
-char *pathname;
+static void ChangeOwner (
+char *pathname)
{
if (chown (pathname, getuid (), getgid ()) == -1)
{
@@ -1847,8 +1847,8 @@ EXPORT void _db_longjmp_ ()
#define HZ (50) /* Probably in some header somewhere */
#endif
-static int DelayArg (value)
-int value;
+static int DelayArg (
+int value)
{
uint delayarg = 0;
@@ -1868,8 +1868,8 @@ int value;
*/
#if ! defined(Delay) && ! defined(AMIGA)
-static int Delay (ticks)
-int ticks;
+static int Delay (
+int ticks)
{
return ticks;
}
@@ -1969,12 +1969,13 @@ void _db_unlock_file()
* own for whatever system that you have.
*/
-#ifdef HAVE_GETRUSAGE
+#ifndef THREAD
+#if defined(HAVE_GETRUSAGE)
#include <sys/param.h>
#include <sys/resource.h>
-/* extern int getrusage(int, struct rusage *); */
+/* extern int getrusage(int, struct rusage *); */
/*
* Returns the user time in milliseconds used by this process so
@@ -1989,15 +1990,13 @@ static unsigned long Clock ()
return ((ru.ru_utime.tv_sec * 1000) + (ru.ru_utime.tv_usec / 1000));
}
-#else
-#if defined(MSDOS) || defined(__WIN__)
+#elif defined(MSDOS) || defined(__WIN__) || defined(OS2)
static ulong Clock()
{
return clock()*(1000/CLOCKS_PER_SEC);
}
-#else
-#ifdef amiga
+#elif defined (amiga)
struct DateStamp { /* Yes, this is a hack, but doing it right */
long ds_Days; /* is incredibly ugly without splitting this */
@@ -2030,19 +2029,13 @@ static unsigned long Clock ()
}
return (millisec);
}
-
#else
-
-#ifndef THREAD
static unsigned long Clock ()
{
return (0);
}
-#endif
-#endif /* amiga */
-#endif /* MSDOS || __WIN__ */
#endif /* RUSAGE */
-
+#endif /* THREADS */
#ifdef NO_VARARGS
diff --git a/dbug/factorial.c b/dbug/factorial.c
index 191c0468356..0dda5c7459e 100644
--- a/dbug/factorial.c
+++ b/dbug/factorial.c
@@ -4,8 +4,8 @@
#include <global.h>
-int factorial (value)
-register int value;
+int factorial (
+register int value)
{
DBUG_ENTER ("factorial");
DBUG_PRINT ("find", ("find %d factorial", value));
diff --git a/include/config-os2.h b/include/config-os2.h
new file mode 100644
index 00000000000..172a04a9f01
--- /dev/null
+++ b/include/config-os2.h
@@ -0,0 +1,822 @@
+/* Copyright (C) 2000 MySQL AB & Yuri Dario
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+/* Defines for OS2 to make it compatible for MySQL */
+
+#ifndef __CONFIG_OS2_H__
+#define __CONFIG_OS2_H__
+
+#include <os2.h>
+#include <math.h>
+#include <io.h>
+
+/* Define to name of system eg solaris*/
+#define SYSTEM_TYPE "IBM OS/2 Warp"
+/* Define to machine type name eg sun10 */
+#define MACHINE_TYPE "i686"
+/* Name of package */
+#define PACKAGE "mysql"
+/* Version number of package */
+#define VERSION MYSQL_SERVER_VERSION
+/* Default socket */
+#define MYSQL_UNIX_ADDR "\\socket\\MySQL"
+
+#define FN_LIBCHAR '\\'
+#define FN_ROOTDIR "\\"
+#define MY_NFILE 1024 /* This is only used to save filenames */
+
+#define HAVE_ACCESS
+
+#define DEFAULT_MYSQL_HOME "c:\\mysql"
+#define DEFAULT_BASEDIR "C:\\"
+#define SHAREDIR "share"
+#define DEFAULT_CHARSET_HOME "C:/mysql/"
+#define _POSIX_PATH_MAX 255
+#define DWORD ULONG
+
+#define O_SHARE 0x1000 /* Open file in sharing mode */
+#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
+#define S_IROTH S_IREAD /* for my_lib */
+
+#define O_NONBLOCK 0x10
+
+#define NO_OPEN_3 /* For my_create() */
+#define SIGQUIT SIGTERM /* No SIGQUIT */
+#define SIGALRM 14 /* Alarm */
+
+#define NO_FCNTL_NONBLOCK
+
+#define EFBIG E2BIG
+//#define ENFILE EMFILE
+//#define ENAMETOOLONG (EOS2ERR+2)
+//#define ETIMEDOUT 145
+//#define EPIPE 146
+#define EROFS 147
+
+#define sleep(A) DosSleep((A)*1000)
+#define closesocket(A) soclose(A)
+
+#define F_OK 0
+#define W_OK 2
+
+#define bzero(x,y) memset((x),'\0',(y))
+#define bcopy(x,y,z) memcpy((y),(x),(z))
+#define bcmp(x,y,z) memcmp((y),(x),(z))
+
+#define F_RDLCK 4 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 0 /* Remove lock. */
+
+#define S_IFMT 0xF000 /* Mask for file type */
+#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */
+
+#ifdef __cplusplus
+extern "C"
+#endif
+double _cdecl rint( double nr);
+
+DWORD TlsAlloc( void);
+BOOL TlsFree( DWORD);
+PVOID TlsGetValue( DWORD);
+BOOL TlsSetValue( DWORD, PVOID);
+
+/* support for > 2GB file size */
+#define SIZEOF_OFF_T 8
+#define lseek(A,B,C) _lseek64( A, B, C)
+#define tell(A) _lseek64( A, 0, SEEK_CUR)
+
+/* Some typedefs */
+typedef ulonglong os_off_t;
+
+/* config.h. Generated automatically by configure. */
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if using alloca.c. */
+/* #undef C_ALLOCA */
+
+/* Define to empty if the keyword does not work. */
+/* #undef const */
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define if you have alloca, as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+//#define HAVE_ALLOCA_H 1
+
+/* Define if you don't have vprintf but do have _doprnt. */
+/* #undef HAVE_DOPRNT */
+
+/* Define if you have a working `mmap' system call. */
+/* #undef HAVE_MMAP */
+
+/* Define if system calls automatically restart after interruption
+ by a signal. */
+/* #undef HAVE_RESTARTABLE_SYSCALLS */
+
+/* Define if your struct stat has st_rdev. */
+#define HAVE_ST_RDEV 1
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+//#define HAVE_SYS_WAIT_H 1
+
+/* Define if you don't have tm_zone but do have the external array
+ tzname. */
+#define HAVE_TZNAME 1
+
+/* Define if utime(file, NULL) sets file's timestamp to the present. */
+#define HAVE_UTIME_NULL 1
+
+/* Define if you have the vprintf function. */
+#define HAVE_VPRINTF 1
+
+/* Define as __inline if that's what the C compiler calls it. */
+/* #undef inline */
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+/* #undef off_t */
+
+/* Define as the return type of signal handlers (int or void). */
+#define RETSIGTYPE void
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+/* #undef size_t */
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#define STACK_DIRECTION -1
+
+/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define if your <sys/time.h> declares struct tm. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Define if your processor stores words with the most significant
+ byte first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Version of .frm files */
+#define DOT_FRM_VERSION 6
+
+/* READLINE: */
+#define FIONREAD_IN_SYS_IOCTL 1
+
+/* READLINE: Define if your system defines TIOCGWINSZ in sys/ioctl.h. */
+/* #undef GWINSZ_IN_SYS_IOCTL */
+
+/* Do we have FIONREAD */
+#define FIONREAD_IN_SYS_IOCTL 1
+
+/* atomic_add() from <asm/atomic.h> (Linux only) */
+/* #undef HAVE_ATOMIC_ADD */
+
+/* atomic_sub() from <asm/atomic.h> (Linux only) */
+/* #undef HAVE_ATOMIC_SUB */
+
+/* bool is not defined by all C++ compilators */
+#define HAVE_BOOL 1
+
+/* Have berkeley db installed */
+//#define HAVE_BERKELEY_DB 1
+
+/* DSB style signals ? */
+/* #undef HAVE_BSD_SIGNALS */
+
+/* Can netinet be included */
+/* #undef HAVE_BROKEN_NETINET_INCLUDES */
+
+/* READLINE: */
+/* #undef HAVE_BSD_SIGNALS */
+
+/* ZLIB and compress: */
+#define HAVE_COMPRESS 1
+
+/* Define if we are using OSF1 DEC threads */
+/* #undef HAVE_DEC_THREADS */
+
+/* Define if we are using OSF1 DEC threads on 3.2 */
+/* #undef HAVE_DEC_3_2_THREADS */
+
+/* fp_except from ieeefp.h */
+/* #undef HAVE_FP_EXCEPT */
+
+/* READLINE: */
+/* #undef HAVE_GETPW_DECLS */
+
+/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines
+ this with 6 arguments */
+/* #undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE */
+
+/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
+/* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */
+
+/* Define if int8, int16 and int32 types exist */
+/* #undef HAVE_INT_8_16_32 */
+
+/* Define if have -lwrap */
+/* #undef HAVE_LIBWRAP */
+
+/* Define if we are using Xavier Leroy's LinuxThreads */
+/* #undef HAVE_LINUXTHREADS */
+
+/* Do we use user level threads */
+/* #undef HAVE_mit_thread */
+
+/* For some non posix threads */
+/* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */
+
+/* For some non posix threads */
+/* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
+
+/* READLINE: */
+#define HAVE_POSIX_SIGNALS 1
+
+/* sigwait with one argument */
+/* #undef HAVE_NONPOSIX_SIGWAIT */
+
+/* pthread_attr_setscope */
+#define HAVE_PTHREAD_ATTR_SETSCOPE 1
+
+/* POSIX readdir_r */
+/* #undef HAVE_READDIR_R */
+
+/* POSIX sigwait */
+/* #undef HAVE_SIGWAIT */
+
+/* crypt */
+#define HAVE_CRYPT 1
+
+/* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines
+ this with 8 arguments */
+/* #undef HAVE_SOLARIS_STYLE_GETHOST */
+
+/* Timespec has a ts_sec instead of tv_sev */
+#define HAVE_TIMESPEC_TS_SEC 1
+
+/* Have the tzname variable */
+#define HAVE_TZNAME 1
+
+/* Define if the system files define uchar */
+/* #undef HAVE_UCHAR */
+
+/* Define if the system files define uint */
+/* #undef HAVE_UINT */
+
+/* Define if the system files define ulong */
+/* #undef HAVE_ULONG */
+
+/* UNIXWARE7 threads are not posix */
+/* #undef HAVE_UNIXWARE7_THREADS */
+
+/* new UNIXWARE7 threads that are not yet posix */
+/* #undef HAVE_UNIXWARE7_POSIX */
+
+/* READLINE: */
+/* #undef HAVE_USG_SIGHOLD */
+
+/* Define if want -lwrap */
+/* #undef LIBWRAP */
+
+/* mysql client protocoll version */
+#define PROTOCOL_VERSION 10
+
+/* Define if qsort returns void */
+#define QSORT_TYPE_IS_VOID 1
+
+/* Define as the return type of qsort (int or void). */
+#define RETQSORTTYPE void
+
+/* Define as the base type of the last arg to accept */
+#define SOCKET_SIZE_TYPE int
+
+/* Last argument to get/setsockopt */
+/* #undef SOCKOPT_OPTLEN_TYPE */
+
+/* #undef SPEED_T_IN_SYS_TYPES */
+/* #undef SPRINTF_RETURNS_PTR */
+#define SPRINTF_RETURNS_INT 1
+/* #undef SPRINTF_RETURNS_GARBAGE */
+
+/* #undef STRUCT_DIRENT_HAS_D_FILENO */
+#define STRUCT_DIRENT_HAS_D_INO 1
+
+/* Define if you want to have threaded code. This may be undef on client code */
+#define THREAD 1
+
+/* Should be client be thread safe */
+/* #undef THREAD_SAFE_CLIENT */
+
+/* READLINE: */
+/* #undef TIOCSTAT_IN_SYS_IOCTL */
+
+/* Use multi-byte character routines */
+/* #undef USE_MB */
+/* #undef USE_MB_IDENT */
+
+/* Use MySQL RAID */
+/* #undef USE_RAID */
+
+/* Use strcoll() functions when comparing and sorting. */
+/* #undef USE_STRCOLL */
+
+/* READLINE: */
+#define VOID_SIGHANDLER 1
+
+/* The number of bytes in a char. */
+#define SIZEOF_CHAR 1
+
+/* The number of bytes in a int. */
+#define SIZEOF_INT 4
+
+/* The number of bytes in a long. */
+#define SIZEOF_LONG 4
+
+/* The number of bytes in a long long. */
+#define SIZEOF_LONG_LONG 8
+
+/* Define if you have the alarm function. */
+#define HAVE_ALARM 1
+
+/* Define if you have the atod function. */
+/* #undef HAVE_ATOD */
+
+/* Define if you have the bcmp function. */
+#define HAVE_BCMP 1
+
+/* Define if you have the bfill function. */
+/* #undef HAVE_BFILL */
+
+/* Define if you have the bmove function. */
+/* #undef HAVE_BMOVE */
+
+/* Define if you have the bzero function. */
+#define HAVE_BZERO 1
+
+/* Define if you have the chsize function. */
+#define HAVE_CHSIZE 1
+
+/* Define if you have the cuserid function. */
+//#define HAVE_CUSERID 1
+
+/* Define if you have the dlerror function. */
+#define HAVE_DLERROR 1
+
+/* Define if you have the dlopen function. */
+#define HAVE_DLOPEN 1
+
+/* Define if you have the fchmod function. */
+/* #undef HAVE_FCHMOD */
+
+/* Define if you have the fcntl function. */
+//#define HAVE_FCNTL 1
+
+/* Define if you have the fconvert function. */
+/* #undef HAVE_FCONVERT */
+
+/* Define if you have the finite function. */
+/* #undef HAVE_FINITE */
+
+/* Define if you have the fpresetsticky function. */
+/* #undef HAVE_FPRESETSTICKY */
+
+/* Define if you have the fpsetmask function. */
+/* #undef HAVE_FPSETMASK */
+
+/* Define if you have the fseeko function. */
+/* #undef HAVE_FSEEKO */
+
+/* Define if you have the ftruncate function. */
+//#define HAVE_FTRUNCATE 1
+
+/* Define if you have the getcwd function. */
+#define HAVE_GETCWD 1
+
+/* Define if you have the gethostbyaddr_r function. */
+/* #undef HAVE_GETHOSTBYADDR_R */
+
+/* Define if you have the gethostbyname_r function. */
+/* #undef HAVE_GETHOSTBYNAME_R */
+
+/* Define if you have the getpagesize function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define if you have the getpass function. */
+//#define HAVE_GETPASS 1
+
+/* Define if you have the getpassphrase function. */
+/* #undef HAVE_GETPASSPHRASE */
+
+/* Define if you have the getpwnam function. */
+//#define HAVE_GETPWNAM 1
+
+/* Define if you have the getpwuid function. */
+//#define HAVE_GETPWUID 1
+
+/* Define if you have the getrlimit function. */
+/* #undef HAVE_GETRLIMIT */
+
+/* Define if you have the getrusage function. */
+/* #undef HAVE_GETRUSAGE */
+
+/* Define if you have the getwd function. */
+#define HAVE_GETWD 1
+
+/* Define if you have the index function. */
+#define HAVE_INDEX 1
+
+/* Define if you have the initgroups function. */
+/* #undef HAVE_INITGROUPS */
+
+/* Define if you have the localtime_r function. */
+#define HAVE_LOCALTIME_R 1
+
+/* Define if you have the locking function. */
+/* #undef HAVE_LOCKING */
+
+/* Define if you have the longjmp function. */
+#define HAVE_LONGJMP 1
+
+/* Define if you have the lrand48 function. */
+/* #undef HAVE_LRAND48 */
+
+/* Define if you have the lstat function. */
+/* #undef HAVE_LSTAT */
+
+/* Define if you have the madvise function. */
+/* #undef HAVE_MADVISE */
+
+/* Define if you have the memcpy function. */
+#define HAVE_MEMCPY 1
+
+/* Define if you have the memmove function. */
+#define HAVE_MEMMOVE 1
+
+/* Define if you have the mkstemp function. */
+//#define HAVE_MKSTEMP 1
+
+/* Define if you have the mlockall function. */
+/* #undef HAVE_MLOCKALL */
+
+/* Define if you have the perror function. */
+#define HAVE_PERROR 1
+
+/* Define if you have the poll function. */
+/* #undef HAVE_POLL */
+
+/* Define if you have the pread function. */
+/* #undef HAVE_PREAD */
+
+/* Define if you have the pthread_attr_create function. */
+/* #undef HAVE_PTHREAD_ATTR_CREATE */
+
+/* Define if you have the pthread_attr_setprio function. */
+#define HAVE_PTHREAD_ATTR_SETPRIO 1
+
+/* Define if you have the pthread_attr_setschedparam function. */
+/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
+
+/* Define if you have the pthread_attr_setstacksize function. */
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+
+/* Define if you have the pthread_condattr_create function. */
+/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
+
+/* Define if you have the pthread_getsequence_np function. */
+/* #undef HAVE_PTHREAD_GETSEQUENCE_NP */
+
+/* Define if you have the pthread_init function. */
+/* #undef HAVE_PTHREAD_INIT */
+
+/* Define if you have the pthread_rwlock_rdlock function. */
+/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */
+
+/* Define if you have the pthread_setprio function. */
+#define HAVE_PTHREAD_SETPRIO 1
+
+/* Define if you have the pthread_setprio_np function. */
+/* #undef HAVE_PTHREAD_SETPRIO_NP */
+
+/* Define if you have the pthread_setschedparam function. */
+/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
+
+/* Define if you have the pthread_sigmask function. */
+#define HAVE_PTHREAD_SIGMASK 1
+
+/* Define if you have the putenv function. */
+#define HAVE_PUTENV 1
+
+/* Define if you have the readlink function. */
+/* #undef HAVE_READLINK */
+
+/* Define if you have the realpath function. */
+/* #undef HAVE_REALPATH */
+
+/* Define if you have the rename function. */
+#define HAVE_RENAME 1
+
+/* Define if you have the rint function. */
+#define HAVE_RINT 1
+
+/* Define if you have the rwlock_init function. */
+/* #undef HAVE_RWLOCK_INIT */
+
+/* Define if you have the select function. */
+#define HAVE_SELECT 1
+
+/* Define if you have the setenv function. */
+/* #undef HAVE_SETENV */
+
+/* Define if you have the setlocale function. */
+#define HAVE_SETLOCALE 1
+
+/* Define if you have the setupterm function. */
+/* #undef HAVE_SETUPTERM */
+
+/* Define if you have the sighold function. */
+/* #undef HAVE_SIGHOLD */
+
+/* Define if you have the sigset function. */
+/* #undef HAVE_SIGSET */
+
+/* Define if you have the sigthreadmask function. */
+/* #undef HAVE_SIGTHREADMASK */
+
+/* Define if you have the snprintf function. */
+//#define HAVE_SNPRINTF 1
+
+/* Define if you have the socket function. */
+#define HAVE_SOCKET 1
+
+/* Define if you have the stpcpy function. */
+/* #undef HAVE_STPCPY */
+
+/* Define if you have the strcasecmp function. */
+/* #undef HAVE_STRCASECMP */
+
+/* Define if you have the strcoll function. */
+#define HAVE_STRCOLL 1
+
+/* Define if you have the strerror function. */
+#define HAVE_STRERROR 1
+
+/* Define if you have the strnlen function. */
+/* #undef HAVE_STRNLEN */
+
+/* Define if you have the strpbrk function. */
+#define HAVE_STRPBRK 1
+
+/* Define if you have the strstr function. */
+#define HAVE_STRSTR 1
+
+/* Define if you have the strtok_r function. */
+/* #undef HAVE_STRTOK_R */
+
+/* Define if you have the strtol function. */
+#define HAVE_STRTOL 1
+
+/* Define if you have the strtoul function. */
+#define HAVE_STRTOUL 1
+
+/* Define if you have the strtoull function. */
+/* #undef HAVE_STRTOULL */
+
+/* Define if you have the tcgetattr function. */
+#define HAVE_TCGETATTR 1
+
+/* Define if you have the tell function. */
+#define HAVE_TELL 1
+
+/* Define if you have the tempnam function. */
+#define HAVE_TEMPNAM 1
+
+/* Define if you have the thr_setconcurrency function. */
+/* #undef HAVE_THR_SETCONCURRENCY */
+
+/* Define if you have the vidattr function. */
+/* #undef HAVE_VIDATTR */
+
+/* Define if you have the <alloca.h> header file. */
+//#define HAVE_ALLOCA_H 1
+
+/* Define if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define if you have the <asm/termbits.h> header file. */
+/* #undef HAVE_ASM_TERMBITS_H */
+
+/* Define if you have the <crypt.h> header file. */
+#define HAVE_CRYPT_H 1
+
+/* Define if you have the <curses.h> header file. */
+//#define HAVE_CURSES_H 1
+
+/* Define if you have the <dirent.h> header file. */
+//#define HAVE_DIRENT_H 1
+
+/* Define if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define if you have the <float.h> header file. */
+#define HAVE_FLOAT_H 1
+
+/* Define if you have the <floatingpoint.h> header file. */
+/* #undef HAVE_FLOATINGPOINT_H */
+
+/* Define if you have the <grp.h> header file. */
+//#define HAVE_GRP_H 1
+
+/* Define if you have the <ieeefp.h> header file. */
+/* #undef HAVE_IEEEFP_H */
+
+/* Define if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have the <ndir.h> header file. */
+/* #undef HAVE_NDIR_H */
+
+/* Define if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define if you have the <paths.h> header file. */
+/* #undef HAVE_PATHS_H */
+
+/* Define if you have the <pwd.h> header file. */
+//#define HAVE_PWD_H 1
+
+/* Define if you have the <sched.h> header file. */
+/* #undef HAVE_SCHED_H */
+
+/* Define if you have the <select.h> header file. */
+/* #undef HAVE_SELECT_H */
+
+/* Define if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <strings.h> header file. */
+//#define HAVE_STRINGS_H 1
+
+/* Define if you have the <synch.h> header file. */
+/* #undef HAVE_SYNCH_H */
+
+/* Define if you have the <sys/dir.h> header file. */
+//#define HAVE_SYS_DIR_H 1
+
+/* Define if you have the <sys/file.h> header file. */
+//#define HAVE_SYS_FILE_H 1
+
+/* Define if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define if you have the <sys/mman.h> header file. */
+/* #undef HAVE_SYS_MMAN_H */
+
+/* Define if you have the <sys/ndir.h> header file. */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define if you have the <sys/pte.h> header file. */
+/* #undef HAVE_SYS_PTE_H */
+
+/* Define if you have the <sys/ptem.h> header file. */
+/* #undef HAVE_SYS_PTEM_H */
+
+/* Define if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define if you have the <sys/stream.h> header file. */
+/* #undef HAVE_SYS_STREAM_H */
+
+/* Define if you have the <sys/timeb.h> header file. */
+#define HAVE_SYS_TIMEB_H 1
+
+/* Define if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define if you have the <sys/un.h> header file. */
+#define HAVE_SYS_UN_H 1
+
+/* Define if you have the <sys/utime.h> header file. */
+#define HAVE_SYS_UTIME_H 1
+
+/* Define if you have the <sys/vadvise.h> header file. */
+/* #undef HAVE_SYS_VADVISE_H */
+
+/* Define if you have the <sys/wait.h> header file. */
+//#define HAVE_SYS_WAIT_H 1
+
+/* Define if you have the <term.h> header file. */
+/* #undef HAVE_TERM_H */
+
+/* Define if you have the <termbits.h> header file. */
+/* #undef HAVE_TERMBITS_H */
+
+/* Define if you have the <termcap.h> header file. */
+//#define HAVE_TERMCAP_H 1
+
+/* Define if you have the <termio.h> header file. */
+//#define HAVE_TERMIO_H 1
+
+/* Define if you have the <termios.h> header file. */
+//#define HAVE_TERMIOS_H 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define if you have the <varargs.h> header file. */
+#define HAVE_VARARGS_H 1
+
+/* Define if you have the bind library (-lbind). */
+/* #undef HAVE_LIBBIND */
+
+/* Define if you have the c_r library (-lc_r). */
+/* #undef HAVE_LIBC_R */
+
+/* Define if you have the compat library (-lcompat). */
+/* #undef HAVE_LIBCOMPAT */
+
+/* Define if you have the crypt library (-lcrypt). */
+#define HAVE_LIBCRYPT 1
+
+/* Define if you have the dl library (-ldl). */
+#define HAVE_LIBDL 1
+
+/* Define if you have the gen library (-lgen). */
+/* #undef HAVE_LIBGEN */
+
+/* Define if you have the m library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define if you have the nsl library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define if you have the nsl_r library (-lnsl_r). */
+/* #undef HAVE_LIBNSL_R */
+
+/* Define if you have the pthread library (-lpthread). */
+/* #undef HAVE_LIBPTHREAD */
+
+/* Define if you have the socket library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define to make fseeko etc. visible, on some hosts. */
+/* #undef _LARGEFILE_SOURCE */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+#endif // __CONFIG_OS2_H__
diff --git a/include/errmsg.h b/include/errmsg.h
index b7afe11b615..7a967954bab 100644
--- a/include/errmsg.h
+++ b/include/errmsg.h
@@ -29,6 +29,7 @@ extern const char *client_errors[]; /* Error messages */
#define CR_MIN_ERROR 2000 /* For easier client code */
#define CR_MAX_ERROR 2999
+#undef ER
#define ER(X) client_errors[(X)-CR_MIN_ERROR]
#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
diff --git a/include/global.h b/include/global.h
index a11600a96fc..d6a46e1b187 100644
--- a/include/global.h
+++ b/include/global.h
@@ -43,14 +43,14 @@
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
#include <config-win.h>
+#elif defined(OS2)
+#include <config-os2.h>
#else
#include <my_config.h>
-#endif
-#if defined(__cplusplus)
-#if defined(inline)
+#if defined(__cplusplus) && defined(inline)
#undef inline /* fix configure problem */
#endif
-#endif /* _cplusplus */
+#endif /* _WIN32... */
/* Fix problem with S_ISLNK() on Linux */
#if defined(HAVE_LINUXTHREADS)
@@ -76,7 +76,7 @@
#define __STDC_EXT__ 1 /* To get large file support on hpux */
#endif
-#if defined(THREAD) && !defined(__WIN__)
+#if defined(THREAD) && !defined(__WIN__) && !defined(OS2)
#ifndef _POSIX_PTHREAD_SEMANTICS
#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */
#endif
@@ -220,7 +220,9 @@
#define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */
#define USE_REGEX 1 /* We want the use the regex library */
/* Do not define for ultra sparcs */
+#ifndef OS2
#define USE_BMOVE512 1 /* Use this unless the system bmove is faster */
+#endif
/* Paranoid settings. Define I_AM_PARANOID if you are paranoid */
#ifdef I_AM_PARANOID
@@ -470,7 +472,11 @@ extern double my_atof(const char*);
#endif
#undef remove /* Crashes MySQL on SCO 5.0.0 */
#ifndef __WIN__
+#ifdef OS2
+#define closesocket(A) soclose(A)
+#else
#define closesocket(A) close(A)
+#endif
#ifndef ulonglong2double
#define ulonglong2double(A) ((double) (A))
#define my_off_t2double(A) ((double) (A))
@@ -559,9 +565,13 @@ typedef long my_ptrdiff_t;
#ifndef NEAR
#define NEAR /* Who needs segments ? */
#define FAR /* On a good machine */
+#ifndef HUGE_PTR
#define HUGE_PTR
#endif
-#ifndef STDCALL
+#endif
+#if defined(__IBMC__) || defined(__IBMCPP__)
+#define STDCALL _System _Export
+#elif !defined( STDCALL)
#define STDCALL
#endif
@@ -629,10 +639,20 @@ typedef ulonglong my_off_t;
typedef unsigned long my_off_t;
#endif
#define MY_FILEPOS_ERROR (~(my_off_t) 0)
-#ifndef __WIN__
+#if !defined(__WIN__) && !defined(OS2)
typedef off_t os_off_t;
#endif
+#if defined(__WIN__)
+#define socket_errno WSAGetLastError()
+#elif defined(OS2)
+#define socket_errno sock_errno()
+#define closesocket(A) soclose(A)
+#else
+#define socket_errno errno
+#define closesocket(A) close(A)
+#endif
+
typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
typedef short int15; /* Most effective integer 0 <= x <= 32767 */
typedef char *my_string; /* String of characters */
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 652bdd205c0..d31d09896dc 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -25,9 +25,19 @@
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif
-#if defined(__WIN__)
+#if defined(__WIN__) || defined(OS2)
+#ifdef OS2
+typedef ULONG HANDLE;
+typedef ULONG DWORD;
+typedef int sigset_t;
+#endif
+
+#ifdef OS2
+typedef HMTX pthread_mutex_t;
+#else
typedef CRITICAL_SECTION pthread_mutex_t;
+#endif
typedef HANDLE pthread_t;
typedef struct thread_attr {
DWORD dwStackSize ;
@@ -46,19 +56,30 @@ typedef struct st_pthread_link {
typedef struct {
uint32 waiting;
+#ifdef OS2
+ HEV semaphore;
+#else
HANDLE semaphore;
+#endif
} pthread_cond_t;
+#ifndef OS2
struct timespec { /* For pthread_cond_timedwait() */
time_t tv_sec;
long tv_nsec;
};
+#endif
typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
+#ifdef OS2
+#define pthread_handler_decl(A,B) void * _Optlink A(void *B)
+typedef void * (_Optlink *pthread_handler)(void *);
+#else
#define pthread_handler_decl(A,B) void * __cdecl A(void *B)
typedef void * (__cdecl *pthread_handler)(void *);
+#endif
void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);
@@ -78,12 +99,14 @@ struct tm *localtime_r(const time_t *timep,struct tm *tmp);
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
+#ifndef OS2
#define ETIMEDOUT 145 /* Win32 doesn't have this */
#define getpid() GetCurrentThreadId()
+#endif
#define pthread_self() win_pthread_self
-#define HAVE_LOCALTIME_R
-#define _REENTRANT
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE
+#define HAVE_LOCALTIME_R 1
+#define _REENTRANT 1
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
#ifdef USE_TLS /* For LIBMYSQL.DLL */
#undef SAFE_MUTEX /* This will cause conflicts */
@@ -105,13 +128,23 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#endif /* USE_TLS */
#define pthread_equal(A,B) ((A) == (B))
+#ifdef OS2
+int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
+int pthread_mutex_lock (pthread_mutex_t *);
+int pthread_mutex_unlock (pthread_mutex_t *);
+int pthread_mutex_destroy (pthread_mutex_t *);
+#define my_pthread_setprio(A,B) DosSetPriority(PRTYS_THREAD,PRTYC_NOCHANGE, B, A)
+#define pthread_kill(A,B) raise(B)
+#else
#define pthread_mutex_init(A,B) InitializeCriticalSection(A)
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
-/* Dummy defines for easier code */
#define pthread_kill(A,B) pthread_dummy(0)
+#endif /* OS2 */
+
+/* Dummy defines for easier code */
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)
#define pthread_attr_setscope(A,B)
@@ -311,12 +344,15 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
#undef HAVE_GETHOSTBYADDR_R /* No definition */
#endif
-#ifndef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC
+#if defined(OS2)
+#define my_pthread_getspecific(T,A) ((T) &(A))
+#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
+#elif !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B))
#else
#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
void *my_pthread_getspecific_imp(pthread_key_t key);
-#endif
+#endif /* OS2 */
#ifndef HAVE_LOCALTIME_R
struct tm *localtime_r(const time_t *clock, struct tm *res);
diff --git a/include/my_sys.h b/include/my_sys.h
index 42f332bcee7..5b45f6a91e5 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -126,6 +126,7 @@ extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
extern ulonglong safemalloc_mem_limit;
#else
#define my_checkmalloc() (0)
+#undef TERMINATE
#define TERMINATE(A) {}
#define QUICK_SAFEMALLOC
#define NORMAL_SAFEMALLOC
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 82eb34060a9..2e455c456fa 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -233,10 +233,4 @@ void my_thread_end(void);
#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
-#ifdef __WIN__
-#define socket_errno WSAGetLastError()
-#else
-#define socket_errno errno
-#endif
-
#endif
diff --git a/include/thr_alarm.h b/include/thr_alarm.h
index da68b9fce07..1f3fed1d29b 100644
--- a/include/thr_alarm.h
+++ b/include/thr_alarm.h
@@ -65,7 +65,7 @@ typedef struct st_thr_alarm_entry
rf_SetTimer crono;
} thr_alarm_entry;
-#elif defined(__EMX__)
+#elif defined(__EMX__) || defined(OS2)
typedef struct st_thr_alarm_entry
{
diff --git a/isam/isamchk.c b/isam/isamchk.c
index bb9b7bfa16b..3aa1cf4e3c2 100644
--- a/isam/isamchk.c
+++ b/isam/isamchk.c
@@ -44,7 +44,7 @@ SET_STACK_SIZE(9000) /* Minimum stack size for program */
#define T_SORT_RECORDS 4096
#define T_SORT_INDEX 8192
#define T_WAIT_FOREVER 16384
-#define T_REP_BY_SORT 32768
+#define T_REP_BY_SORT 32768L
#define O_NEW_INDEX 1 /* Bits set in out_flag */
@@ -74,17 +74,17 @@ SET_STACK_SIZE(9000) /* Minimum stack size for program */
#define UPDATE_STAT 2
#define UPDATE_SORT 4
-typedef struct st_sort_key_blocks { /* Used when sorting */
+typedef struct st_isam_sort_key_blocks { /* Used when sorting */
uchar *buff,*end_pos;
uchar lastkey[N_MAX_POSSIBLE_KEY_BUFF];
uint last_length;
int inited;
-} SORT_KEY_BLOCKS;
+} ISAM_SORT_KEY_BLOCKS;
-typedef struct st_sort_info {
+typedef struct st_isam_sort_info {
N_INFO *info;
enum data_file_type new_data_file_type;
- SORT_KEY_BLOCKS *key_block,*key_block_end;
+ ISAM_SORT_KEY_BLOCKS *key_block,*key_block_end;
uint key,find_length;
ulong pos,max_pos,filepos,start_recpos,filelength,dupp,max_records,unique,
buff_length;
@@ -92,9 +92,9 @@ typedef struct st_sort_info {
char *record,*buff;
N_KEYDEF *keyinfo;
N_KEYSEG *keyseg;
-} SORT_INFO;
+} ISAM_SORT_INFO;
-enum options {OPT_CHARSETS_DIR=256};
+enum ic_options {OPT_CHARSETS_DIR_IC=256};
static ulong use_buffers=0,read_buffer_length=0,write_buffer_length=0,
sort_buffer_length=0,sort_key_blocks=0,crc=0,unique_count=0;
@@ -120,7 +120,7 @@ static const char *type_names[]=
static char temp_filename[FN_REFLEN], *isam_file_name, *default_charset;
static IO_CACHE read_cache;
-static SORT_INFO sort_info;
+static ISAM_SORT_INFO sort_info;
static int tmpfile_createflag=O_RDWR | O_TRUNC | O_EXCL;
static const char *load_default_groups[]= { "isamchk",0 };
@@ -137,8 +137,8 @@ static int chk_del(N_INFO *info,uint testflag);
static int check_k_link(N_INFO *info,uint nr);
static int chk_size(N_INFO *info);
static int chk_key(N_INFO *info);
-static int chk_index(N_INFO *info,N_KEYDEF *keyinfo,ulong page,uchar *buff,
- ulong *keys,uint level);
+static int chk_index(N_INFO *info, N_KEYDEF *keyinfo, ulong page, uchar *buff,
+ ulong *keys, uint level);
static uint isam_key_length(N_INFO *info,N_KEYDEF *keyinfo);
static unsigned long calc_checksum(ulong count);
static int chk_data_link(N_INFO *info,int extend);
@@ -171,12 +171,12 @@ static int sort_key_cmp(const void *not_used, const void *a,const void *b);
static int sort_key_write(const void *a);
static ulong get_record_for_key(N_INFO *info,N_KEYDEF *keyinfo,
uchar *key);
-static int sort_insert_key(reg1 SORT_KEY_BLOCKS *key_block,uchar *key,
+static int sort_insert_key(reg1 ISAM_SORT_KEY_BLOCKS *key_block,uchar *key,
ulong prev_block);
static int sort_delete_record(void);
static void usage(void);
static int flush_pending_blocks(void);
-static SORT_KEY_BLOCKS *alloc_key_blocks(uint blocks,uint buffer_length);
+static ISAM_SORT_KEY_BLOCKS *alloc_key_blocks(uint blocks,uint buffer_length);
static int test_if_almost_full(N_INFO *info);
static int recreate_database(N_INFO **info,char *filename);
static void save_integer(byte *pos,uint pack_length,ulong value);
@@ -186,9 +186,7 @@ static int update_state_info(N_INFO *info,uint update);
/* Main program */
-int main(argc,argv)
-int argc;
-char **argv;
+int main( int argc, char **argv)
{
int error;
MY_INIT(argv[0]);
@@ -255,7 +253,7 @@ static CHANGEABLE_VAR changeable_vars[] = {
static struct option long_options[] =
{
{"analyze", no_argument, 0, 'a'},
- {"character-sets-dir", required_argument, 0, OPT_CHARSETS_DIR},
+ {"character-sets-dir", required_argument, 0, OPT_CHARSETS_DIR_IC},
#ifndef DBUG_OFF
{"debug", required_argument, 0, '#'},
#endif
@@ -284,7 +282,7 @@ static struct option long_options[] =
static void print_version(void)
{
- printf("%s Ver 5.16 for %s at %s\n",my_progname,SYSTEM_TYPE,
+ printf("%s Ver 5.17 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
}
@@ -598,7 +596,7 @@ static void get_options(register int *argc,register char ***argv)
case 'C':
default_charset=optarg;
break;
- case OPT_CHARSETS_DIR:
+ case OPT_CHARSETS_DIR_IC:
charsets_dir = optarg;
break;
case 'b':
@@ -706,9 +704,7 @@ static void get_options(register int *argc,register char ***argv)
/* Check delete links */
-static int chk_del(info,test_flag)
-reg1 N_INFO *info;
-uint test_flag;
+static int chk_del( reg1 N_INFO *info, uint test_flag)
{
reg2 ulong i;
uint j,delete_link_length;
@@ -793,9 +789,7 @@ wrong:
/* Kontrollerar l{nkarna i nyckelfilen */
-static int check_k_link(info,nr)
-register N_INFO *info;
-uint nr;
+static int check_k_link( register N_INFO *info, uint nr)
{
ulong next_link,records;
DBUG_ENTER("check_k_link");
@@ -898,8 +892,7 @@ static int chk_size(register N_INFO *info)
/* Kontrollerar nycklarna */
-static int chk_key(info)
-register N_INFO *info;
+static int chk_key( register N_INFO *info)
{
uint key;
ulong keys,all_keydata,all_totaldata,key_totlength,length,
@@ -988,12 +981,8 @@ register N_INFO *info;
/* Check if index is ok */
-static int chk_index(info,keyinfo,page,buff,keys,level)
-N_INFO *info;
-N_KEYDEF *keyinfo;
-ulong page,*keys;
-uchar *buff;
-uint level;
+static int chk_index(N_INFO *info, N_KEYDEF *keyinfo, ulong page, uchar *buff,
+ ulong *keys,uint level)
{
int flag;
uint used_length,comp_flag,nod_flag;
@@ -1129,9 +1118,7 @@ ulong count;
/* Calc length of key in normal isam */
-static uint isam_key_length(info,keyinfo)
-N_INFO *info;
-reg1 N_KEYDEF *keyinfo;
+static uint isam_key_length( N_INFO *info, reg1 N_KEYDEF *keyinfo)
{
uint length;
N_KEYSEG *keyseg;
@@ -2962,8 +2949,7 @@ static int sort_key_cmp(const void *not_used __attribute__((unused)),
} /* sort_key_cmp */
-static int sort_key_write(a)
-const void *a;
+static int sort_key_write( const void *a)
{
int cmp=sort_info.key_block->inited ?
_nisam_key_cmp(sort_info.keyseg,sort_info.key_block->lastkey,(uchar*) a,
@@ -2997,10 +2983,7 @@ const void *a;
/* get pointer to record from a key */
-static ulong get_record_for_key(info,keyinfo,key)
-N_INFO *info;
-N_KEYDEF *keyinfo;
-uchar *key;
+static ulong get_record_for_key( N_INFO *info, N_KEYDEF *keyinfo, uchar *key)
{
return _nisam_dpos(info,0,key+_nisam_keylength(keyinfo,key));
} /* get_record_for_key */
@@ -3008,10 +2991,8 @@ uchar *key;
/* Insert a key in sort-key-blocks */
-static int sort_insert_key(key_block,key,prev_block)
-reg1 SORT_KEY_BLOCKS *key_block;
-uchar *key;
-ulong prev_block;
+static int sort_insert_key(reg1 ISAM_SORT_KEY_BLOCKS *key_block,
+ uchar *key, ulong prev_block)
{
uint a_length,t_length,nod_flag;
ulong filepos;
@@ -3140,7 +3121,7 @@ static int flush_pending_blocks()
uint nod_flag,length;
ulong filepos;
N_INFO *info;
- SORT_KEY_BLOCKS *key_block;
+ ISAM_SORT_KEY_BLOCKS *key_block;
DBUG_ENTER("flush_pending_blocks");
filepos= NI_POS_ERROR; /* if empty file */
@@ -3169,16 +3150,15 @@ static int flush_pending_blocks()
/* alloc space and pointers for key_blocks */
-static SORT_KEY_BLOCKS *alloc_key_blocks(blocks,buffer_length)
-uint blocks,buffer_length;
+static ISAM_SORT_KEY_BLOCKS *alloc_key_blocks(uint blocks, uint buffer_length)
{
reg1 uint i;
- SORT_KEY_BLOCKS *block;
+ ISAM_SORT_KEY_BLOCKS *block;
DBUG_ENTER("alloc_key_blocks");
- if (!(block=(SORT_KEY_BLOCKS*) my_malloc((sizeof(SORT_KEY_BLOCKS)+
- buffer_length+IO_SIZE)*blocks,
- MYF(0))))
+ if (!(block=(ISAM_SORT_KEY_BLOCKS*) my_malloc((sizeof(ISAM_SORT_KEY_BLOCKS)+
+ buffer_length+IO_SIZE)*blocks,
+ MYF(0))))
{
print_error("Not Enough memory for sort-key-blocks");
return(0);
@@ -3253,8 +3233,7 @@ void print_error(const char *fmt,...)
/* Check if file is almost full */
-static int test_if_almost_full(info)
-N_INFO *info;
+static int test_if_almost_full(N_INFO *info)
{
double diff= 0.9;
if (info->s->base.options & HA_OPTION_COMPRESS_RECORD)
@@ -3274,9 +3253,7 @@ N_INFO *info;
/* Recreate table with bigger more alloced record-data */
-static int recreate_database(org_info,filename)
-N_INFO **org_info;
-char *filename;
+static int recreate_database(N_INFO **org_info, char *filename)
{
int error;
N_INFO info;
@@ -3369,10 +3346,7 @@ end:
/* Store long in 1,2,3 or 4 bytes */
-static void save_integer(pos,pack_length,value)
-byte *pos;
-uint pack_length;
-ulong value;
+static void save_integer( byte *pos, uint pack_length, ulong value)
{
switch (pack_length) {
case 4: int4store(pos,value); break;
@@ -3386,8 +3360,7 @@ ulong value;
/* write suffix to data file if neaded */
-static int write_data_suffix(info)
-N_INFO *info;
+static int write_data_suffix( N_INFO *info)
{
if (info->s->base.options & HA_OPTION_COMPRESS_RECORD &&
sort_info.fix_datafile)
@@ -3407,9 +3380,7 @@ N_INFO *info;
/* Update state and isamchk_time of indexfile */
-static int update_state_info(info,update)
-N_INFO *info;
-uint update;
+static int update_state_info( N_INFO *info, uint update)
{
ISAM_SHARE *share=info->s;
uint base_pos=uint2korr(info->s->state.header.base_pos);
diff --git a/isam/isamlog.c b/isam/isamlog.c
index d1347d46c2e..5763b697d07 100644
--- a/isam/isamlog.c
+++ b/isam/isamlog.c
@@ -1,15 +1,15 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
@@ -29,7 +29,7 @@
#define FILENAME(A) (A ? A->show_name : "Unknown")
-struct file_info {
+struct isamlog_file_info {
long process;
int filenr,id;
my_string name,show_name,record;
@@ -46,7 +46,7 @@ struct test_if_open_param {
struct st_access_param
{
ulong min_accessed;
- struct file_info *found;
+ struct isamlog_file_info *found;
};
#define NO_FILEPOS (ulong) ~0L
@@ -56,21 +56,22 @@ static void get_options(int *argc,char ***argv);
static int examine_log(my_string file_name,char **table_names);
static int read_string(IO_CACHE *file,gptr *to,uint length);
static int file_info_compare(void *a,void *b);
-static int test_if_open(struct file_info *key,element_count count,
+static int test_if_open(struct isamlog_file_info *key,element_count count,
struct test_if_open_param *param);
static void fix_blob_pointers(N_INFO *isam,byte *record);
static uint set_maximum_open_files(uint);
-static int test_when_accessed(struct file_info *key,element_count count,
+static int test_when_accessed(struct isamlog_file_info *key,element_count count,
struct st_access_param *access_param);
-static void file_info_free(struct file_info *info);
+static void file_info_free(struct isamlog_file_info *info);
static int close_some_file(TREE *tree);
-static int reopen_closed_file(TREE *tree,struct file_info *file_info);
-static int find_record_with_key(struct file_info *file_info,byte *record);
+static int reopen_closed_file(TREE *tree,struct isamlog_file_info *file_info);
+static int find_record_with_key(struct isamlog_file_info *file_info,
+ byte *record);
static void printf_log(const char *str,...);
-static bool cmp_filename(struct file_info *file_info,my_string name);
+static bool cmp_filename(struct isamlog_file_info *file_info,my_string name);
static uint verbose=0,update=0,test_info=0,max_files=0,re_open_count=0,
- recover=0,prefix_remove=0;
+ recover=0,prefix_remove=0,opt_processes=0;
static my_string log_filename=0,filepath=0,write_filename=0,record_pos_file=0;
static ulong com_count[10][3],number_of_commands=(ulong) ~0L,start_offset=0,
record_pos= NO_FILEPOS,isamlog_filepos,isamlog_process;
@@ -78,9 +79,7 @@ static const char *command_name[]=
{"open","write","update","delete","close","extra","lock","re-open",NullS};
-int main(argc,argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
int error,i,first;
ulong total_count,total_error,total_recover;
@@ -92,11 +91,11 @@ char **argv;
max_files=(set_maximum_open_files(min(max_files,8))-6)/2;
if (update)
- printf("Trying to %s isamfiles according to log '%s'\n",
+ printf("Trying to %s ISAM files according to log '%s'\n",
(recover ? "recover" : "update"),log_filename);
error= examine_log(log_filename,argv);
if (update && ! error)
- puts("isamfile:s updated successfully");
+ puts("Tables updated successfully");
total_count=total_error=total_recover=0;
for (i=first=0 ; command_name[i] ; i++)
{
@@ -128,17 +127,15 @@ char **argv;
} /* main */
-static void get_options(argc,argv)
-register int *argc;
-register char ***argv;
+static void get_options(register int *argc, register char ***argv)
{
int help,version;
- const char *usage;
- char *pos, option;
+ const char *pos,*usage;
+ char option;
help=0;
- usage="Usage: %s [-?iruvIV] [-c #] [-f #] [-F filepath/] [-o #] [-R file recordpos] [-w write_file] [log-filename [table ...]] \n";
- pos= (char*) "";
+ usage="Usage: %s [-?iruvIPV] [-c #] [-f #] [-F filepath/] [-o #] [-R file recordpos] [-w write_file] [log-filename [table ...]] \n";
+ pos= "";
while (--*argc > 0 && *(pos = *(++*argv)) == '-' ) {
while (*++pos)
@@ -147,7 +144,7 @@ register char ***argv;
switch((option=*pos)) {
case '#':
DBUG_PUSH (++pos);
- pos= (char*) " "; /* Skipp rest of arg */
+ pos=" "; /* Skipp rest of arg */
break;
case 'c':
if (! *++pos)
@@ -158,7 +155,7 @@ register char ***argv;
pos= *(++*argv);
}
number_of_commands=(ulong) atol(pos);
- pos= (char*) " ";
+ pos=" ";
break;
case 'u':
update=1;
@@ -172,7 +169,7 @@ register char ***argv;
pos= *(++*argv);
}
max_files=(uint) atoi(pos);
- pos= (char*) " ";
+ pos=" ";
break;
case 'i':
test_info=1;
@@ -186,7 +183,7 @@ register char ***argv;
pos= *(++*argv);
}
start_offset=(ulong) atol(pos);
- pos= (char*) " ";
+ pos=" ";
break;
case 'p':
if (! *++pos)
@@ -202,6 +199,9 @@ register char ***argv;
update=1;
recover++;
break;
+ case 'P':
+ opt_processes=1;
+ break;
case 'R':
if (! *++pos)
{
@@ -210,11 +210,11 @@ register char ***argv;
else
pos= *(++*argv);
}
- record_pos_file=pos;
+ record_pos_file=(char*) pos;
if (!--*argc)
goto err;
record_pos=(ulong) atol(*(++*argv));
- pos= (char*) " ";
+ pos= " ";
break;
case 'v':
verbose++;
@@ -227,8 +227,8 @@ register char ***argv;
else
pos= *(++*argv);
}
- write_filename=pos;
- pos= (char*) " ";
+ write_filename=(char*) pos;
+ pos=" ";
break;
case 'F':
if (! *++pos)
@@ -238,20 +238,20 @@ register char ***argv;
else
pos= *(++*argv);
}
- filepath=pos;
- pos= (char*) " ";
+ filepath= (char*) pos;
+ pos=" ";
break;
case 'V':
version=1;
/* Fall through */
case 'I':
case '?':
- printf("%s Ver 3.2 for %s at %s\n",my_progname,SYSTEM_TYPE,
+ printf("%s Ver 3.3 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
- puts("TCX Datakonsult AB, by Monty, for your professional use\n");
+ puts("By Monty, for your professional use\n");
if (version)
break;
- puts("Write info about whats in a nisam log file.");
+ puts("Write info about whats in a ISAM log file.");
printf("If no file name is given %s is used\n",log_filename);
puts("");
printf(usage,my_progname);
@@ -261,6 +261,7 @@ register char ***argv;
puts(" -o \"offset\" -p # \"remove # components from path\"");
puts(" -r \"recover\" -R \"file recordposition\"");
puts(" -u \"update\" -v \"verbose\" -w \"write file\"");
+ puts(" -P \"processes\"");
puts("\nOne can give a second and a third '-v' for more verbose.");
puts("Normaly one does a update (-u).");
puts("If a recover is done all writes and all possibly updates and deletes is done\nand errors are only counted.");
@@ -281,7 +282,7 @@ register char ***argv;
}
if (*argc >= 1)
{
- log_filename=pos;
+ log_filename=(char*) pos;
(*argc)--;
(*argv)++;
}
@@ -308,7 +309,8 @@ static int examine_log(my_string file_name, char **table_names)
FILE *write_file;
enum ha_extra_function extra_command;
TREE tree;
- struct file_info file_info,*curr_file_info;
+ struct isamlog_file_info file_info,*curr_file_info;
+ char llbuff[22],llbuff2[22];
DBUG_ENTER("examine_log");
if ((file=my_open(file_name,O_RDONLY,MYF(MY_WME))) < 0)
@@ -336,8 +338,11 @@ static int examine_log(my_string file_name, char **table_names)
isamlog_filepos=my_b_tell(&cache)-9L;
file_info.filenr=uint2korr(head+1);
isamlog_process=file_info.process=(long) uint4korr(head+3);
+ if (!opt_processes)
+ file_info.process=0;
result=uint2korr(head+7);
- if ((curr_file_info=(struct file_info*) tree_search(&tree,&file_info)))
+ if ((curr_file_info=(struct isamlog_file_info*)
+ tree_search(&tree,&file_info)))
{
curr_file_info->accessed=access_time;
if (update && curr_file_info->used && curr_file_info->closed)
@@ -352,7 +357,7 @@ static int examine_log(my_string file_name, char **table_names)
}
command=(uint) head[0];
if (command < sizeof(com_count)/sizeof(com_count[0][0])/3 &&
- (!curr_file_info || curr_file_info->used))
+ (!table_names[0] || (curr_file_info && curr_file_info->used)))
{
com_count[command][0]++;
if (result)
@@ -360,12 +365,15 @@ static int examine_log(my_string file_name, char **table_names)
}
switch ((enum nisam_log_commands) command) {
case LOG_OPEN:
- com_count[command][0]--; /* Must be counted explicite */
- if (result)
- com_count[command][1]--;
+ if (!table_names[0])
+ {
+ com_count[command][0]--; /* Must be counted explicite */
+ if (result)
+ com_count[command][1]--;
+ }
if (curr_file_info)
- printf("\nWarning: %s is opened twice with same process and filenumber\n",
+ printf("\nWarning: %s is opened with same process and filenumber\nMaybe you should use the -P option ?\n",
curr_file_info->show_name);
if (my_b_read(&cache,(byte*) head,2))
goto err;
@@ -376,11 +384,17 @@ static int examine_log(my_string file_name, char **table_names)
goto err;
{
uint i;
- char *pos=file_info.name,*to;
+ char *pos,*to;
+
+ /* Fix if old DOS files to new format */
+ for (pos=file_info.name; (pos=strchr(pos,'\\')) ; pos++)
+ *pos= '/';
+
+ pos=file_info.name;
for (i=0 ; i < prefix_remove ; i++)
{
char *next;
- if (!(next=strchr(pos,FN_LIBCHAR)))
+ if (!(next=strchr(pos,'/')))
break;
pos=next+1;
}
@@ -426,7 +440,7 @@ static int examine_log(my_string file_name, char **table_names)
files_open--;
}
if (!(file_info.isam= nisam_open(isam_file_name,O_RDWR,
- HA_OPEN_WAIT_IF_LOCKED)))
+ HA_OPEN_WAIT_IF_LOCKED)))
goto com_err;
if (!(file_info.record=my_malloc(file_info.isam->s->base.reclength,
MYF(MY_WME))))
@@ -438,7 +452,7 @@ static int examine_log(my_string file_name, char **table_names)
if (file_info.used)
{
if (verbose && !record_pos_file)
- printf_log("%s: open",file_info.show_name);
+ printf_log("%s: open -> %d",file_info.show_name, file_info.filenr);
com_count[command][0]++;
if (result)
com_count[command][1]++;
@@ -453,7 +467,6 @@ static int examine_log(my_string file_name, char **table_names)
{
if (!curr_file_info->closed)
files_open--;
- file_info_free(curr_file_info);
VOID(tree_delete(&tree,(gptr) curr_file_info));
}
break;
@@ -464,14 +477,17 @@ static int examine_log(my_string file_name, char **table_names)
if (verbose && !record_pos_file &&
(!table_names[0] || (curr_file_info && curr_file_info->used)))
printf_log("%s: %s(%d) -> %d",FILENAME(curr_file_info),
- command_name[command], extra_command,result);
+ command_name[command], (int) extra_command,result);
if (update && curr_file_info && !curr_file_info->closed)
{
if (nisam_extra(curr_file_info->isam,extra_command) != (int) result)
{
+ fflush(stdout);
VOID(fprintf(stderr,
- "Warning: error %d, expected %d on command %s at %lx\n",
- my_errno,result,command_name[command],isamlog_filepos));
+ "Warning: error %d, expected %d on command %s at %s\n",
+ my_errno,result,command_name[command],
+ llstr(isamlog_filepos,llbuff)));
+ fflush(stderr);
}
}
break;
@@ -501,6 +517,9 @@ static int examine_log(my_string file_name, char **table_names)
goto com_err;
if (ni_result)
com_count[command][2]++; /* Mark error */
+ if (verbose)
+ printf_log("error: Got result %d from mi_delete instead of %d",
+ ni_result, result);
}
}
break;
@@ -539,6 +558,8 @@ static int examine_log(my_string file_name, char **table_names)
result=0;
goto com_err;
}
+ if (verbose)
+ printf_log("error: Didn't find row to update with mi_rrnd");
if (recover == 1 || result ||
find_record_with_key(curr_file_info,buff))
{
@@ -553,6 +574,9 @@ static int examine_log(my_string file_name, char **table_names)
{
if (!recover)
goto com_err;
+ if (verbose)
+ printf_log("error: Got result %d from mi_update instead of %d",
+ ni_result, result);
if (ni_result)
com_count[command][2]++; /* Mark error */
}
@@ -570,9 +594,10 @@ static int examine_log(my_string file_name, char **table_names)
}
if (! recover && filepos != curr_file_info->isam->lastpos)
{
- printf("Warning: Wrote at position: %ld, should have been %ld",
- curr_file_info->isam->lastpos,(long) filepos);
- goto com_err;
+ printf("error: Wrote at position: %s, should have been %s",
+ llstr(curr_file_info->isam->lastpos,llbuff),
+ llstr(filepos,llbuff2));
+ goto end;
}
}
}
@@ -597,6 +622,7 @@ static int examine_log(my_string file_name, char **table_names)
VOID(fprintf(stderr,
"Error: found unknown command %d in logfile, aborted\n",
command));
+ fflush(stderr);
goto end;
}
}
@@ -609,11 +635,16 @@ static int examine_log(my_string file_name, char **table_names)
DBUG_RETURN(0);
err:
+ fflush(stdout);
VOID(fprintf(stderr,"Got error %d when reading from logfile\n",my_errno));
+ fflush(stderr);
goto end;
com_err:
- VOID(fprintf(stderr,"Got error %d, expected %d on command %s at %lx\n",
- my_errno,result,command_name[command],isamlog_filepos));
+ fflush(stdout);
+ VOID(fprintf(stderr,"Got error %d, expected %d on command %s at %s\n",
+ my_errno,result,command_name[command],
+ llstr(isamlog_filepos,llbuff)));
+ fflush(stderr);
end:
end_key_cache();
delete_tree(&tree);
@@ -625,10 +656,7 @@ static int examine_log(my_string file_name, char **table_names)
}
-static int read_string(file,to,length)
-IO_CACHE *file;
-reg1 gptr *to;
-reg2 uint length;
+static int read_string(IO_CACHE *file, reg1 gptr *to, reg2 uint length)
{
DBUG_ENTER("read_string");
@@ -647,24 +675,22 @@ reg2 uint length;
} /* read_string */
-static int file_info_compare(a,b)
-void *a;
-void *b;
+static int file_info_compare(void *a, void *b)
{
long lint;
- if ((lint=((struct file_info*) a)->process -
- ((struct file_info*) b)->process))
+ if ((lint=((struct isamlog_file_info*) a)->process -
+ ((struct isamlog_file_info*) b)->process))
return lint < 0L ? -1 : 1;
- return ((struct file_info*) a)->filenr - ((struct file_info*) b)->filenr;
+ return (((struct isamlog_file_info*) a)->filenr -
+ ((struct isamlog_file_info*) b)->filenr);
}
/* ARGSUSED */
-static int test_if_open (key,count,param)
-struct file_info *key;
-element_count count __attribute__((unused));
-struct test_if_open_param *param;
+static int test_if_open (struct isamlog_file_info *key,
+ element_count count __attribute__((unused)),
+ struct test_if_open_param *param)
{
if (!strcmp(key->name,param->name) && key->id > param->max_id)
param->max_id=key->id;
@@ -672,9 +698,7 @@ struct test_if_open_param *param;
}
-static void fix_blob_pointers(info,record)
-N_INFO *info;
-byte *record;
+static void fix_blob_pointers( N_INFO *info, byte *record)
{
byte *pos;
N_BLOB *blob,*end;
@@ -689,8 +713,7 @@ byte *record;
}
}
-static uint set_maximum_open_files(maximum_files)
-uint maximum_files;
+static uint set_maximum_open_files(uint maximum_files)
{
#if defined(HAVE_GETRUSAGE) && defined(RLIMIT_NOFILE)
struct rlimit rlimit;
@@ -725,10 +748,9 @@ uint maximum_files;
/* close the file with hasn't been accessed for the longest time */
/* ARGSUSED */
-static int test_when_accessed (key,count,access_param)
-struct file_info *key;
-element_count count __attribute__((unused));
-struct st_access_param *access_param;
+static int test_when_accessed (struct isamlog_file_info *key,
+ element_count count __attribute__((unused)),
+ struct st_access_param *access_param)
{
if (key->accessed < access_param->min_accessed && ! key->closed)
{
@@ -739,9 +761,9 @@ struct st_access_param *access_param;
}
-static void file_info_free(fileinfo)
-struct file_info *fileinfo;
+static void file_info_free(struct isamlog_file_info *fileinfo)
{
+ DBUG_ENTER("file_info_free");
if (update)
{
if (!fileinfo->closed)
@@ -751,12 +773,12 @@ struct file_info *fileinfo;
}
my_free(fileinfo->name,MYF(0));
my_free(fileinfo->show_name,MYF(0));
+ DBUG_VOID_RETURN;
}
-static int close_some_file(tree)
-TREE *tree;
+static int close_some_file(TREE *tree)
{
struct st_access_param access_param;
@@ -774,9 +796,7 @@ TREE *tree;
}
-static int reopen_closed_file(tree,fileinfo)
-TREE *tree;
-struct file_info *fileinfo;
+static int reopen_closed_file(TREE *tree, struct isamlog_file_info *fileinfo)
{
char name[FN_REFLEN];
if (close_some_file(tree))
@@ -794,9 +814,8 @@ struct file_info *fileinfo;
/* Try to find record with uniq key */
-static int find_record_with_key(file_info,record)
-struct file_info *file_info;
-byte *record;
+static int find_record_with_key(struct isamlog_file_info *file_info,
+ byte *record)
{
uint key;
N_INFO *info=file_info->isam;
@@ -817,10 +836,11 @@ byte *record;
static void printf_log(const char *format,...)
{
+ char llbuff[21];
va_list args;
va_start(args,format);
if (verbose > 2)
- printf("%9ld:",isamlog_filepos);
+ printf("%9s:",llstr(isamlog_filepos,llbuff));
if (verbose > 1)
printf("%5ld ",isamlog_process); /* Write process number */
(void) vprintf((char*) format,args);
@@ -829,9 +849,7 @@ static void printf_log(const char *format,...)
}
-static bool cmp_filename(file_info,name)
-struct file_info *file_info;
-my_string name;
+static bool cmp_filename(struct isamlog_file_info *file_info,my_string name)
{
if (!file_info)
return 1;
diff --git a/isam/test1.c b/isam/test1.c
index 1ec5d8b0318..33c61a53d4a 100644
--- a/isam/test1.c
+++ b/isam/test1.c
@@ -21,9 +21,7 @@ static void get_options(int argc, char *argv[]);
static int rec_pointer_size=0,verbose=0,remove_ant=0,pack_keys=1,flags[50],
packed_field=FIELD_SKIPP_PRESPACE;
-int main(argc,argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
N_INFO *file;
int i,j,error,deleted,found;
@@ -145,9 +143,7 @@ err:
/* l{ser optioner */
/* OBS! intierar endast DEBUG - ingen debuggning h{r ! */
-static void get_options(argc,argv)
-int argc;
-char *argv[];
+static void get_options(int argc, char *argv[])
{
char *pos;
diff --git a/isam/test2.c b/isam/test2.c
index 6ed041ad8c5..def6a4d3d5c 100644
--- a/isam/test2.c
+++ b/isam/test2.c
@@ -53,13 +53,11 @@ static char record[300],record2[300],key[100],key2[100],
/* Test program */
-int main(argc,argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
uint i;
int j,n1,n2,n3,error,k;
- uint write_count,update,dupp_keys,delete,start,length,blob_pos,
+ uint write_count,update,dupp_keys,opt_delete,start,length,blob_pos,
reclength,ant;
ulong lastpos,range_records,records;
N_INFO *file;
@@ -138,7 +136,7 @@ char *argv[];
else
recinfo[6].base.type= FIELD_LAST;
- write_count=update=dupp_keys=delete=0;
+ write_count=update=dupp_keys=opt_delete=0;
blob_buffer=0;
for (i=999 ; i>0 ; i--) key1[i]=0;
@@ -232,7 +230,7 @@ char *argv[];
printf("error: %d; can't delete record: \"%s\"\n", my_errno,read_record);
goto err;
}
- delete++;
+ opt_delete++;
key1[atoi(read_record+keyinfo[0].seg[0].base.start)]--;
key3[atoi(read_record+keyinfo[2].seg[0].base.start)]=0;
}
@@ -346,9 +344,9 @@ char *argv[];
}
while (nisam_rnext(file,read_record3,0) == 0 && ant < write_count+10)
ant++;
- if (ant != write_count - delete)
+ if (ant != write_count - opt_delete)
{
- printf("next: I found: %d records of %d\n",ant,write_count - delete);
+ printf("next: I found: %d records of %d\n",ant,write_count - opt_delete);
goto end;
}
if (nisam_rlast(file,read_record2,0) ||
@@ -362,7 +360,7 @@ char *argv[];
ant=1;
while (nisam_rprev(file,read_record3,0) == 0 && ant < write_count+10)
ant++;
- if (ant != write_count - delete)
+ if (ant != write_count - opt_delete)
{
printf("prev: I found: %d records of %d\n",ant,write_count);
goto end;
@@ -414,7 +412,7 @@ char *argv[];
if (nisam_rkey(file,read_record,0,key,0,HA_READ_KEY_EXACT)) goto err;
if (nisam_rnext(file,read_record3,0)) goto err;
if (nisam_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=1;
while (nisam_rnext(file,read_record3,0) == 0 &&
bcmp(read_record3+start,key,length) == 0) ant++;
@@ -431,7 +429,7 @@ char *argv[];
if (nisam_rprev(file,read_record3,0)) goto err;
if (nisam_rprev(file,read_record3,0)) goto err;
if (nisam_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=1;
while (nisam_rprev(file,read_record3,0) == 0 &&
bcmp(read_record3+start,key,length) == 0) ant++;
@@ -447,7 +445,7 @@ char *argv[];
DBUG_PRINT("progpos",("first - delete - next -> last"));
if (nisam_rkey(file,read_record3,0,key,0,HA_READ_KEY_EXACT)) goto err;
if (nisam_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=1;
if (nisam_rnext(file,read_record,0))
goto err; /* Skall finnas poster */
@@ -463,7 +461,7 @@ char *argv[];
DBUG_PRINT("progpos",("last - delete - prev -> first"));
if (nisam_rprev(file,read_record3,0)) goto err;
if (nisam_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=0;
while (nisam_rprev(file,read_record3,0) == 0 &&
bcmp(read_record3+start,key,length) == 0) ant++;
@@ -555,11 +553,11 @@ char *argv[];
printf("- nisam_info\n");
nisam_info(file,&info,0);
- if (info.records != write_count-delete || info.deleted > delete + update
+ if (info.records != write_count-opt_delete || info.deleted > opt_delete + update
|| info.keys != keys)
{
puts("Wrong info from nisam_info");
- printf("Got: records: %ld delete: %ld i_keys: %d\n",
+ printf("Got: records: %ld opt_delete: %ld i_keys: %d\n",
info.records,info.deleted,info.keys);
}
if (verbose)
@@ -591,10 +589,10 @@ char *argv[];
while ((error=nisam_rrnd(file,record,NI_POS_ERROR)) >= 0 &&
ant < write_count + 10)
ant+= error ? 0 : 1;
- if (ant != write_count-delete)
+ if (ant != write_count-opt_delete)
{
printf("rrnd with cache: I can only find: %d records of %d\n",
- ant,write_count-delete);
+ ant,write_count-opt_delete);
goto end;
}
if (nisam_extra(file,HA_EXTRA_NO_CACHE))
@@ -648,14 +646,14 @@ char *argv[];
printf("can't delete record: %s\n",read_record);
goto err;
}
- delete++;
+ opt_delete++;
}
}
if (my_errno != HA_ERR_END_OF_FILE && my_errno != HA_ERR_RECORD_DELETED)
printf("error: %d from nisam_rrnd\n",my_errno);
- if (write_count != delete)
+ if (write_count != opt_delete)
{
- printf("Deleted only %d of %d records\n",write_count,delete);
+ printf("Deleted only %d of %d records\n",write_count,opt_delete);
goto err;
}
end:
@@ -663,7 +661,7 @@ end:
goto err;
nisam_panic(HA_PANIC_CLOSE); /* Should close log */
printf("\nFollowing test have been made:\n");
- printf("Write records: %d\nUpdate records: %d\nSame-key-read: %d\nDelete records: %d\n", write_count,update,dupp_keys,delete);
+ printf("Write records: %d\nUpdate records: %d\nSame-key-read: %d\nDelete records: %d\n", write_count,update,dupp_keys,opt_delete);
if (rec_pointer_size)
printf("Record pointer size: %d\n",rec_pointer_size);
if (key_cacheing)
@@ -692,9 +690,7 @@ err:
/* l{ser optioner */
/* OBS! intierar endast DEBUG - ingen debuggning h{r ! */
-static void get_options(argc,argv)
-int argc;
-char *argv[];
+static void get_options( int argc, char *argv[])
{
char *pos,*progname;
DEBUGGER_OFF;
@@ -785,8 +781,7 @@ char *argv[];
/* Ge ett randomv{rde inom ett intervall 0 <=x <= n */
-static uint rnd(max_value)
-uint max_value;
+static uint rnd( uint max_value)
{
return (uint) ((rand() & 32767)/32767.0*max_value);
} /* rnd */
@@ -794,9 +789,7 @@ uint max_value;
/* G|r en record av skiftande length */
-static void fix_length(rec,length)
-byte *rec;
-uint length;
+static void fix_length( byte *rec, uint length)
{
bmove(rec+STANDAR_LENGTH,
"0123456789012345678901234567890123456789012345678901234567890",
@@ -807,8 +800,7 @@ uint length;
/* Put maybe a blob in record */
-static void put_blob_in_record(blob_pos,blob_buffer)
-char *blob_pos,**blob_buffer;
+static void put_blob_in_record(char *blob_pos, char **blob_buffer)
{
ulong i,length;
if (use_blob)
@@ -836,10 +828,7 @@ char *blob_pos,**blob_buffer;
}
-static void copy_key(info,inx,rec,key_buff)
-N_INFO *info;
-uint inx;
-uchar *rec,*key_buff;
+static void copy_key( N_INFO *info, uint inx, uchar *rec, uchar *key_buff)
{
N_KEYSEG *keyseg;
diff --git a/isam/test_all.res b/isam/test_all.res
index 756a05f869c..f6280dd9f98 100644
--- a/isam/test_all.res
+++ b/isam/test_all.res
@@ -11,16 +11,16 @@ test2 -L -K -W -P
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
+Delete records: 907
Key cacheing used
Write cacheing used
Locking used
@@ -37,16 +37,16 @@ test2 -L -K -W -P -A
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
+Delete records: 907
Key cacheing used
Write cacheing used
Asyncron io with locking used
@@ -62,16 +62,16 @@ test2 -L -K -W -P -S -R1 -m500
- Test read key-part
- Read key (first) - next - delete - next -> last
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 484
-Update records: 48
-Same-key-read: 3
-Delete records: 484
+Write records: 475
+Update records: 44
+Same-key-read: 4
+Delete records: 475
Record pointer size: 1
Key cacheing used
Write cacheing used
@@ -79,8 +79,31 @@ Locking used
test2 -L -K -R1 -m2000 ; Should give error 135
- Creating isam-file
- Writing key:s
-Error: 135 in write at record: 1122
-got error: 135 when using NISAM-database
+- Delete
+- Update
+- Same key: first - next -> last - prev -> first
+- All keys: first - next -> last - prev -> first
+- Test if: Read first - next - prev - prev - next == first
+- Test if: Read last - prev - next - next - prev == last
+- Test read key-part
+- Read key (first) - next - delete - next -> last
+- Read last of key - prev - delete - prev -> first
+- Read first - delete - next -> last
+- Read last - delete - prev -> first
+- Test if: Read rrnd - same
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
+- Removing keys
+
+Following test have been made:
+Write records: 1647
+Update records: 125
+Same-key-read: 8
+Delete records: 1647
+Record pointer size: 1
+Key cacheing used
+Locking used
test2 -L -K -P -S -R3 -m50 -b1000000
- Creating isam-file
- Writing key:s
@@ -92,9 +115,9 @@ test2 -L -K -P -S -R3 -m50 -b1000000
- Test if: Read last - prev - next - next - prev == last
- Test read key-part
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
@@ -118,16 +141,16 @@ test2 -L -B
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 912
-Update records: 81
+Write records: 903
+Update records: 86
Same-key-read: 5
-Delete records: 912
+Delete records: 903
Locking used
blobs used
test2 -L -K -W -P -m50 -l
@@ -141,9 +164,9 @@ test2 -L -K -W -P -m50 -l
- Test if: Read last - prev - next - next - prev == last
- Test read key-part
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
@@ -155,13 +178,13 @@ Key cacheing used
Write cacheing used
Locking used
Commands Used count Errors Recover errors
-open 3 0 0
-write 150 0 0
-update 15 0 0
-delete 150 0 0
-close 3 0 0
-extra 18 0 0
-Total 339 0 0
+open 14 0 0
+write 700 0 0
+update 70 0 0
+delete 700 0 0
+close 14 0 0
+extra 84 0 0
+Total 1582 0 0
test2 -L -K -W -P -m50 -l -b100
- Creating isam-file
- Writing key:s
@@ -173,9 +196,9 @@ test2 -L -K -W -P -m50 -l -b100
- Test if: Read last - prev - next - next - prev == last
- Test read key-part
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
@@ -187,13 +210,13 @@ Key cacheing used
Write cacheing used
Locking used
Commands Used count Errors Recover errors
-open 4 0 0
-write 200 0 0
-update 20 0 0
-delete 200 0 0
-close 4 0 0
-extra 24 0 0
-Total 452 0 0
+open 15 0 0
+write 750 0 0
+update 75 0 0
+delete 750 0 0
+close 15 0 0
+extra 90 0 0
+Total 1695 0 0
time test2
- Creating isam-file
- Writing key:s
@@ -207,18 +230,16 @@ time test2
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
-4.77user 6.81system 0:15.07elapsed 76%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+0minor)pagefaults 0swaps
+Delete records: 907
time test2 -K
- Creating isam-file
- Writing key:s
@@ -232,19 +253,17 @@ time test2 -K
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
+Delete records: 907
Key cacheing used
-6.09user 4.33system 0:11.66elapsed 89%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+0minor)pagefaults 0swaps
time test2 -L
- Creating isam-file
- Writing key:s
@@ -258,19 +277,17 @@ time test2 -L
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
+Delete records: 907
Locking used
-5.01user 5.20system 0:10.86elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+0minor)pagefaults 0swaps
time test2 -L -K
- Creating isam-file
- Writing key:s
@@ -284,20 +301,18 @@ time test2 -L -K
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
+Delete records: 907
Key cacheing used
Locking used
-5.63user 0.97system 0:07.85elapsed 84%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+0minor)pagefaults 0swaps
time test2 -L -K -W
- Creating isam-file
- Writing key:s
@@ -311,21 +326,19 @@ time test2 -L -K -W
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
+Delete records: 907
Key cacheing used
Write cacheing used
Locking used
-5.28user 1.32system 0:08.86elapsed 74%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+0minor)pagefaults 0swaps
time test2 -L -K -W -S
- Creating isam-file
- Writing key:s
@@ -339,18 +352,16 @@ time test2 -L -K -W -S
- Read key (first) - next - delete - next -> last
- Read last of key - prev - delete - prev -> first
- Test if: Read rrnd - same
-- Test ni_records_in_range
-- ni_info
-- ni_extra(CACHE) + ni_rrnd.... + ni_extra(NO_CACHE)
+- Test nisam_records_in_range
+- nisam_info
+- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
- Removing keys
Following test have been made:
-Write records: 915
-Update records: 82
+Write records: 907
+Update records: 87
Same-key-read: 6
-Delete records: 915
+Delete records: 907
Key cacheing used
Write cacheing used
Locking used
-5.32user 0.62system 0:06.13elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+0minor)pagefaults 0swaps
diff --git a/libmysql/get_password.c b/libmysql/get_password.c
index d61c40a9559..989de9dd11a 100644
--- a/libmysql/get_password.c
+++ b/libmysql/get_password.c
@@ -35,7 +35,7 @@
#include <pwd.h>
#endif /* HAVE_PWD_H */
#else /* ! HAVE_GETPASS */
-#ifndef __WIN__
+#if !defined( __WIN__) && !defined(OS2)
#include <sys/ioctl.h>
#ifdef HAVE_TERMIOS_H /* For tty-password */
#include <termios.h>
@@ -62,9 +62,8 @@
#define getpass(A) getpassphrase(A)
#endif
-#ifdef __WIN__
-/* were just going to fake it here and get input from
- the keyboard */
+#if defined( __WIN__) || defined(OS2)
+/* were just going to fake it here and get input from the keyboard */
char *get_tty_password(char *opt_message)
{
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 4101fe18ea1..469331641c8 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -77,8 +77,7 @@ my_string mysql_unix_port=0;
#include <errno.h>
#define ERRNO errno
#define SOCKET_ERROR -1
-#define closesocket(A) close(A)
-#endif
+#endif /* __WIN__ */
static void mysql_once_init(void);
static MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields,
@@ -121,7 +120,7 @@ static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to,
static int connect2(my_socket s, const struct sockaddr *name, uint namelen,
uint timeout)
{
-#if defined(__WIN__)
+#if defined(__WIN__) || defined(OS2)
return connect(s, (struct sockaddr*) name, namelen);
#else
int flags, res, s_err;
@@ -490,7 +489,7 @@ struct passwd *getpwuid(uid_t);
char* getlogin(void);
#endif
-#if !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__)
+#if !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__) && !defined(OS2)
static void read_user_name(char *name)
{
DBUG_ENTER("read_user_name");
diff --git a/libmysql/net.c b/libmysql/net.c
index 11497cc7077..ba0944a2516 100644
--- a/libmysql/net.c
+++ b/libmysql/net.c
@@ -34,6 +34,7 @@
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
+#include <violite.h>
#ifdef MYSQL_SERVER
ulong max_allowed_packet=65536;
@@ -67,13 +68,19 @@ void sql_print_error(const char *format,...);
#define RETRY_COUNT mysqld_net_retry_count
extern ulong mysqld_net_retry_count;
#else
+
+#ifdef OS2 /* avoid name conflict */
+#define thr_alarm_t thr_alarm_t_net
+#define ALARM ALARM_net
+#endif
+
typedef my_bool thr_alarm_t;
typedef my_bool ALARM;
-#define thr_alarm_init(A) (*A)=0
+#define thr_alarm_init(A) (*(A))=0
#define thr_alarm_in_use(A) (*(A))
#define thr_end_alarm(A)
#define thr_alarm(A,B,C) local_thr_alarm((A),(B),(C))
-static inline int local_thr_alarm(my_bool *A,int B __attribute__((unused)),ALARM *C __attribute__((unused)))
+inline int local_thr_alarm(my_bool *A,int B __attribute__((unused)),ALARM *C __attribute__((unused)))
{
*A=1;
return 0;
@@ -123,7 +130,7 @@ int my_net_init(NET *net, Vio* vio)
if (vio != 0) /* If real connection */
{
net->fd = vio_fd(vio); /* For perl DBI/DBD */
-#if defined(MYSQL_SERVER) && !defined(___WIN__) && !defined(__EMX__)
+#if defined(MYSQL_SERVER) && !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
if (!(test_flags & TEST_BLOCKING))
vio_blocking(vio, FALSE);
#endif
@@ -270,7 +277,7 @@ net_real_write(NET *net,const char *packet,ulong len)
int length;
char *pos,*end;
thr_alarm_t alarmed;
-#if !defined(__WIN__) && !defined(__EMX__)
+#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
ALARM alarm_buff;
#endif
uint retry_count=0;
@@ -328,7 +335,7 @@ net_real_write(NET *net,const char *packet,ulong len)
if ((int) (length=vio_write(net->vio,pos,(int) (end-pos))) <= 0)
{
my_bool interrupted = vio_should_retry(net->vio);
-#if (!defined(__WIN__) && !defined(__EMX__))
+#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2))
if ((interrupted || length==0) && !thr_alarm_in_use(&alarmed))
{
if (!thr_alarm(&alarmed,(uint) net_write_timeout,&alarm_buff))
@@ -425,7 +432,7 @@ static void my_net_skip_rest(NET *net, ulong remain, thr_alarm_t *alarmed)
if ((int) (length=vio_read(net->vio,(char*) net->buff,remain)) <= 0L)
{
my_bool interrupted = vio_should_retry(net->vio);
- if (!thr_got_alarm(&alarmed) && interrupted)
+ if (!thr_got_alarm(alarmed) && interrupted)
{ /* Probably in MIT threads */
if (retry_count++ < RETRY_COUNT)
continue;
@@ -447,7 +454,7 @@ my_real_read(NET *net, ulong *complen)
uint i,retry_count=0;
ulong len=packet_error;
thr_alarm_t alarmed;
-#if (!defined(__WIN__) && !defined(__EMX__)) || defined(MYSQL_SERVER)
+#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER)
ALARM alarm_buff;
#endif
my_bool net_blocking=vio_is_blocking(net->vio);
@@ -474,7 +481,7 @@ my_real_read(NET *net, ulong *complen)
DBUG_PRINT("info",("vio_read returned %d, errno: %d",
length, vio_errno(net->vio)));
-#if (!defined(__WIN__) && !defined(__EMX__)) || defined(MYSQL_SERVER)
+#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER)
/*
We got an error that there was no data on the socket. We now set up
an alarm to not 'read forever', change the socket to non blocking
diff --git a/libmysql/violite.c b/libmysql/violite.c
index 25ab5db31d2..aff4224e5a3 100644
--- a/libmysql/violite.c
+++ b/libmysql/violite.c
@@ -35,11 +35,13 @@
#ifdef HAVE_POLL
#include <sys/poll.h>
#endif
-
-#if defined(__EMX__)
+#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
+#endif
+
+#if defined(__EMX__) || defined(OS2)
#define ioctlsocket ioctl
-#endif /* defined(__EMX__) */
+#endif /* defined(__EMX__) */
#if defined(MSDOS) || defined(__WIN__)
#ifdef __WIN__
@@ -103,9 +105,12 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
sprintf(vio->desc,
(vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"),
vio->sd);
-#if !defined(___WIN__) && !defined(__EMX__)
+#if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK)
vio->fcntl_mode = fcntl(sd, F_GETFL);
+#elif defined(HAVE_SYS_IOCTL_H) /* hpux */
+ /* Non blocking sockets doesn't work good on HPUX 11.0 */
+ (void) ioctl(sd,FIOSNBIO,0);
#endif
#else /* !defined(__WIN__) && !defined(__EMX__) */
{
@@ -149,7 +154,7 @@ void vio_delete(Vio * vio)
int vio_errno(Vio *vio __attribute__((unused)))
{
- return errno; /* On Win32 this mapped to WSAGetLastError() */
+ return socket_errno; /* On Win32 this mapped to WSAGetLastError() */
}
@@ -158,12 +163,17 @@ int vio_read(Vio * vio, gptr buf, int size)
int r;
DBUG_ENTER("vio_read");
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size));
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
if (vio->type == VIO_TYPE_NAMEDPIPE)
{
DWORD length;
+#ifdef OS2
+ if (!DosRead((HFILE)vio->hPipe, buf, size, &length))
+ DBUG_RETURN(-1);
+#else
if (!ReadFile(vio->hPipe, buf, size, &length, NULL))
DBUG_RETURN(-1);
+#endif
DBUG_RETURN(length);
}
r = recv(vio->sd, buf, size,0);
@@ -174,7 +184,7 @@ int vio_read(Vio * vio, gptr buf, int size)
#ifndef DBUG_OFF
if (r < 0)
{
- DBUG_PRINT("error", ("Got error %d during read",errno));
+ DBUG_PRINT("vio_error", ("Got error %d during read",socket_errno));
}
#endif /* DBUG_OFF */
DBUG_PRINT("exit", ("%d", r));
@@ -187,12 +197,17 @@ int vio_write(Vio * vio, const gptr buf, int size)
int r;
DBUG_ENTER("vio_write");
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size));
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
if ( vio->type == VIO_TYPE_NAMEDPIPE)
{
DWORD length;
+#ifdef OS2
+ if (!DosWrite((HFILE)vio->hPipe, (char*) buf, size, &length))
+ DBUG_RETURN(-1);
+#else
if (!WriteFile(vio->hPipe, (char*) buf, size, &length, NULL))
DBUG_RETURN(-1);
+#endif
DBUG_RETURN(length);
}
r = send(vio->sd, buf, size,0);
@@ -202,7 +217,7 @@ int vio_write(Vio * vio, const gptr buf, int size)
#ifndef DBUG_OFF
if (r < 0)
{
- DBUG_PRINT("error", ("Got error on write: %d",errno));
+ DBUG_PRINT("vio_error", ("Got error on write: %d",socket_errno));
}
#endif /* DBUG_OFF */
DBUG_PRINT("exit", ("%d", r));
@@ -216,7 +231,7 @@ int vio_blocking(Vio * vio, my_bool set_blocking_mode)
DBUG_ENTER("vio_blocking");
DBUG_PRINT("enter", ("set_blocking_mode: %d", (int) set_blocking_mode));
-#if !defined(___WIN__) && !defined(__EMX__)
+#if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK)
if (vio->sd >= 0)
@@ -341,7 +356,7 @@ int vio_close(Vio * vio)
}
if (r)
{
- DBUG_PRINT("error", ("close() failed, error: %d",errno));
+ DBUG_PRINT("vio_error", ("close() failed, error: %d",socket_errno));
/* FIXME: error handling (not critical for MySQL) */
}
vio->type= VIO_CLOSED;
@@ -380,7 +395,7 @@ my_bool vio_peer_addr(Vio * vio, char *buf)
if (getpeername(vio->sd, (struct sockaddr *) (& (vio->remote)),
&addrLen) != 0)
{
- DBUG_PRINT("exit", ("getpeername, error: %d", errno));
+ DBUG_PRINT("exit", ("getpeername, error: %d", socket_errno));
DBUG_RETURN(1);
}
my_inet_ntoa(vio->remote.sin_addr,buf);
diff --git a/merge/_locking.c b/merge/_locking.c
index f90b41e2375..81582da1312 100644
--- a/merge/_locking.c
+++ b/merge/_locking.c
@@ -20,9 +20,7 @@
#include "mrgdef.h"
-int mrg_lock_database(info,lock_type)
-MRG_INFO *info;
-int lock_type;
+int mrg_lock_database(MRG_INFO *info,int lock_type)
{
int error,new_error;
MRG_TABLE *file;
diff --git a/merge/close.c b/merge/close.c
index 45aa889ef0c..2b769ade8e9 100644
--- a/merge/close.c
+++ b/merge/close.c
@@ -18,8 +18,7 @@
#include "mrgdef.h"
-int mrg_close(info)
-register MRG_INFO *info;
+int mrg_close(register MRG_INFO *info)
{
int error=0,new_error;
MRG_TABLE *file;
diff --git a/merge/create.c b/merge/create.c
index e7086210237..fd2c16f9ea2 100644
--- a/merge/create.c
+++ b/merge/create.c
@@ -23,8 +23,7 @@
a NULL-pointer last
*/
-int mrg_create(name,table_names)
-const char *name,**table_names;
+int mrg_create(const char *name, const char**table_names)
{
int save_errno;
uint errpos;
diff --git a/merge/extra.c b/merge/extra.c
index 343806dbfad..c4f048a4385 100644
--- a/merge/extra.c
+++ b/merge/extra.c
@@ -22,9 +22,9 @@
#include "mrgdef.h"
-int mrg_extra(info,function)
-MRG_INFO *info;
-enum ha_extra_function function;
+int mrg_extra(
+MRG_INFO *info,
+enum ha_extra_function function)
{
MRG_TABLE *file;
diff --git a/merge/open.c b/merge/open.c
index 35005e6e718..c1be98b7e18 100644
--- a/merge/open.c
+++ b/merge/open.c
@@ -30,10 +30,10 @@
*/
-MRG_INFO *mrg_open(name,mode,handle_locking)
-const char *name;
-int mode;
-int handle_locking;
+MRG_INFO *mrg_open(
+const char *name,
+int mode,
+int handle_locking)
{
int save_errno,i,errpos;
uint files,dir_length,length;
diff --git a/merge/panic.c b/merge/panic.c
index c3820fe468d..cf333e3a9bf 100644
--- a/merge/panic.c
+++ b/merge/panic.c
@@ -24,8 +24,8 @@
done for all single user files to get changes in database */
-int mrg_panic(flag)
-enum ha_panic_function flag;
+int mrg_panic(
+enum ha_panic_function flag)
{
int error=0;
LIST *list_element,*next_open;
diff --git a/merge/rsame.c b/merge/rsame.c
index a18f1771c37..4ebf25b21c1 100644
--- a/merge/rsame.c
+++ b/merge/rsame.c
@@ -17,10 +17,10 @@
#include "mrgdef.h"
-int mrg_rsame(info,record,inx)
-MRG_INFO *info;
-byte *record;
-int inx; /* not used, should be 0 */
+int mrg_rsame(
+MRG_INFO *info,
+byte *record,
+int inx) /* not used, should be 0 */
{
if (inx)
{
diff --git a/merge/update.c b/merge/update.c
index 64900b82116..9fcb82089e4 100644
--- a/merge/update.c
+++ b/merge/update.c
@@ -18,9 +18,9 @@
#include "mrgdef.h"
-int mrg_update(info,oldrec,newrec)
-register MRG_INFO *info;
-const byte *oldrec,*newrec;
+int mrg_update(
+register MRG_INFO *info,
+const byte *oldrec, const byte *newrec)
{
if (!info->current_table)
{
diff --git a/myisam/ft_eval.c b/myisam/ft_eval.c
index a8e4d8e8881..845b56a7fed 100644
--- a/myisam/ft_eval.c
+++ b/myisam/ft_eval.c
@@ -19,6 +19,8 @@
#include <getopt.h>
static void print_error(int exit_code, const char *fmt,...);
+static void get_options(int argc, char *argv[]);
+static int create_record(char *pos, FILE *file);
int main(int argc,char *argv[])
{
@@ -123,7 +125,7 @@ void get_options(int argc,char *argv[])
{
FILE *f; char s[HA_FT_MAXLEN]; int i=0,n=SWL_INIT;
- if(!(stopwordlist=malloc(n*sizeof(char *))))
+ if(!(stopwordlist=(const char**) malloc(n*sizeof(char *))))
print_error(1,"malloc(%d)",n*sizeof(char *));
if(!(f=fopen(optarg,"r")))
print_error(1,"fopen(%s)",optarg);
diff --git a/myisam/ft_search.c b/myisam/ft_search.c
index 4ca1551e809..9a728a4c211 100644
--- a/myisam/ft_search.c
+++ b/myisam/ft_search.c
@@ -211,7 +211,7 @@ err:
int ft_read_next(FT_DOCLIST *handler, char *record)
{
- MI_INFO *info=handler->info;
+ MI_INFO *info= (MI_INFO *) handler->info;
if (++handler->curdoc >= handler->ndocs)
{
diff --git a/myisam/ft_test1.c b/myisam/ft_test1.c
index dfe8e30383b..e986f686302 100644
--- a/myisam/ft_test1.c
+++ b/myisam/ft_test1.c
@@ -32,6 +32,8 @@ static char record[MAX_REC_LENGTH],read_record[MAX_REC_LENGTH];
void get_options(int argc,char *argv[]);
static int run_test(const char *filename);
+static void get_options(int argc, char *argv[]);
+static void create_record(char *, int);
int main(int argc,char *argv[])
{
@@ -46,8 +48,6 @@ static MI_COLUMNDEF recinfo[3];
static MI_KEYDEF keyinfo[2];
static MI_KEYSEG keyseg[10];
-void create_record(char *, int);
-
static int run_test(const char *filename)
{
MI_INFO *file;
diff --git a/myisam/ftdefs.h b/myisam/ftdefs.h
index ebf99e84d5a..d9b4ff6b44d 100644
--- a/myisam/ftdefs.h
+++ b/myisam/ftdefs.h
@@ -45,7 +45,7 @@
#define LWS_TF (count)
#define LWS_BINARY (count>0)
#define LWS_SQUARE (count*count)
-#define LWS_LOG (count?(log(count)+1):0)
+#define LWS_LOG (count?(log( (double) count)+1):0)
/*--------------------------------------------------------------*/
#define PRENORM_NONE (p->weight)
#define PRENORM_MAX (p->weight/docstat.max)
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 64bc5d7b8e5..fd327b96e6d 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -458,7 +458,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
/* Check that there isn't a row with auto_increment = 0 in the table */
mi_extra(info,HA_EXTRA_KEYREAD);
bzero(info->lastkey,keyinfo->seg->length);
- if (!mi_rkey(info, info->rec_buff, key, info->lastkey,
+ if (!mi_rkey(info, info->rec_buff, key, (const byte*) info->lastkey,
keyinfo->seg->length, HA_READ_KEY_EXACT))
{
/* Don't count this as a real warning, as myisamchk can't correct it */
@@ -2075,7 +2075,7 @@ static int sort_key_read(SORT_INFO *sort_info, void *key)
"Found too many records; Can`t continue");
DBUG_RETURN(1);
}
- (void) _mi_make_key(info,sort_info->key,key,sort_info->record,
+ (void) _mi_make_key(info,sort_info->key,(uchar*)key,sort_info->record,
sort_info->filepos);
DBUG_RETURN(sort_write_record(sort_info));
} /* sort_key_read */
diff --git a/myisam/mi_test1.c b/myisam/mi_test1.c
index 59b9ceb266e..ae09bd4142e 100644
--- a/myisam/mi_test1.c
+++ b/myisam/mi_test1.c
@@ -18,8 +18,7 @@
#include "myisam.h"
#include <getopt.h>
-#include <m_ctype.h>
-
+#include <m_string.h>
#define MAX_REC_LENGTH 1024
diff --git a/myisam/mi_test2.c b/myisam/mi_test2.c
index 746042554c8..b66b02afdf9 100644
--- a/myisam/mi_test2.c
+++ b/myisam/mi_test2.c
@@ -59,11 +59,11 @@ static MI_KEYSEG glob_keyseg[MYISAM_KEYS][MAX_PARTS];
/* Test program */
-int main(int argc, char **argv)
+int main(int argc, char *argv[])
{
uint i;
int j,n1,n2,n3,error,k;
- uint write_count,update,dupp_keys,delete,start,length,blob_pos,
+ uint write_count,update,dupp_keys,opt_delete,start,length,blob_pos,
reclength,ant,found_parts;
my_off_t lastpos;
ha_rows range_records,records;
@@ -180,7 +180,7 @@ int main(int argc, char **argv)
recinfo[6].null_pos=0;
}
- write_count=update=dupp_keys=delete=0;
+ write_count=update=dupp_keys=opt_delete=0;
blob_buffer=0;
for (i=1000 ; i>0 ; i--) key1[i]=0;
@@ -280,14 +280,14 @@ int main(int argc, char **argv)
printf("can't find key1: \"%s\"\n",key);
goto err;
}
- if (delete == (uint) remove_count) /* While testing */
+ if (opt_delete == (uint) remove_count) /* While testing */
goto end;
if (mi_delete(file,read_record))
{
printf("error: %d; can't delete record: \"%s\"\n", my_errno,read_record);
goto err;
}
- delete++;
+ opt_delete++;
key1[atoi(read_record+keyinfo[0].seg[0].start)]--;
key3[atoi(read_record+keyinfo[2].seg[0].start)]=0;
}
@@ -418,10 +418,10 @@ int main(int argc, char **argv)
}
while ((error=mi_rnext(file,read_record3,0)) == 0 && ant < write_count+10)
ant++;
- if (ant != write_count - delete || error != HA_ERR_END_OF_FILE)
+ if (ant != write_count - opt_delete || error != HA_ERR_END_OF_FILE)
{
printf("next: I found: %d records of %d (error: %d)\n",
- ant, write_count - delete, error);
+ ant, write_count - opt_delete, error);
goto end;
}
if (mi_rlast(file,read_record2,0) ||
@@ -435,7 +435,7 @@ int main(int argc, char **argv)
ant=1;
while (mi_rprev(file,read_record3,0) == 0 && ant < write_count+10)
ant++;
- if (ant != write_count - delete)
+ if (ant != write_count - opt_delete)
{
printf("prev: I found: %d records of %d\n",ant,write_count);
goto end;
@@ -495,7 +495,7 @@ int main(int argc, char **argv)
if (mi_rkey(file,read_record,0,key,0,HA_READ_KEY_EXACT)) goto err;
if (mi_rnext(file,read_record3,0)) goto err;
if (mi_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=1;
while (mi_rnext(file,read_record3,0) == 0 &&
bcmp(read_record3+start,key,length) == 0) ant++;
@@ -513,7 +513,7 @@ int main(int argc, char **argv)
if (mi_rprev(file,read_record3,0)) goto err;
if (mi_rprev(file,read_record3,0)) goto err;
if (mi_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=1;
while (mi_rprev(file,read_record3,0) == 0 &&
bcmp(read_record3+start,key,length) == 0) ant++;
@@ -530,7 +530,7 @@ int main(int argc, char **argv)
DBUG_PRINT("progpos",("first - delete - next -> last"));
if (mi_rkey(file,read_record3,0,key,0,HA_READ_KEY_EXACT)) goto err;
if (mi_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=1;
if (mi_rnext(file,read_record,0))
goto err; /* Skall finnas poster */
@@ -547,7 +547,7 @@ int main(int argc, char **argv)
DBUG_PRINT("progpos",("last - delete - prev -> first"));
if (mi_rprev(file,read_record3,0)) goto err;
if (mi_delete(file,read_record3)) goto err;
- delete++;
+ opt_delete++;
ant=0;
while (mi_rprev(file,read_record3,0) == 0 &&
bcmp(read_record3+start,key,length) == 0) ant++;
@@ -641,7 +641,7 @@ int main(int argc, char **argv)
if (!silent)
printf("- mi_info\n");
mi_status(file,&info,HA_STATUS_VARIABLE | HA_STATUS_CONST);
- if (info.records != write_count-delete || info.deleted > delete + update
+ if (info.records != write_count-opt_delete || info.deleted > opt_delete + update
|| info.keys != keys)
{
puts("Wrong info from mi_info");
@@ -678,10 +678,10 @@ int main(int argc, char **argv)
while ((error=mi_rrnd(file,record,HA_OFFSET_ERROR)) != HA_ERR_END_OF_FILE &&
ant < write_count + 10)
ant+= error ? 0 : 1;
- if (ant != write_count-delete)
+ if (ant != write_count-opt_delete)
{
printf("rrnd with cache: I can only find: %d records of %d\n",
- ant,write_count-delete);
+ ant,write_count-opt_delete);
goto end;
}
if (mi_extra(file,HA_EXTRA_NO_CACHE))
@@ -695,10 +695,10 @@ int main(int argc, char **argv)
while ((error=mi_scan(file,record)) != HA_ERR_END_OF_FILE &&
ant < write_count + 10)
ant+= error ? 0 : 1;
- if (ant != write_count-delete)
+ if (ant != write_count-opt_delete)
{
printf("scan with cache: I can only find: %d records of %d\n",
- ant,write_count-delete);
+ ant,write_count-opt_delete);
goto end;
}
@@ -724,7 +724,7 @@ int main(int argc, char **argv)
lastpos=info.recpos;
if (error == 0)
{
- if (delete == (uint) remove_count) /* While testing */
+ if (opt_delete == (uint) remove_count) /* While testing */
goto end;
if (mi_rsame(file,read_record,-1))
{
@@ -751,19 +751,19 @@ int main(int argc, char **argv)
if (mi_delete(file,read_record))
{
printf("can't delete record: %6.6s, delete_count: %d\n",
- read_record, delete);
+ read_record, opt_delete);
goto err;
}
- delete++;
+ opt_delete++;
}
else
found_parts++;
}
if (my_errno != HA_ERR_END_OF_FILE && my_errno != HA_ERR_RECORD_DELETED)
printf("error: %d from mi_rrnd\n",my_errno);
- if (write_count != delete)
+ if (write_count != opt_delete)
{
- printf("Deleted only %d of %d records (%d parts)\n",delete,write_count,
+ printf("Deleted only %d of %d records (%d parts)\n",opt_delete,write_count,
found_parts);
goto err;
}
@@ -774,7 +774,7 @@ end:
if (!silent)
{
printf("\nFollowing test have been made:\n");
- printf("Write records: %d\nUpdate records: %d\nSame-key-read: %d\nDelete records: %d\n", write_count,update,dupp_keys,delete);
+ printf("Write records: %d\nUpdate records: %d\nSame-key-read: %d\nDelete records: %d\n", write_count,update,dupp_keys,opt_delete);
if (rec_pointer_size)
printf("Record pointer size: %d\n",rec_pointer_size);
if (key_cacheing)
diff --git a/myisam/mi_test_all.sh b/myisam/mi_test_all.sh
index dfa2e1d0fdd..ccc9c39c64e 100755
--- a/myisam/mi_test_all.sh
+++ b/myisam/mi_test_all.sh
@@ -1,5 +1,10 @@
+#!/bin/sh
+#
+# Execute some simple basic test on MyISAM libary to check if things
+# works at all.
+
silent="-s"
-suffix=$MACH
+if test -f mi_test1$MACH ; then suffix=$MACH else suffix=""; fi
mi_test1$suffix $silent
myisamchk$suffix -se test1
mi_test1$suffix $silent -N -S
diff --git a/myisam/myisamlog.c b/myisam/myisamlog.c
index ca2c4f27a74..a6094cfd489 100644
--- a/myisam/myisamlog.c
+++ b/myisam/myisamlog.c
@@ -21,7 +21,7 @@
#endif
#include "myisamdef.h"
-#include "my_tree.h"
+#include <my_tree.h>
#include <stdarg.h>
#ifdef HAVE_GETRUSAGE
#include <sys/resource.h>
@@ -251,12 +251,12 @@ static void get_options(register int *argc, register char ***argv)
/* Fall through */
case 'I':
case '?':
- printf("%s Ver 1.3 for %s at %s\n",my_progname,SYSTEM_TYPE,
+ printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
puts("By Monty, for your professional use\n");
if (version)
break;
- puts("Write info about whats in a myisam log file.");
+ puts("Write info about whats in a MyISAM log file.");
printf("If no file name is given %s is used\n",log_filename);
puts("");
printf(usage,my_progname);
@@ -266,7 +266,7 @@ static void get_options(register int *argc, register char ***argv)
puts(" -o \"offset\" -p # \"remove # components from path\"");
puts(" -r \"recover\" -R \"file recordposition\"");
puts(" -u \"update\" -v \"verbose\" -w \"write file\"");
- puts(" -D \"myisam compileled with DBUG\" -P \"processes\"");
+ puts(" -D \"myisam compiled with DBUG\" -P \"processes\"");
puts("\nOne can give a second and a third '-v' for more verbose.");
puts("Normaly one does a update (-u).");
puts("If a recover is done all writes and all possibly updates and deletes is done\nand errors are only counted.");
@@ -376,10 +376,8 @@ static int examine_log(my_string file_name, char **table_names)
}
if (curr_file_info)
- {
printf("\nWarning: %s is opened with same process and filenumber\nMaybe you should use the -P option ?\n",
curr_file_info->show_name);
- }
if (my_b_read(&cache,(byte*) head,2))
goto err;
file_info.name=0;
diff --git a/myisam/myisampack.c b/myisam/myisampack.c
index 0e4b6eafbde..557b4887b82 100644
--- a/myisam/myisampack.c
+++ b/myisam/myisampack.c
@@ -229,12 +229,12 @@ int main(int argc, char **argv)
#endif
}
-enum options {OPT_CHARSETS_DIR=256};
+enum options {OPT_CHARSETS_DIR_MP=256};
static struct option long_options[] =
{
{"backup", no_argument, 0, 'b'},
- {"character-sets-dir",required_argument,0, OPT_CHARSETS_DIR},
+ {"character-sets-dir",required_argument,0, OPT_CHARSETS_DIR_MP},
{"debug", optional_argument, 0, '#'},
{"force", no_argument, 0, 'f'},
{"join", required_argument, 0, 'j'},
@@ -334,7 +334,7 @@ static void get_options(int *argc,char ***argv)
case '#':
DBUG_PUSH(optarg ? optarg : "d:t:o");
break;
- case OPT_CHARSETS_DIR:
+ case OPT_CHARSETS_DIR_MP:
charsets_dir = optarg;
break;
case 'V': print_version(); exit(0);
@@ -1167,7 +1167,7 @@ static int make_huff_tree(HUFF_TREE *huff_tree, HUFF_COUNTS *huff_counts)
{
uint i,found,bits_packed,first,last;
my_off_t bytes_packed;
- HUFF_ELEMENT *a,*b,*new;
+ HUFF_ELEMENT *a,*b,*new_huff_el;
first=last=0;
if (huff_counts->tree_buff)
@@ -1247,23 +1247,23 @@ static int make_huff_tree(HUFF_TREE *huff_tree, HUFF_COUNTS *huff_counts)
{
if (huff_counts->counts[i])
{
- new=huff_tree->element_buffer+(found++);
- new->count=huff_counts->counts[i];
- new->a.leaf.null=0;
- new->a.leaf.element_nr=i;
- queue.root[found]=(byte*) new;
+ new_huff_el=huff_tree->element_buffer+(found++);
+ new_huff_el->count=huff_counts->counts[i];
+ new_huff_el->a.leaf.null=0;
+ new_huff_el->a.leaf.element_nr=i;
+ queue.root[found]=(byte*) new_huff_el;
}
}
while (found < 2)
{ /* Our huff_trees request at least 2 elements */
- new=huff_tree->element_buffer+(found++);
- new->count=0;
- new->a.leaf.null=0;
+ new_huff_el=huff_tree->element_buffer+(found++);
+ new_huff_el->count=0;
+ new_huff_el->a.leaf.null=0;
if (last)
- new->a.leaf.element_nr=huff_tree->min_chr=last-1;
+ new_huff_el->a.leaf.element_nr=huff_tree->min_chr=last-1;
else
- new->a.leaf.element_nr=huff_tree->max_chr=last+1;
- queue.root[found]=(byte*) new;
+ new_huff_el->a.leaf.element_nr=huff_tree->max_chr=last+1;
+ queue.root[found]=(byte*) new_huff_el;
}
}
queue.elements=found;
@@ -1275,13 +1275,13 @@ static int make_huff_tree(HUFF_TREE *huff_tree, HUFF_COUNTS *huff_counts)
{
a=(HUFF_ELEMENT*) queue_remove(&queue,0);
b=(HUFF_ELEMENT*) queue.root[1];
- new=huff_tree->element_buffer+found+i;
- new->count=a->count+b->count;
- bits_packed+=(uint) (new->count & 7);
- bytes_packed+=new->count/8;
- new->a.nod.left=a; /* lesser in left */
- new->a.nod.right=b;
- queue.root[1]=(byte*) new;
+ new_huff_el=huff_tree->element_buffer+found+i;
+ new_huff_el->count=a->count+b->count;
+ bits_packed+=(uint) (new_huff_el->count & 7);
+ bytes_packed+=new_huff_el->count/8;
+ new_huff_el->a.nod.left=a; /* lesser in left */
+ new_huff_el->a.nod.right=b;
+ queue.root[1]=(byte*) new_huff_el;
queue_replaced(&queue);
}
huff_tree->root=(HUFF_ELEMENT*) queue.root[1];
@@ -1303,14 +1303,14 @@ static int compare_tree(register const uchar *s, register const uchar *t)
static int save_counts_in_queue(byte *key, element_count count,
HUFF_TREE *tree)
{
- HUFF_ELEMENT *new;
+ HUFF_ELEMENT *new_huff_el;
- new=tree->element_buffer+(tree->elements++);
- new->count=count;
- new->a.leaf.null=0;
- new->a.leaf.element_nr= (uint) (key- tree->counts->tree_buff) /
+ new_huff_el=tree->element_buffer+(tree->elements++);
+ new_huff_el->count=count;
+ new_huff_el->a.leaf.null=0;
+ new_huff_el->a.leaf.element_nr= (uint) (key- tree->counts->tree_buff) /
tree->counts->field_length;
- queue.root[tree->elements]=(byte*) new;
+ queue.root[tree->elements]=(byte*) new_huff_el;
return 0;
}
@@ -1352,14 +1352,14 @@ static my_off_t calc_packed_length(HUFF_COUNTS *huff_counts,
_downheap(&queue,i);
for (i=0 ; i < found-1 ; i++)
{
- HUFF_ELEMENT *a,*b,*new;
+ HUFF_ELEMENT *a,*b,*new_huff_el;
a=(HUFF_ELEMENT*) queue_remove(&queue,0);
b=(HUFF_ELEMENT*) queue.root[1];
- new=element_buffer+i;
- new->count=a->count+b->count;
- bits_packed+=(uint) (new->count & 7);
- bytes_packed+=new->count/8;
- queue.root[1]=(byte*) new;
+ new_huff_el=element_buffer+i;
+ new_huff_el->count=a->count+b->count;
+ bits_packed+=(uint) (new_huff_el->count & 7);
+ bytes_packed+=new_huff_el->count/8;
+ queue.root[1]=(byte*) new_huff_el;
queue_replaced(&queue);
}
DBUG_RETURN(bytes_packed+(bits_packed+7)/8);
diff --git a/myisam/sort.c b/myisam/sort.c
index e6c7d61e39a..39874d05640 100644
--- a/myisam/sort.c
+++ b/myisam/sort.c
@@ -28,6 +28,9 @@
#include <queues.h>
/* static variabels */
+#undef MIN_SORT_MEMORY
+#undef MYF_RW
+#undef DISK_BUFFER_SIZE
#define MERGEBUFF 15
#define MERGEBUFF2 31
@@ -36,10 +39,10 @@
#define DISK_BUFFER_SIZE (IO_SIZE*16)
typedef struct st_buffpek {
- my_off_t file_pos; /* position to buffer */
- ha_rows count; /* keys in buffer */
- uchar *base,*key; /* Pekare inom sort_key - indexdel */
- uint mem_count; /* keys left in memory */
+ my_off_t file_pos; /* Where we are in the sort file */
+ ha_rows count; /* Number of rows in table */
+ uchar *base,*key; /* Key pointers */
+ uint mem_count; /* numbers of keys in memory */
uint max_keys; /* Max keys in buffert */
} BUFFPEK;
@@ -361,7 +364,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
sort_length));
if (error == -1)
goto err; /* purecov: inspected */
- queue_insert(&queue,(void*) buffpek);
+ queue_insert(&queue,(char*) buffpek);
}
while (queue.elements > 1)
diff --git a/myisammrg/myrg_delete.c b/myisammrg/myrg_delete.c
index a470b4876cf..9ac32655172 100644
--- a/myisammrg/myrg_delete.c
+++ b/myisammrg/myrg_delete.c
@@ -18,9 +18,9 @@
#include "mymrgdef.h"
-int myrg_delete(info,record)
-MYRG_INFO *info;
-const byte *record;
+int myrg_delete(
+MYRG_INFO *info,
+const byte *record)
{
if (!info->current_table)
{
diff --git a/myisammrg/myrg_locking.c b/myisammrg/myrg_locking.c
index fc03df9bf63..c89acca3918 100644
--- a/myisammrg/myrg_locking.c
+++ b/myisammrg/myrg_locking.c
@@ -20,9 +20,9 @@
#include "mymrgdef.h"
-int myrg_lock_database(info,lock_type)
-MYRG_INFO *info;
-int lock_type;
+int myrg_lock_database(
+MYRG_INFO *info,
+int lock_type)
{
int error,new_error;
MYRG_TABLE *file;
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c
index f73339f63c8..f70d33feb2b 100644
--- a/myisammrg/myrg_open.c
+++ b/myisammrg/myrg_open.c
@@ -30,10 +30,10 @@
*/
-MYRG_INFO *myrg_open(name,mode,handle_locking)
-const char *name;
-int mode;
-int handle_locking;
+MYRG_INFO *myrg_open(
+const char *name,
+int mode,
+int handle_locking)
{
int save_errno,i,errpos;
uint files,dir_length,length;
diff --git a/myisammrg/myrg_panic.c b/myisammrg/myrg_panic.c
index 8b6169c896b..99a1f6828d1 100644
--- a/myisammrg/myrg_panic.c
+++ b/myisammrg/myrg_panic.c
@@ -24,8 +24,7 @@
done for all single user files to get changes in database */
-int myrg_panic(flag)
-enum ha_panic_function flag;
+int myrg_panic(enum ha_panic_function flag)
{
int error=0;
LIST *list_element,*next_open;
diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test
index e55ed4ca17b..43ea6fd19ad 100644
--- a/mysql-test/t/backup.test
+++ b/mysql-test/t/backup.test
@@ -4,7 +4,7 @@ connection con1;
set SQL_LOG_BIN=0;
drop table if exists t1;
create table t1(n int);
---replace_result "errno = 2" "errno = X" "errno = 22" "errno = X"
+--replace_result "errno = 2" "errno = X" "errno = 22" "errno = X" "errno = 23" "errno = X"
backup table t1 to '../bogus';
backup table t1 to '../tmp';
drop table t1;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 476d8dcdf0d..0f07d577c0c 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -9,7 +9,7 @@ optimize table t1;
check table t1,t2;
repair table t1,t2;
check table t2,t1;
-lock tables t1 read;
+lock tables t1 write;
check table t2,t1;
show columns from t1;
show full columns from t1;
diff --git a/mysys/charset.c b/mysys/charset.c
index c17c6113b57..f778afb4144 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -393,16 +393,16 @@ CHARSET_INFO *get_charset(uint cs_number, myf flags)
my_bool set_default_charset(uint cs, myf flags)
{
- CHARSET_INFO *new;
+ CHARSET_INFO *new_charset;
DBUG_ENTER("set_default_charset");
DBUG_PRINT("enter",("character set: %d",(int) cs));
- new = get_charset(cs, flags);
- if (!new)
+ new_charset = get_charset(cs, flags);
+ if (!new_charset)
{
DBUG_PRINT("error",("Couldn't set default character set"));
DBUG_RETURN(TRUE); /* error */
}
- default_charset_info = new;
+ default_charset_info = new_charset;
DBUG_RETURN(FALSE);
}
@@ -424,17 +424,17 @@ CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags)
my_bool set_default_charset_by_name(const char *cs_name, myf flags)
{
- CHARSET_INFO *new;
+ CHARSET_INFO *new_charset;
DBUG_ENTER("set_default_charset_by_name");
DBUG_PRINT("enter",("character set: %s", cs_name));
- new = get_charset_by_name(cs_name, flags);
- if (!new)
+ new_charset = get_charset_by_name(cs_name, flags);
+ if (!new_charset)
{
DBUG_PRINT("error",("Couldn't set default character set"));
DBUG_RETURN(TRUE); /* error */
}
- default_charset_info = new;
+ default_charset_info = new_charset;
DBUG_RETURN(FALSE);
}
diff --git a/mysys/default.c b/mysys/default.c
index 126c0270a17..e2e80f36a68 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -146,7 +146,7 @@ void load_defaults(const char *conf_file, const char **groups,
&group))
goto err;
#endif
-#ifdef __EMX__
+#if defined(__EMX__) || defined(OS2)
if (getenv("ETC") &&
search_default_file(&args, &alloc, getenv("ETC"), conf_file,
default_ext, &group))
@@ -363,7 +363,7 @@ void print_defaults(const char *conf_file, const char **groups)
GetWindowsDirectory(name,sizeof(name));
printf("%s\\%s%s ",name,conf_file,have_ext ? "" : windows_ext);
#endif
-#ifdef __EMX__
+#if defined(__EMX__) || defined(OS2)
if (getenv("ETC"))
printf("%s\\%s%s ", getenv("ETC"), conf_file, default_ext);
#endif
diff --git a/mysys/getopt.c b/mysys/getopt.c
index a2a3b5bbec9..774cf3b82f4 100644
--- a/mysys/getopt.c
+++ b/mysys/getopt.c
@@ -38,7 +38,7 @@ Cambridge, MA 02139, USA. */
#include <config.h>
#endif
-#if (!defined (__STDC__) || !__STDC__) && !defined(MSDOS)
+#if (!defined (__STDC__) || !__STDC__) && !defined(MSDOS) && !defined(OS2)
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
#ifndef const
@@ -176,7 +176,9 @@ static char *posixly_correct;
/* Avoid depending on library functions or files
whose names are inconsistent. */
+#ifndef OS2
char *getenv (const char *);
+#endif
static char *
my_index (const char *str, int chr)
diff --git a/mysys/getopt1.c b/mysys/getopt1.c
index 6068a036e7b..bff76d6e5b2 100644
--- a/mysys/getopt1.c
+++ b/mysys/getopt1.c
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */
#include <global.h>
#include "getopt.h"
-#if (!defined (__STDC__) || !__STDC__) && !defined(MSDOS)
+#if (!defined (__STDC__) || !__STDC__) && !defined(MSDOS) && !defined(OS2)
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
#ifndef const
diff --git a/mysys/list.c b/mysys/list.c
index 0a6d900d6b9..c9c863d4cc2 100644
--- a/mysys/list.c
+++ b/mysys/list.c
@@ -72,11 +72,11 @@ void list_free(LIST *root, pbool free_data)
LIST *list_cons(void *data, LIST *list)
{
- LIST *new=(LIST*) my_malloc(sizeof(LIST),MYF(MY_FAE));
- if (!new)
+ LIST *new_charset=(LIST*) my_malloc(sizeof(LIST),MYF(MY_FAE));
+ if (!new_charset)
return 0;
- new->data=data;
- return list_add(list,new);
+ new_charset->data=data;
+ return list_add(list,new_charset);
}
diff --git a/mysys/mf_dirname.c b/mysys/mf_dirname.c
index f4b9e011215..399082a238b 100644
--- a/mysys/mf_dirname.c
+++ b/mysys/mf_dirname.c
@@ -24,7 +24,7 @@ uint dirname_length(const char *name)
{
register my_string pos,gpos;
#ifdef FN_DEVCHAR
- if ((pos=strrchr(name,FN_DEVCHAR)) == 0)
+ if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0)
#endif
pos=(char*) name-1;
diff --git a/mysys/mf_format.c b/mysys/mf_format.c
index c4425806e01..7dac46cf0d0 100644
--- a/mysys/mf_format.c
+++ b/mysys/mf_format.c
@@ -65,7 +65,7 @@ my_string fn_format(my_string to, const char *name, const char *dsk,
pack_dirname(dev,dev); /* Put in ./.. and ~/.. */
if (flag & 4)
(void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */
- if ((pos=strchr(name,FN_EXTCHAR)) != NullS)
+ if ((pos=(char*)strchr(name,FN_EXTCHAR)) != NullS)
{
if ((flag & 2) == 0) /* Skall vi byta extension ? */
{
diff --git a/mysys/mf_path.c b/mysys/mf_path.c
index 3158c45470c..9a88b938e2c 100644
--- a/mysys/mf_path.c
+++ b/mysys/mf_path.c
@@ -74,7 +74,7 @@ my_string my_path(my_string to, const char *progname,
/* test if file without filename is found in path */
/* Returns to if found and to has dirpart if found, else NullS */
-#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
+#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
#define F_OK 0
#define PATH_SEP ';'
#define PROGRAM_EXTENSION ".exe"
diff --git a/mysys/mf_qsort.c b/mysys/mf_qsort.c
index 7074abac96e..032a1a28a72 100644
--- a/mysys/mf_qsort.c
+++ b/mysys/mf_qsort.c
@@ -52,7 +52,7 @@
#define MAX_THRESH 8
/* Stack node declarations used to store unfulfilled partition obligations. */
-typedef struct
+typedef struct _qsort_stack_node
{
char *lo;
char *hi;
@@ -109,7 +109,7 @@ qsort_t qsort(void *base_ptr, size_t total_elems, size_t size, qsort_cmp cmp)
if (total_elems > MAX_THRESH)
{
- char *lo = base_ptr;
+ char *lo = (char*) base_ptr;
char *hi = &lo[size * (total_elems - 1)];
stack_node stack[STACK_SIZE]; /* Largest size needed for 32-bit int!!! */
stack_node *top = stack + 1;
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index b2c0e89b9e4..2cdd720edbd 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -25,7 +25,7 @@
#endif
#ifdef HAVE_TEMPNAM
-#ifndef MSDOS
+#if !defined( MSDOS) && !defined(OS2)
extern char **environ;
#endif
#endif
@@ -122,12 +122,19 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
to[1]= 0;
dir=to;
}
- old_env=environ;
+#ifdef OS2
+ // changing environ variable doesn't work with VACPP
+ char buffer[256];
+ sprintf( buffer, "TMP=%s", dir);
+ putenv( buffer);
+#else
+ old_env= (char**) environ;
if (dir)
{ /* Don't use TMPDIR if dir is given */
- environ=temp_env;
+ environ=(const char**) temp_env;
temp_env[0]=0;
}
+#endif
if ((res=tempnam((char*) dir, (char*) prefix)))
{
strmake(to,res,FN_REFLEN-1);
@@ -142,7 +149,9 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
{
DBUG_PRINT("error",("Got error: %d from tempnam",errno));
}
- environ=old_env;
+#ifndef OS2
+ environ=(const char**) old_env;
+#endif
}
#else
{
diff --git a/mysys/my_clock.c b/mysys/my_clock.c
index d13d69a7b88..e7d1758fa2e 100644
--- a/mysys/my_clock.c
+++ b/mysys/my_clock.c
@@ -18,14 +18,14 @@
#define USES_TYPES
#include "global.h"
-#if !defined(_MSC_VER) && !defined(__BORLANDC__)
+#if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(OS2)
#include "mysys_priv.h"
#include <sys/times.h>
#endif
long my_clock(void)
{
-#if !defined(MSDOS) && !defined(__WIN__)
+#if !defined(MSDOS) && !defined(__WIN__) && !defined(OS2)
struct tms tmsbuf;
VOID(times(&tmsbuf));
return (tmsbuf.tms_utime + tmsbuf.tms_stime);
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index be131873118..9b02d84d063 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -81,7 +81,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if (MyFlags & MY_HOLD_ORIGINAL_MODES && new_file_stat)
DBUG_RETURN(0); /* File copyed but not stat */
VOID(chmod(to, stat_buff.st_mode & 07777)); /* Copy modes */
-#if !defined(MSDOS) && !defined(__WIN__) && !defined(__EMX__)
+#if !defined(MSDOS) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
VOID(chown(to, stat_buff.st_uid,stat_buff.st_gid)); /* Copy ownership */
#endif
#if !defined(VMS) && !defined(__ZTC__)
diff --git a/mysys/my_create.c b/mysys/my_create.c
index ee5d9aa41f3..5a10b0fd8b5 100644
--- a/mysys/my_create.c
+++ b/mysys/my_create.c
@@ -20,7 +20,7 @@
#include <my_dir.h>
#include "mysys_err.h"
#include <errno.h>
-#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
+#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
#include <share.h>
#endif
@@ -48,7 +48,7 @@ File my_create(const char *FileName, int CreateFlags, int access_flags,
#elif defined(VMS)
fd = open((my_string) FileName, access_flags | O_CREAT, 0,
"ctx=stm","ctx=bin");
-#elif defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
+#elif defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
if (access_flags & O_SHARE)
fd = sopen((my_string) FileName, access_flags | O_CREAT | O_BINARY,
SH_DENYNO, MY_S_IREAD | MY_S_IWRITE);
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index b49737b2a61..6bdea813fe4 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -28,6 +28,9 @@
#include <dos.h>
#include <direct.h>
#endif
+#if defined(OS2)
+#include <direct.h>
+#endif
#ifdef __EMX__
// chdir2 support also drive change
@@ -93,16 +96,16 @@ int my_setwd(const char *dir, myf MyFlags)
int res;
size_s length;
my_string start,pos;
-#if defined(VMS) || defined(MSDOS)
+#if defined(VMS) || defined(MSDOS) || defined(OS2)
char buff[FN_REFLEN];
#endif
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %d", dir, MyFlags));
start=(my_string) dir;
-#if defined(MSDOS) /* MSDOS chdir can't change drive */
+#if defined(MSDOS) || defined(OS2) /* OS2/MSDOS chdir can't change drive */
#if !defined(_DDL) && !defined(WIN32)
- if ((pos=strchr(dir,FN_DEVCHAR)) != 0)
+ if ((pos=(char*) strchr(dir,FN_DEVCHAR)) != 0)
{
uint drive,drives;
@@ -110,8 +113,13 @@ int my_setwd(const char *dir, myf MyFlags)
drive=(uint) (toupper(dir[0])-'A'+1); drives= (uint) -1;
if ((pos-(byte*) dir) == 2 && drive > 0 && drive < 32)
{
+#ifdef OS2
+ _chdrive(drive);
+ drives = _getdrive();
+#else
_dos_setdrive(drive,&drives);
_dos_getdrive(&drives);
+#endif
}
if (drive != drives)
{
diff --git a/mysys/my_init.c b/mysys/my_init.c
index b5005b82478..c3b9cecf86e 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -74,7 +74,7 @@ void my_init(void)
pthread_init(); /* Must be called before DBUG_ENTER */
#endif
my_thread_global_init();
-#ifndef __WIN__
+#if !defined( __WIN__) && !defined(OS2)
sigfillset(&my_signals); /* signals blocked by mf_brkhant */
#endif
#endif /* THREAD */
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 0f4a5261fba..f9774d8a4aa 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -27,7 +27,9 @@
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
+#ifndef OS2
# define dirent direct
+#endif
# define NAMLEN(dirent) (dirent)->d_namlen
# if defined(HAVE_SYS_NDIR_H)
# include <sys/ndir.h>
@@ -50,6 +52,11 @@
#include <iodef.h>
#include <descrip.h>
#endif
+
+#ifdef OS2
+#include "my_os2dirsrch.h"
+#endif
+
#if defined(THREAD) && defined(HAVE_READDIR_R)
#define READDIR(A,B,C) ((errno=readdir_r(A,B,&C)) != 0 || !C)
#else
@@ -337,9 +344,7 @@ my_string directory_file_name (my_string dst, const char *src)
*****************************************************************************
*/
-MY_DIR *my_dir(path, MyFlags)
-const char *path;
-myf MyFlags;
+MY_DIR *my_dir(const char *path, myf MyFlags)
{
struct fileinfo *fnames;
char *buffer, *obuffer, *tempptr;
@@ -475,9 +480,7 @@ error:
** At MSDOS you always get stat of files, but time is in packed MSDOS-format
******************************************************************************/
-MY_DIR *my_dir(path, MyFlags)
-const char *path;
-myf MyFlags;
+MY_DIR *my_dir(const char* path, myf MyFlags)
{
struct fileinfo *fnames;
char *buffer, *obuffer, *tempptr;
diff --git a/mysys/my_lock.c b/mysys/my_lock.c
index a3508018837..c002f447f59 100644
--- a/mysys/my_lock.c
+++ b/mysys/my_lock.c
@@ -38,12 +38,6 @@
int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
myf MyFlags)
{
-#ifdef __EMX__
- FILELOCK LockArea = {0,0}, UnlockArea = {0,0};
- APIRET rc = 0;
- fpos_t oldpos;
- int lockflags = 0;
-#endif
#ifdef HAVE_FCNTL
int value;
ALARM_VARIABLES;
@@ -56,54 +50,12 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
#else
if (my_disable_locking)
DBUG_RETURN(0);
-#if defined(__EMX__)
- if (locktype == F_UNLCK) {
- UnlockArea.lOffset = start;
- if (length)
- UnlockArea.lRange = length;
- else
- UnlockArea.lRange = 0x7FFFFFFFL;
- } else
- if (locktype == F_RDLCK || locktype == F_WRLCK) {
- if (locktype == F_RDLCK) lockflags |= 1;
- LockArea.lOffset = start;
- if (length)
- LockArea.lRange = length;
- else
- LockArea.lRange = 0x7FFFFFFFL;
- } else {
- my_errno = EINVAL;
- DBUG_RETURN(-1);
- }
- if (!LockArea.lRange && !UnlockArea.lRange)
+
+#if defined(__EMX__) || defined(OS2)
+
+ if (!_lock64( fd, locktype, start, length, MyFlags))
DBUG_RETURN(0);
- if (MyFlags & MY_DONT_WAIT) {
- if (!(rc = DosSetFileLocks(fd,&UnlockArea,&LockArea,0,lockflags)))
- DBUG_RETURN(0); /* Lock was OK */
- if (rc == 175 && locktype == F_RDLCK) {
- lockflags &= ~1;
- rc = DosSetFileLocks(fd,&UnlockArea,&LockArea,0,lockflags);
- }
- if (rc == 33) { /* Lock Violation */
- DBUG_PRINT("info",("Was locked, trying with timeout"));
- rc = DosSetFileLocks(fd,&UnlockArea,&LockArea,MY_HOW_OFTEN_TO_ALARM * 1000,lockflags);
- }
- if (!rc) DBUG_RETURN(0);
- if (rc == 33) errno = EAGAIN;
- else {
- errno = EINVAL;
- printf("Error: DosSetFileLocks() == %d\n",rc);
- }
- } else {
- while (rc = DosSetFileLocks(fd,&UnlockArea,&LockArea,
- MY_HOW_OFTEN_TO_ALARM * 1000,lockflags) && (rc == 33 || rc == 175)) {
- printf(".");
- if (rc == 175) lockflags &= ~1;
- }
- if (!rc) DBUG_RETURN(0);
- errno = EINVAL;
- printf("Error: DosSetFileLocks() == %d\n",rc);
- }
+
#elif defined(HAVE_LOCKING)
/* Windows */
{
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c
index 6cae6fe3a4d..c2df22ec7ec 100644
--- a/mysys/my_malloc.c
+++ b/mysys/my_malloc.c
@@ -33,7 +33,7 @@ gptr my_malloc(unsigned int Size, myf MyFlags)
if (!Size)
Size=1; /* Safety */
- if ((point = malloc(Size)) == NULL)
+ if ((point = (char*)malloc(Size)) == NULL)
{
my_errno=errno;
if (MyFlags & MY_FAE)
diff --git a/mysys/my_mkdir.c b/mysys/my_mkdir.c
index 773cd26cb03..3685312132c 100644
--- a/mysys/my_mkdir.c
+++ b/mysys/my_mkdir.c
@@ -28,8 +28,8 @@ int my_mkdir(const char *dir, int Flags, myf MyFlags)
DBUG_ENTER("my_dir");
DBUG_PRINT("enter",("dir: %s",dir));
-#ifdef __WIN__
- if (mkdir(dir))
+#if defined(__WIN__) || defined(OS2)
+ if (mkdir((char*) dir))
#else
if (mkdir((char*) dir, Flags & my_umask_dir))
#endif
diff --git a/mysys/my_open.c b/mysys/my_open.c
index fcf1be575c8..2ed1af1eca1 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -20,7 +20,7 @@
#include "mysys_err.h"
#include <my_dir.h>
#include <errno.h>
-#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
+#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
#include <share.h>
#endif
@@ -35,7 +35,7 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
DBUG_ENTER("my_open");
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d",
FileName, Flags, MyFlags));
-#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
+#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
if (Flags & O_SHARE)
fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY, SH_DENYNO,
MY_S_IREAD | MY_S_IWRITE);
diff --git a/mysys/my_os2cond.c b/mysys/my_os2cond.c
new file mode 100644
index 00000000000..c436ad9a0e9
--- /dev/null
+++ b/mysys/my_os2cond.c
@@ -0,0 +1,188 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+/*****************************************************************************
+** The following is a simple implementation of posix conditions
+*****************************************************************************/
+
+#undef SAFE_MUTEX /* Avoid safe_mutex redefinitions */
+#include "mysys_priv.h"
+#if defined(THREAD) && defined(OS2)
+#include <m_string.h>
+//#undef getpid
+#include <process.h>
+#include <sys/timeb.h>
+
+int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
+{
+ APIRET rc = 0;
+ HEV event;
+ cond->waiting=0;
+ /* Warp3 FP29 or Warp4 FP4 or better required */
+ rc = DosCreateEventSem( NULL, &cond->semaphore, 0x0800, 0);
+ if (rc)
+ return ENOMEM;
+
+ return 0;
+}
+
+int pthread_cond_destroy(pthread_cond_t *cond)
+{
+ APIRET rc;
+
+ do {
+ rc = DosCloseEventSem(cond->semaphore);
+ if (rc == 301) DosPostEventSem(cond->semaphore);
+ } while (rc == 301);
+ if (rc)
+ return EINVAL;
+
+ return 0;
+}
+
+
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
+{
+ APIRET rc;
+ int rval;
+
+ rval = 0;
+ cond->waiting++;
+
+ if (mutex) pthread_mutex_unlock(mutex);
+
+ rc = DosWaitEventSem(cond->semaphore,SEM_INDEFINITE_WAIT);
+ if (rc != 0)
+ rval = EINVAL;
+
+ if (mutex) pthread_mutex_lock(mutex);
+
+ cond->waiting--;
+
+ return rval;
+}
+
+int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
+ struct timespec *abstime)
+{
+ struct timeb curtime;
+ int result;
+ long timeout;
+ APIRET rc;
+ int rval;
+
+ _ftime(&curtime);
+ timeout= ((long) (abstime->ts_sec - curtime.time)*1000L +
+ (long)((abstime->ts_nsec/1000) - curtime.millitm)/1000L);
+ if (timeout < 0) /* Some safety */
+ timeout = 0L;
+
+ rval = 0;
+ cond->waiting++;
+
+ if (mutex) pthread_mutex_unlock(mutex);
+
+ rc = DosWaitEventSem(cond->semaphore, timeout);
+ if (rc != 0)
+ rval = ETIME;
+
+ if (mutex) pthread_mutex_lock(mutex);
+
+ cond->waiting--;
+
+ return rval;
+}
+
+
+int pthread_cond_signal(pthread_cond_t *cond)
+{
+ APIRET rc;
+
+ /* Bring the next thread off the condition queue: */
+ rc = DosPostEventSem(cond->semaphore);
+ return 0;
+}
+
+
+int pthread_cond_broadcast(pthread_cond_t *cond)
+{
+ int i;
+ APIRET rc;
+
+ /*
+ * Enter a loop to bring all threads off the
+ * condition queue:
+ */
+ i = cond->waiting;
+ while (i--) rc = DosPostEventSem(cond->semaphore);
+
+ return 0 ;
+}
+
+
+int pthread_attr_init(pthread_attr_t *connect_att)
+{
+ connect_att->dwStackSize = 0;
+ connect_att->dwCreatingFlag = 0;
+ connect_att->priority = 0;
+ return 0;
+}
+
+int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack)
+{
+ connect_att->dwStackSize=stack;
+ return 0;
+}
+
+int pthread_attr_setprio(pthread_attr_t *connect_att,int priority)
+{
+ connect_att->priority=priority;
+ return 0;
+}
+
+int pthread_attr_destroy(pthread_attr_t *connect_att)
+{
+ bzero((gptr) connect_att,sizeof(*connect_att));
+ return 0;
+}
+
+/****************************************************************************
+** Fix localtime_r() to be a bit safer
+****************************************************************************/
+
+struct tm *localtime_r(const time_t *timep,struct tm *tmp)
+{
+ if (*timep == (time_t) -1) /* This will crash win32 */
+ {
+ bzero(tmp,sizeof(*tmp));
+ }
+ else
+ {
+ struct tm *res=localtime(timep);
+ if (!res) /* Wrong date */
+ {
+ bzero(tmp,sizeof(*tmp)); /* Keep things safe */
+ return 0;
+ }
+ *tmp= *res;
+ }
+ return tmp;
+}
+#endif /* __WIN__ */
diff --git a/mysys/my_os2dirsrch.c b/mysys/my_os2dirsrch.c
new file mode 100644
index 00000000000..36f56d3ed2e
--- /dev/null
+++ b/mysys/my_os2dirsrch.c
@@ -0,0 +1,182 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+/* Win32 directory search emulation */
+
+#if defined(OS2)
+
+//#define _DEBUG
+
+long _findfirst( char* path, struct _finddata_t* dos_file)
+{
+ HDIR hdir = HDIR_CREATE;
+ APIRET rc;
+ FILEFINDBUF3 buf3;
+ ULONG entries = 1;
+
+#ifdef _DEBUG
+ printf( "_findfirst path %s\n", path);
+#endif
+
+ memset( &buf3, 0, sizeof( buf3));
+ rc = DosFindFirst(
+ path, /* Address of the ASCIIZ path name of the file or subdirectory to be found. */
+ &hdir, /* Address of the handle associated with this DosFindFirst request. */
+ FILE_NORMAL | FILE_DIRECTORY, /* Attribute value that determines the file objects to be searched for. */
+ &buf3, /* Result buffer. */
+ sizeof( buf3), /* The length, in bytes, of pfindbuf. */
+ &entries, /* Pointer to the number of entries: */
+ FIL_STANDARD); /* The level of file information required. */
+
+#ifdef _DEBUG
+ printf( "_findfirst rc=%d hdir=%d entries=%d->%s\n", rc, hdir, entries, buf3.achName);
+#endif
+
+ if (rc /* && entries == 0 */)
+ return -1;
+
+ if (dos_file) {
+ memset( dos_file, 0, sizeof( struct _finddata_t));
+ strcpy( dos_file->name, buf3.achName);
+ dos_file->size = buf3.cbFile;
+ dos_file->attrib = buf3.attrFile;
+ }
+ return (ULONG) hdir;
+}
+
+
+long _findnext( long hdir, struct _finddata_t* dos_file)
+{
+ APIRET rc;
+ FILEFINDBUF3 buf3;
+ ULONG entries = 1;
+
+ memset( &buf3, 0, sizeof( buf3));
+ rc = DosFindNext(
+ hdir,
+ &buf3, /* Result buffer. */
+ sizeof( buf3), /* The length, in bytes, of pfindbuf. */
+ &entries); /* Pointer to the number of entries: */
+
+#ifdef _DEBUG
+ printf( "_findnext rc=%d hdir=%d entries=%d->%s\n", rc, hdir, entries, buf3.achName);
+#endif
+
+ if (rc /* && entries == 0 */)
+ return -1;
+
+ if (dos_file) {
+ memset( dos_file, 0, sizeof( struct _finddata_t));
+ strcpy( dos_file->name, buf3.achName);
+ dos_file->size = buf3.cbFile;
+ dos_file->attrib = buf3.attrFile;
+ }
+ return 0;
+}
+
+void _findclose( long hdir)
+{
+ APIRET rc;
+
+ rc = DosFindClose( hdir);
+#ifdef _DEBUG
+ printf( "_findclose rc=%d hdir=%d\n", rc, hdir);
+#endif
+}
+
+DIR* opendir( char* path)
+{
+ DIR* dir = (DIR*) calloc( 1, sizeof( DIR));
+ char buffer[260];
+ APIRET rc;
+ ULONG entries = 1;
+
+ strcpy( buffer, path);
+ strcat( buffer, "*.*");
+
+#ifdef _DEBUG
+ printf( "_findfirst path %s\n", buffer);
+#endif
+
+ dir->hdir = HDIR_CREATE;
+ memset( &dir->buf3, 0, sizeof( dir->buf3));
+ rc = DosFindFirst(
+ buffer, /* Address of the ASCIIZ path name of the file or subdirectory to be found. */
+ &dir->hdir, /* Address of the handle associated with this DosFindFirst request. */
+ FILE_NORMAL | FILE_DIRECTORY, /* Attribute value that determines the file objects to be searched for. */
+ &dir->buf3, /* Result buffer. */
+ sizeof( dir->buf3), /* The length, in bytes, of pfindbuf. */
+ &entries, /* Pointer to the number of entries: */
+ FIL_STANDARD); /* The level of file information required. */
+
+#ifdef _DEBUG
+ printf( "opendir rc=%d hdir=%d entries=%d->%s\n", rc, dir->hdir, entries, dir->buf3.achName);
+#endif
+
+ if (rc /* && entries == 0 */)
+ return NULL;
+
+ return dir;
+}
+
+struct dirent* readdir( DIR* dir)
+{
+ APIRET rc;
+ //FILEFINDBUF3 buf3;
+ ULONG entries = 1;
+
+ if (!dir->buf3.achName[0]) // file not found on previous query
+ return NULL;
+
+ // copy last file name
+ strcpy( dir->ent.d_name, dir->buf3.achName);
+
+ // query next file
+ memset( &dir->buf3, 0, sizeof( dir->buf3));
+ rc = DosFindNext(
+ dir->hdir,
+ &dir->buf3, /* Result buffer. */
+ sizeof( dir->buf3), /* The length, in bytes, of pfindbuf. */
+ &entries); /* Pointer to the number of entries: */
+
+#ifdef _DEBUG
+ printf( "_findnext rc=%d hdir=%d entries=%d->%s\n", rc, dir->hdir, entries, dir->buf3.achName);
+#endif
+
+ if (rc /* && entries == 0 */)
+ strcpy( dir->buf3.achName, ""); // reset name for next query
+
+ return &dir->ent;
+}
+
+int closedir (DIR *dir)
+{
+ APIRET rc;
+
+ rc = DosFindClose( dir->hdir);
+#ifdef _DEBUG
+ printf( "_findclose rc=%d hdir=%d\n", rc, dir->hdir);
+#endif
+ free(dir);
+ return 0;
+}
+
+
+#endif // OS2
diff --git a/mysys/my_os2dirsrch.h b/mysys/my_os2dirsrch.h
new file mode 100644
index 00000000000..2afe0f609f1
--- /dev/null
+++ b/mysys/my_os2dirsrch.h
@@ -0,0 +1,77 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+/* Win32 directory search emulation */
+
+#ifndef __MY_OS2DIRSRCH2_H__
+#define __MY_OS2DIRSRCH2_H__
+
+#ifdef __cplusplus_00
+extern "C" {
+#endif
+
+struct _finddata_t
+{
+ unsigned attrib;
+ //unsigned long time_create; /* -1 for FAT file systems */
+ //unsigned long time_access; /* -1 for FAT file systems */
+ //unsigned long time_write;
+ unsigned long size;
+ char name[260];
+ //uint16 wr_date;
+ //uint16 wr_time;
+};
+
+struct dirent
+{
+ //unsigned attrib;
+ //unsigned long time_create; /* -1 for FAT file systems */
+ //unsigned long time_access; /* -1 for FAT file systems */
+ //unsigned long time_write;
+ //unsigned long size;
+ char d_name[260];
+ //uint16 wr_date;
+ //uint16 wr_time;
+};
+
+struct DIR
+{
+ HDIR hdir;
+ FILEFINDBUF3 buf3;
+ struct dirent ent;
+};
+
+DIR *opendir ( char *);
+struct dirent *readdir (DIR *);
+int closedir (DIR *);
+
+//#define _A_NORMAL FILE_NORMAL
+//#define _A_SUBDIR FILE_DIRECTORY
+//#define _A_RDONLY FILE_READONLY
+
+//long _findfirst( char*, struct _finddata_t*);
+//long _findnext( long, struct _finddata_t*);
+//void _findclose( long);
+
+#ifdef __cplusplus_00
+}
+#endif
+
+#endif // __MY_OS2DIRSRCH2_H__
diff --git a/mysys/my_os2dlfcn.c b/mysys/my_os2dlfcn.c
new file mode 100644
index 00000000000..0b0b5518eff
--- /dev/null
+++ b/mysys/my_os2dlfcn.c
@@ -0,0 +1,74 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+/*
+ * dlfcn::Unix dynamic loading for OS/2
+ *
+ * Compatibility layer for dynamic loading.
+ * Only minimal implementation
+ *
+*/
+
+#define RTLD_LAZY 0
+#define RTLD_NOW 0
+
+void* dlopen( char* path, int flag);
+char* dlerror( void);
+void* dlsym( void* hmod, char* fn);
+void dlclose( void* hmod);
+
+char fail[ 256];
+
+void* dlopen( char* path, int flag)
+{
+ APIRET rc;
+ HMODULE hmod;
+
+ rc = DosLoadModule( fail, sizeof( fail), path, &hmod);
+ if (rc)
+ return NULL;
+
+ return (void*) hmod;
+}
+
+char* dlerror( void)
+{
+ return fail;
+}
+
+void* dlsym( void* hmod, char* fn)
+{
+ APIRET rc;
+ PFN addr;
+
+ rc = DosQueryProcAddr( (HMODULE) hmod, 0l, fn, &addr);
+ if (rc)
+ return NULL;
+
+ return (void*) addr;
+}
+
+void dlclose( void* hmod)
+{
+ APIRET rc;
+
+ rc = DosFreeModule( (HMODULE) hmod);
+
+}
diff --git a/mysys/my_os2dlfcn.h0 b/mysys/my_os2dlfcn.h0
new file mode 100644
index 00000000000..7f84d430230
--- /dev/null
+++ b/mysys/my_os2dlfcn.h0
@@ -0,0 +1,39 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+/*
+ * dlfcn::Unix dynamic loading for OS/2
+ *
+ * Compatibility layer for dynamic loading.
+ * Only minimal implementation
+ *
+*/
+
+#ifndef __DLFCN_H__
+#define __DLFCN_H__
+
+#define RTLD_LAZY 0
+#define RTLD_NOW 0
+
+void* dlopen( char* path, int flag);
+char* dlerror( void);
+void* dlsym( void* hmod, char* fn);
+void dlclose( void* hmod);
+
+#endif
diff --git a/mysys/my_os2file64.c b/mysys/my_os2file64.c
new file mode 100644
index 00000000000..8964e562ea1
--- /dev/null
+++ b/mysys/my_os2file64.c
@@ -0,0 +1,341 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+void _OS2errno( APIRET rc);
+longlong _lseek64( int fd, longlong offset, int seektype);
+int _lock64( int fd, int locktype, my_off_t start,
+ my_off_t length, myf MyFlags);
+int _sopen64( const char *name, int oflag, int shflag, int mask);
+
+//
+// this class is used to define a global c++ variable, that
+// is initialized before main() gets called.
+//
+class File64bit
+{
+ public:
+ File64bit(); /* default constructor */
+} initFile64bit;
+
+static APIRET (* APIENTRY _DosOpenL)(PCSZ pszFileName,
+ PHFILE phf,
+ PULONG pulAction,
+ LONGLONG cbFile,
+ ULONG ulAttribute,
+ ULONG fsOpenFlags,
+ ULONG fsOpenMode,
+ PEAOP2 peaop2);
+static APIRET (* APIENTRY _DosSetFilePtrL)(HFILE hFile,
+ LONGLONG ib,
+ ULONG method,
+ PLONGLONG ibActual);
+static APIRET (* APIENTRY _DosSetFileLocksL)(HFILE hFile,
+ PFILELOCKL pflUnlock,
+ PFILELOCKL pflLock,
+ ULONG timeout,
+ ULONG flags);
+
+#define EIO EINVAL
+#define ESPIPE EBADSEEK
+
+
+static unsigned char const errno_tab[] =
+{
+ 0 , EINVAL, ENOENT, ENOENT, EMFILE, /* 0..4 */
+ EACCES, EBADF, EIO, ENOMEM, EIO, /* 5..9 */
+ EINVAL, ENOEXEC,EINVAL, EINVAL, EINVAL, /* 10..14 */
+ ENOENT, EBUSY, EXDEV, ENOENT, EROFS, /* 15..19 */
+ EIO, EIO, EIO, EIO, EIO, /* 20..24 */
+ EIO, EIO, EIO, ENOSPC, EIO, /* 25..29 */
+ EIO, EIO, EACCES, EACCES, EIO, /* 30..34 */
+ EIO, EIO, EIO, EIO, ENOSPC, /* 35..39 */
+ EIO, EIO, EIO, EIO, EIO, /* 40..44 */
+ EIO, EIO, EIO, EIO, EIO, /* 45..49 */
+ EIO, EIO, EIO, EIO, EBUSY, /* 50..54 */
+ EIO, EIO, EIO, EIO, EIO, /* 55..59 */
+ EIO, ENOSPC, ENOSPC, EIO, EIO, /* 60..64 */
+ EACCES, EIO, EIO, EIO, EIO, /* 65..69 */
+ EIO, EIO, EIO, EROFS, EIO, /* 70..74 */
+ EIO, EIO, EIO, EIO, EIO, /* 75..79 */
+ EEXIST, EIO, ENOENT, EIO, EIO, /* 80..84 */
+ EIO, EIO, EINVAL, EIO, EAGAIN, /* 85..89 */
+ EIO, EIO, EIO, EIO, EIO, /* 90..94 */
+ EINTR, EIO, EIO, EIO, EACCES, /* 95..99 */
+ ENOMEM, EINVAL, EINVAL, ENOMEM, EINVAL, /* 100..104 */
+ EINVAL, ENOMEM, EIO, EACCES, EPIPE, /* 105..109 */
+ ENOENT, E2BIG, ENOSPC, ENOMEM, EBADF, /* 110..114 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 115..119 */
+ EINVAL, EINVAL, EINVAL, ENOENT, EINVAL, /* 120..124 */
+ ENOENT, ENOENT, ENOENT, ECHILD, ECHILD, /* 125..129 */
+ EACCES, EINVAL, ESPIPE, EINVAL, EINVAL, /* 130..134 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 135..139 */
+ EINVAL, EINVAL, EBUSY, EINVAL, EINVAL, /* 140..144 */
+ EINVAL, EINVAL, EINVAL, EBUSY, EINVAL, /* 145..149 */
+ EINVAL, EINVAL, ENOMEM, EINVAL, EINVAL, /* 150..154 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 155..159 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EAGAIN, /* 160..164 */
+ EINVAL, EINVAL, EACCES, EINVAL, EINVAL, /* 165..169 */
+ EBUSY, EINVAL, EINVAL, EINVAL, EINVAL, /* 170..174 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 175..179 */
+ EINVAL, EINVAL, EINVAL, EINVAL, ECHILD, /* 180..184 */
+ EINVAL, EINVAL, ENOENT, EINVAL, EINVAL, /* 185..189 */
+ ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC, /* 190..194 */
+ ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC, /* 195..199 */
+ ENOEXEC,ENOEXEC,ENOEXEC,ENOENT, EINVAL, /* 200..204 */
+ EINVAL, ENAMETOOLONG, EINVAL, EINVAL, EINVAL, /* 205..209 */
+ EINVAL, EINVAL, EACCES, ENOEXEC,ENOEXEC, /* 210..214 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 215..219 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 220..224 */
+ EINVAL, EINVAL, EINVAL, ECHILD, EINVAL, /* 225..229 */
+ EINVAL, EBUSY, EAGAIN, ENOTCONN, EINVAL, /* 230..234 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 235..239 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 240..244 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 245..249 */
+ EACCES, EACCES, EINVAL, ENOENT, EINVAL, /* 250..254 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 255..259 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 260..264 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 265..269 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 270..274 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 275..279 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EEXIST, /* 280..284 */
+ EEXIST, EINVAL, EINVAL, EINVAL, EINVAL, /* 285..289 */
+ ENOMEM, EMFILE, EINVAL, EINVAL, EINVAL, /* 290..294 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 295..299 */
+ EINVAL, EBUSY, EINVAL, ESRCH, EINVAL, /* 300..304 */
+ ESRCH, EINVAL, EINVAL, EINVAL, ESRCH, /* 305..309 */
+ EINVAL, ENOMEM, EINVAL, EINVAL, EINVAL, /* 310..314 */
+ EINVAL, E2BIG, ENOENT, EIO, EIO, /* 315..319 */
+ EINVAL, EINVAL, EINVAL, EINVAL, EAGAIN, /* 320..324 */
+ EINVAL, EINVAL, EINVAL, EIO, ENOENT, /* 325..329 */
+ EACCES, EACCES, EACCES, ENOENT, ENOMEM /* 330..334 */
+};
+
+/*
+ * Initialize 64bit file access: dynamic load of WSeB API
+*/
+ File64bit :: File64bit()
+{
+ HMODULE hDoscalls;
+
+ if (DosQueryModuleHandle("DOSCALLS", &hDoscalls) != NO_ERROR)
+ return;
+
+ if (DosQueryProcAddr(hDoscalls, 981, NULL, (PFN *)&_DosOpenL) != NO_ERROR)
+ return;
+
+ if (DosQueryProcAddr(hDoscalls, 988, NULL, (PFN *)&_DosSetFilePtrL) != NO_ERROR) {
+ _DosOpenL = NULL;
+ return;
+ }
+
+ if (DosQueryProcAddr(hDoscalls, 986, NULL, (PFN *)&_DosSetFileLocksL) != NO_ERROR) {
+ _DosOpenL = NULL;
+ _DosSetFilePtrL = NULL;
+ return;
+ }
+ // notify success
+#ifdef MYSQL_SERVER
+ printf( "WSeB 64bit file API loaded.\n");
+#endif
+}
+
+void _OS2errno( APIRET rc)
+{
+ if (rc >= sizeof (errno_tab))
+ errno = EINVAL;
+ else
+ errno = errno_tab[rc];
+}
+
+longlong _lseek64( int fd, longlong offset, int seektype)
+{
+ APIRET rc;
+ longlong actual;
+
+ if (_DosSetFilePtrL)
+ rc = _DosSetFilePtrL( fd, offset, seektype, &actual);
+ else {
+ ULONG ulActual;
+ rc = DosSetFilePtr( fd, (long) offset, seektype, &ulActual);
+ actual = ulActual;
+ }
+
+ if (!rc)
+ return( actual);/* NO_ERROR */
+
+ // set errno
+ _OS2errno( rc);
+ // seek failed
+ return(-1);
+}
+
+inline _SetFileLocksL(HFILE hFile,
+ PFILELOCKL pflUnlock,
+ PFILELOCKL pflLock,
+ ULONG timeout,
+ ULONG flags)
+{
+ if (_DosSetFileLocksL)
+ return _DosSetFileLocksL( hFile, pflUnlock, pflLock, timeout, flags);
+
+ FILELOCK flUnlock = { pflUnlock->lOffset, pflUnlock->lRange };
+ FILELOCK flLock = { pflLock->lOffset, pflLock->lRange };
+ return DosSetFileLocks( hFile, &flUnlock, &flLock, timeout, flags);
+}
+
+int _lock64( int fd, int locktype, my_off_t start,
+ my_off_t length, myf MyFlags)
+{
+ FILELOCKL LockArea = {0,0}, UnlockArea = {0,0};
+ ULONG readonly = 0;
+ APIRET rc = -1;
+
+ switch( locktype) {
+ case F_UNLCK:
+ UnlockArea.lOffset = start;
+ UnlockArea.lRange = length ? length : LONGLONG_MAX;
+ break;
+
+ case F_RDLCK:
+ case F_WRLCK:
+ LockArea.lOffset = start;
+ LockArea.lRange = length ? length : LONGLONG_MAX;
+ readonly = (locktype == F_RDLCK ? 1 : 0);
+ break;
+
+ default:
+ errno = EINVAL;
+ rc = -1;
+ break;
+ }
+
+ if (MyFlags & MY_DONT_WAIT) {
+
+ rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 0, readonly);
+ //printf( "fd %d, locktype %d, rc %d (dont_wait)\n", fd, locktype, rc);
+ if (rc == 33) { /* Lock Violation */
+
+ DBUG_PRINT("info",("Was locked, trying with timeout"));
+ rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 1 * 1000, readonly);
+ //printf( "fd %d, locktype %d, rc %d (dont_wait with timeout)\n", fd, locktype, rc);
+ }
+
+ } else {
+
+ while( rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 0, readonly) && (rc == 33)) {
+ printf(".");
+ DosSleep(1 * 1000);
+ }
+ //printf( "fd %d, locktype %d, rc %d (wait2)\n", fd, locktype, rc);
+ }
+
+ if (!rc)
+ return( 0);/* NO_ERROR */
+
+ // set errno
+ _OS2errno( rc);
+ // lock failed
+ return(-1);
+}
+
+int _sopen64( const char *name, int oflag, int shflag, int mask)
+{
+ int fail_errno;
+ APIRET rc = 0;
+ HFILE hf = 0;
+ ULONG ulAction = 0;
+ LONGLONG cbFile = 0;
+ ULONG ulAttribute = FILE_NORMAL;
+ ULONG fsOpenFlags = 0;
+ ULONG fsOpenMode = 0;
+
+ /* Extract the access mode and sharing mode bits. */
+ fsOpenMode = (shflag & 0xFF) | (oflag & 0x03);
+
+ /* Translate ERROR_OPEN_FAILED to ENOENT unless O_EXCL is set (see
+ below). */
+ fail_errno = ENOENT;
+
+ /* Compute `open_flag' depending on `flags'. Note that _SO_CREAT is
+ set for O_CREAT. */
+
+ if (oflag & O_CREAT)
+ {
+ if (oflag & O_EXCL)
+ {
+ fsOpenFlags = OPEN_ACTION_FAIL_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
+ fail_errno = EEXIST;
+ }
+ else if (oflag & O_TRUNC)
+ fsOpenFlags = OPEN_ACTION_REPLACE_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
+ else
+ fsOpenFlags = OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
+
+ if (mask & S_IWRITE)
+ ulAttribute = FILE_NORMAL;
+ else
+ ulAttribute = FILE_READONLY;
+
+ }
+ else if (oflag & O_TRUNC)
+ fsOpenFlags = OPEN_ACTION_REPLACE_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW;
+ else
+ fsOpenFlags = OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW;
+
+ /* Try to open the file and handle errors. */
+ if (_DosOpenL)
+ rc = _DosOpenL( name, &hf, &ulAction, cbFile,
+ ulAttribute, fsOpenFlags, fsOpenMode, NULL);
+ else
+ rc = DosOpen( name, &hf, &ulAction, (LONG) cbFile,
+ ulAttribute, fsOpenFlags, fsOpenMode, NULL);
+
+ if (rc == ERROR_OPEN_FAILED)
+ {
+ errno = fail_errno;
+ return -1;
+ }
+ if (rc != 0)
+ {
+ // set errno
+ _OS2errno( rc);
+ return -1;
+ }
+
+ if (oflag & O_APPEND)
+ _lseek64( hf, 0L, SEEK_END);
+
+ return hf;
+}
+
+inline int open( const char *name, int oflag)
+{
+ return _sopen64( name, oflag, OPEN_SHARE_DENYNONE, S_IREAD | S_IWRITE);
+}
+
+inline int open( const char *name, int oflag, int mask)
+{
+ return _sopen64( name, oflag, OPEN_SHARE_DENYNONE, mask);
+}
+
+inline int sopen( const char *name, int oflag, int shflag, int mask)
+{
+ return _sopen64( name, oflag, shflag, mask);
+}
diff --git a/mysys/my_os2mutex.c b/mysys/my_os2mutex.c
new file mode 100644
index 00000000000..0ae6ae86d8c
--- /dev/null
+++ b/mysys/my_os2mutex.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
+ * All rights reserved.
+ *
+ * Modified and extended by Antony T Curtis <antony.curtis@olcs.net>
+ * for use with OS/2.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by John Birrell.
+ * 4. Neither the name of the author nor the names of any co-contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#include <stdlib.h>
+#include <errno.h>
+#ifdef _THREAD_SAFE
+//#include <pthread.h>
+//#include "pthread_private.h"
+
+int
+pthread_mutex_init(pthread_mutex_t * mutex,
+ const pthread_mutexattr_t * mutex_attr)
+{
+ APIRET rc = 0;
+
+ rc = DosCreateMutexSem(NULL,mutex,0,0);
+
+ /* Return the completion status: */
+ return (0);
+}
+
+int
+pthread_mutex_destroy(pthread_mutex_t * mutex)
+{
+ APIRET rc = 0;
+
+
+ do {
+ rc = DosCloseMutexSem(*mutex);
+ if (rc == 301) DosReleaseMutexSem(*mutex);
+ } while (rc == 301);
+
+ *mutex = 0;
+
+ /* Return the completion status: */
+ return (0);
+}
+
+
+int
+pthread_mutex_lock(pthread_mutex_t * mutex)
+{
+ int ret = 0;
+ int status = 0;
+ APIRET rc = 0;
+
+ rc = DosRequestMutexSem(*mutex,SEM_INDEFINITE_WAIT);
+ if (rc)
+ return(EINVAL);
+ /* Return the completion status: */
+ return (0);
+}
+
+int
+pthread_mutex_unlock(pthread_mutex_t * mutex)
+{
+ int ret = 0;
+ APIRET rc = 0;
+ int status;
+
+ rc = DosReleaseMutexSem(*mutex);
+
+ /* Return the completion status: */
+ return (0);
+}
+#endif
diff --git a/mysys/my_os2thread.c b/mysys/my_os2thread.c
new file mode 100644
index 00000000000..017ba7f316b
--- /dev/null
+++ b/mysys/my_os2thread.c
@@ -0,0 +1,126 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+/*****************************************************************************
+** Simulation of posix threads calls for OS/2
+*****************************************************************************/
+
+#include "mysys_priv.h"
+#if defined(THREAD) && defined(OS2)
+#include <m_string.h>
+#include <process.h>
+
+static pthread_mutex_t THR_LOCK_thread;
+
+struct pthread_map
+{
+ HANDLE pthreadself;
+ pthread_handler func;
+ void * param;
+};
+
+void win_pthread_init(void)
+{
+ pthread_mutex_init(&THR_LOCK_thread,NULL);
+}
+
+/*
+** We have tried to use '_beginthreadex' instead of '_beginthread' here
+** but in this case the program leaks about 512 characters for each
+** created thread !
+** As we want to save the created thread handler for other threads to
+** use and to be returned by pthread_self() (instead of the Win32 pseudo
+** handler), we have to go trough pthread_start() to catch the returned handler
+** in the new thread.
+*/
+
+static pthread_handler_decl(pthread_start,param)
+{
+ pthread_handler func=((struct pthread_map *) param)->func;
+ void *func_param=((struct pthread_map *) param)->param;
+ my_thread_init(); /* Will always succeed in windows */
+ pthread_mutex_lock(&THR_LOCK_thread); /* Wait for beginthread to return */
+ win_pthread_self=((struct pthread_map *) param)->pthreadself;
+ pthread_mutex_unlock(&THR_LOCK_thread);
+ free((char*) param); /* Free param from create */
+ pthread_exit((void*) (*func)(func_param));
+ return 0; /* Safety */
+}
+
+
+int pthread_create(pthread_t *thread_id, pthread_attr_t *attr,
+ pthread_handler func, void *param)
+{
+ HANDLE hThread;
+ struct pthread_map *map;
+ DBUG_ENTER("pthread_create");
+
+ if (!(map=(struct pthread_map *)malloc(sizeof(*map))))
+ DBUG_RETURN(-1);
+ map->func=func;
+ map->param=param;
+ pthread_mutex_lock(&THR_LOCK_thread);
+#ifdef __BORLANDC__
+ hThread=(HANDLE)_beginthread((void(_USERENTRY *)(void *)) pthread_start,
+ attr->dwStackSize ? attr->dwStackSize :
+ 65535, (void*) map);
+#elif defined( OS2)
+ hThread=(HANDLE)_beginthread((void( _Optlink *)(void *)) pthread_start, NULL,
+ attr->dwStackSize ? attr->dwStackSize :
+ 65535, (void*) map);
+#else
+ hThread=(HANDLE)_beginthread((void( __cdecl *)(void *)) pthread_start,
+ attr->dwStackSize ? attr->dwStackSize :
+ 65535, (void*) map);
+#endif
+ DBUG_PRINT("info", ("hThread=%lu",(long) hThread));
+ *thread_id=map->pthreadself=hThread;
+ pthread_mutex_unlock(&THR_LOCK_thread);
+
+ if (hThread == (HANDLE) -1)
+ {
+ int error=errno;
+ DBUG_PRINT("error",
+ ("Can't create thread to handle request (error %d)",error));
+ DBUG_RETURN(error ? error : -1);
+ }
+#ifdef OS2
+ my_pthread_setprio(hThread, attr->priority);
+#else
+ VOID(SetThreadPriority(hThread, attr->priority)) ;
+#endif
+ DBUG_RETURN(0);
+}
+
+
+void pthread_exit(void *a)
+{
+ _endthread();
+}
+
+/* This is neaded to get the macro pthread_setspecific to work */
+
+int win_pthread_setspecific(void *a,void *b,uint length)
+{
+ memcpy(a,b,length);
+ return 0;
+}
+
+#endif
diff --git a/mysys/my_os2tls.c b/mysys/my_os2tls.c
new file mode 100644
index 00000000000..25d543d0768
--- /dev/null
+++ b/mysys/my_os2tls.c
@@ -0,0 +1,144 @@
+/* Copyright (C) Yuri Dario & 2000 MySQL AB
+ All the above parties has a full, independent copyright to
+ the following code, including the right to use the code in
+ any manner without any demands from the other parties.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA */
+
+DWORD TlsAlloc( void);
+BOOL TlsFree( DWORD);
+PVOID TlsGetValue( DWORD);
+BOOL TlsSetValue( DWORD, PVOID);
+
+#define TLS_MINIMUM_AVAILABLE 64
+
+
+PULONG tls_storage; /* TLS local storage */
+DWORD tls_bits[2]; /* TLS in-use bits */
+pthread_mutex_t tls_mutex; /* TLS mutex for in-use bits */
+
+DWORD TlsAlloc( void)
+{
+ DWORD index = -1;
+ DWORD mask, tibidx;
+ int i;
+
+ if (tls_storage == NULL) {
+
+ APIRET rc;
+
+ // allocate memory for TLS storage
+ rc = DosAllocThreadLocalMemory( 1, &tls_storage);
+ if (rc) {
+ fprintf( stderr, "DosAllocThreadLocalMemory error: return code = %u\n", rc);
+ }
+
+ // create a mutex
+ if (pthread_mutex_init( &tls_mutex, NULL))
+ fprintf( stderr, "Failed to init TLS mutex\n");
+ }
+
+ pthread_mutex_lock( &tls_mutex);
+
+ tibidx = 0;
+ if (tls_bits[0] == 0xFFFFFFFF) {
+ if (tls_bits[1] == 0xFFFFFFFF) {
+ fprintf( stderr, "tid#%d, no more TLS bits available\n", _threadid);
+ pthread_mutex_unlock( &tls_mutex);
+ return -1;
+ }
+ tibidx = 1;
+ }
+ for( i=0; i<32; i++) {
+ mask = (1 << i);
+ if ((tls_bits[ tibidx] & mask) == 0) {
+ tls_bits[ tibidx] |= mask;
+ index = (tibidx*32) + i;
+ break;
+ }
+ }
+ tls_storage[index] = 0;
+
+ pthread_mutex_unlock( &tls_mutex);
+
+ //fprintf( stderr, "tid#%d, TlsAlloc index %d\n", _threadid, index);
+
+ return index;
+}
+
+BOOL TlsFree( DWORD index)
+{
+ int tlsidx;
+ DWORD mask;
+
+ if (index >= TLS_MINIMUM_AVAILABLE)
+ return NULL;
+
+ pthread_mutex_lock( &tls_mutex);
+
+ tlsidx = 0;
+ if (index > 32) {
+ tlsidx++;
+ }
+ mask = (1 << index);
+ if (tls_bits[ tlsidx] & mask) {
+ tls_bits[tlsidx] &= ~mask;
+ tls_storage[index] = 0;
+ pthread_mutex_unlock( &tls_mutex);
+ return TRUE;
+ }
+
+ pthread_mutex_unlock( &tls_mutex);
+ return FALSE;
+}
+
+
+PVOID TlsGetValue( DWORD index)
+{
+ if (index >= TLS_MINIMUM_AVAILABLE)
+ return NULL;
+
+ // verify if memory has been allocated for this thread
+ if (*tls_storage == NULL) {
+ // allocate memory for indexes
+ *tls_storage = (ULONG)calloc( TLS_MINIMUM_AVAILABLE, sizeof(int));
+ //fprintf( stderr, "tid#%d, tls_storage %x\n", _threadid, *tls_storage);
+ }
+
+ ULONG* tls_array = (ULONG*) *tls_storage;
+ return (PVOID) tls_array[ index];
+}
+
+BOOL TlsSetValue( DWORD index, PVOID val)
+{
+
+ // verify if memory has been allocated for this thread
+ if (*tls_storage == NULL) {
+ // allocate memory for indexes
+ *tls_storage = (ULONG)calloc( TLS_MINIMUM_AVAILABLE, sizeof(int));
+ //fprintf( stderr, "tid#%d, tls_storage %x\n", _threadid, *tls_storage);
+ }
+
+ if (index >= TLS_MINIMUM_AVAILABLE)
+ return FALSE;
+
+ ULONG* tls_array = (ULONG*) *tls_storage;
+ //fprintf( stderr, "tid#%d, TlsSetValue array %08x index %d -> %08x (old)\n", _threadid, tls_array, index, tls_array[ index]);
+ tls_array[ index] = (ULONG) val;
+ //fprintf( stderr, "tid#%d, TlsSetValue array %08x index %d -> %08x\n", _threadid, tls_array, index, val);
+
+ return TRUE;
+}
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index a3a193650df..8bdbc0f7fd8 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -145,7 +145,7 @@ struct tm *localtime_r(const time_t *clock, struct tm *res)
** Author: Gary Wisniewski <garyw@spidereye.com.au>, much modified by Monty
****************************************************************************/
-#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(sigwait) && !defined(__WIN__) && !defined(HAVE_rts_threads) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS)
+#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(sigwait) && !defined(__WIN__) && !defined(HAVE_rts_threads) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(OS2)
#if !defined(DONT_USE_SIGSUSPEND)
diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c
index c9d8edd6ddf..7ab75d47619 100644
--- a/mysys/my_realloc.c
+++ b/mysys/my_realloc.c
@@ -49,7 +49,7 @@ gptr my_realloc(gptr oldpoint, uint Size, myf MyFlags)
free(oldpoint);
}
#else
- if ((point = realloc(oldpoint,Size)) == NULL)
+ if ((point = (char*)realloc(oldpoint,Size)) == NULL)
{
if (MyFlags & MY_FREE_ON_ERROR)
my_free(oldpoint,MyFLAGS);
diff --git a/mysys/my_redel.c b/mysys/my_redel.c
index 0cc17481dab..16ec77394d2 100644
--- a/mysys/my_redel.c
+++ b/mysys/my_redel.c
@@ -91,7 +91,7 @@ int my_copystat(const char *from, const char *to, int MyFlags)
return 1;
VOID(chmod(to, statbuf.st_mode & 07777)); /* Copy modes */
-#if !defined(MSDOS) && !defined(__WIN__) && !defined(__EMX__)
+#if !defined(MSDOS) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
if (statbuf.st_nlink > 1 && MyFlags & MY_LINK_WARNING)
{
if (MyFlags & MY_LINK_WARNING)
diff --git a/mysys/my_static.c b/mysys/my_static.c
index 3fc68455841..00061893cdc 100644
--- a/mysys/my_static.c
+++ b/mysys/my_static.c
@@ -20,7 +20,7 @@
a shared library
*/
-#ifndef stdin
+#if !defined(stdin) || defined(OS2)
#include "mysys_priv.h"
#include "my_static.h"
#include "my_alarm.h"
diff --git a/mysys/my_tempnam.c b/mysys/my_tempnam.c
index ac982538668..7da037e8d49 100644
--- a/mysys/my_tempnam.c
+++ b/mysys/my_tempnam.c
@@ -26,7 +26,7 @@
#endif
#ifdef HAVE_TEMPNAM
-#ifndef MSDOS
+#if !defined( MSDOS) && !defined(OS2)
extern char **environ;
#endif
#endif
@@ -91,14 +91,23 @@ my_string my_tempnam(const char *dir, const char *pfx,
temp[1]= 0;
dir=temp;
}
- old_env=environ;
+#ifdef OS2
+ // changing environ variable doesn't work with VACPP
+ char buffer[256];
+ sprintf( buffer, "TMP=%s", dir);
+ putenv( buffer);
+#else
+ old_env=(char**)environ;
if (dir)
{ /* Don't use TMPDIR if dir is given */
- environ=temp_env;
+ environ=(const char**)temp_env;
temp_env[0]=0;
}
+#endif
res=tempnam((char*) dir,(my_string) pfx); /* Use stand. dir with prefix */
- environ=old_env;
+#ifndef OS2
+ environ=(const char**)old_env;
+#endif
if (!res)
DBUG_PRINT("error",("Got error: %d from tempnam",errno));
return res;
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index dab281e4dc6..e1f9e23912e 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -72,7 +72,7 @@ my_bool my_thread_global_init(void)
pthread_mutex_init(&THR_LOCK_heap,MY_MUTEX_INIT_FAST);
pthread_mutex_init(&THR_LOCK_net,MY_MUTEX_INIT_FAST);
pthread_mutex_init(&THR_LOCK_charset,MY_MUTEX_INIT_FAST);
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
win_pthread_init();
#endif
#ifndef HAVE_LOCALTIME_R
@@ -160,11 +160,11 @@ void my_thread_end(void)
pthread_cond_destroy(&tmp->suspend);
#endif
pthread_mutex_destroy(&tmp->mutex);
-#if !defined(__WIN__) || defined(USE_TLS)
+#if (!defined(__WIN__) && !defined(OS2)) || defined(USE_TLS)
free(tmp);
#endif
}
-#if !defined(__WIN__) || defined(USE_TLS)
+#if (!defined(__WIN__) && !defined(OS2)) || defined(USE_TLS)
pthread_setspecific(THR_KEY_mysys,0);
#endif
}
diff --git a/mysys/my_write.c b/mysys/my_write.c
index 61d6c7d2180..640043192ef 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -19,6 +19,46 @@
#include "mysys_err.h"
#include <errno.h>
+#ifdef OS2
+
+int _write64( int fd, const void *buffer, unsigned int count)
+{
+ APIRET rc;
+ ULONG actual;
+
+ rc = DosWrite( fd, (PVOID) buffer, count, &actual);
+
+ switch (rc) {
+ case 0: /* NO_ERROR */
+ errno = 0;
+ return( actual);
+ break;
+ case ERROR_INVALID_FUNCTION:
+ errno = EPERM;
+ break;
+ case ERROR_ACCESS_DENIED:
+ errno = EACCESS;
+ break;
+ case ERROR_INVALID_HANDLE:
+ errno = EBADF;
+ break;
+ case ERROR_DISK_FULL:
+ errno = ENOSPC;
+ break;
+ default:
+ errno = EINVAL;
+ break;
+ }
+ // write failed
+ return(-1);
+}
+
+// redirect call
+#define write _write64
+
+#endif // OS2
+
+
/* Write a chunk of bytes to a file */
uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags)
diff --git a/mysys/test_charset.c b/mysys/test_charset.c
index a04bdbd9a58..6a5183d2cd3 100644
--- a/mysys/test_charset.c
+++ b/mysys/test_charset.c
@@ -22,7 +22,7 @@
#include <stdio.h>
-extern void _print_csinfo();
+extern void _print_csinfo(CHARSET_INFO *cs);
int main(int argc, char **argv) {
const char *the_set = MYSQL_CHARSET;
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c
index 3c641e01d7b..f51f27b7f51 100644
--- a/mysys/thr_alarm.c
+++ b/mysys/thr_alarm.c
@@ -37,7 +37,7 @@
static my_bool alarm_aborted=1;
my_bool thr_alarm_inited=0;
-#if !defined(__WIN__) && !defined(__EMX__)
+#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
static pthread_mutex_t LOCK_alarm;
static sigset_t full_signal_set;
@@ -460,7 +460,7 @@ static void *alarm_handler(void *arg __attribute__((unused)))
** thr_alarm for OS/2
*****************************************************************************/
-#elif defined(__EMX__)
+#elif defined(__EMX__) || defined(OS2)
#define INCL_BASE
#define INCL_NOPMAPI
@@ -775,8 +775,10 @@ static sig_handler print_signal_warning(int sig)
#ifdef DONT_REMEMBER_SIGNAL
sigset(sig,print_signal_warning); /* int. thread system calls */
#endif
+#ifndef OS2
if (sig == SIGALRM)
alarm(2); /* reschedule alarm */
+#endif
}
#endif /* USE_ONE_SIGNAL_HAND */
@@ -793,6 +795,7 @@ static void *signal_hand(void *arg __attribute__((unused)))
VOID(pthread_cond_signal(&COND_thread_count)); /* Tell main we are ready */
pthread_mutex_unlock(&LOCK_thread_count);
+#ifndef OS2
sigemptyset(&set); /* Catch all signals */
sigaddset(&set,SIGINT);
sigaddset(&set,SIGQUIT);
@@ -809,6 +812,7 @@ static void *signal_hand(void *arg __attribute__((unused)))
#else
puts("Starting signal handling thread");
#endif
+#endif /* OS2 */
printf("server alarm: %d thread alarm: %d\n",
THR_SERVER_ALARM,THR_CLIENT_ALARM);
DBUG_PRINT("info",("Starting signal and alarm handling thread"));
@@ -831,7 +835,9 @@ static void *signal_hand(void *arg __attribute__((unused)))
case SIGINT:
case SIGQUIT:
case SIGTERM:
+#ifndef OS2
case SIGHUP:
+#endif
printf("Aborting nicely\n");
end_thr_alarm();
break;
@@ -841,11 +847,13 @@ static void *signal_hand(void *arg __attribute__((unused)))
exit(1);
return 0; /* Keep some compilers happy */
#endif
+#ifndef OS2
#ifdef USE_ONE_SIGNAL_HAND
case THR_SERVER_ALARM:
process_alarm(sig);
break;
#endif
+#endif /* OS2 */
}
}
}
@@ -866,6 +874,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
pthread_cond_init(&COND_thread_count,NULL);
/* Start a alarm handling thread */
+#ifndef OS2
sigemptyset(&set);
sigaddset(&set,SIGINT);
sigaddset(&set,SIGQUIT);
@@ -883,6 +892,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
sigaddset(&set,THR_CLIENT_ALARM);
VOID(pthread_sigmask(SIG_UNBLOCK, &set, (sigset_t*) 0));
#endif
+#endif /* OS2 */
pthread_attr_init(&thr_attr);
pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS);
diff --git a/mysys/tree.c b/mysys/tree.c
index 002062d9f0e..cd05a17fd72 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -133,7 +133,7 @@ static void delete_tree_element(TREE *tree, TREE_ELEMENT *element)
if (tree->free)
(*tree->free)(ELEMENT_KEY(tree,element));
if (tree->with_delete)
- my_free((void*) element,MYF(0));
+ my_free((char*) element,MYF(0));
}
}
diff --git a/os2/ChangeLog.os2 b/os2/ChangeLog.os2
new file mode 100644
index 00000000000..34547262fe2
--- /dev/null
+++ b/os2/ChangeLog.os2
@@ -0,0 +1,23 @@
+
+2001/06/12
+ - fixed support for > 2GB file size, needs also DosOpenL
+ - mixed 64bit/32bit file size support, dinamic loading of
+ 64bit API.
+
+2001/06/03
+ - added support for > 2GB file size
+
+2001/06/02
+ - fixed file locking code
+
+2001/05/29
+ - 3.23.38 build
+
+2001/05/20
+ - rint fix
+ - isam O_RDONLY table handled fix
+
+2001/05/19
+ - new TLS code, fixed parser crashes and many other problems.
+ - fixed pthread_cond_timedwait, now handle manager expires
+
diff --git a/os2/MySQL-All.icc b/os2/MySQL-All.icc
new file mode 100644
index 00000000000..1bd8a1dd89f
--- /dev/null
+++ b/os2/MySQL-All.icc
@@ -0,0 +1,13 @@
+
+// create directories
+for dir in "..\\bin", "..\\lib", "..\\obj", "..\\obj\\zlib", "..\\obj\\readline" {
+ run "if not exist "dir" mkdir "dir
+}
+
+// build sequence
+run "vacbld MySQL-Lib.icc -showprogress=10 -showwarning"
+run "vacbld MySQL-Client.icc -showprogress=10 -showwarning"
+run "vacbld MySQL-Sql.icc -showprogress=10 -showwarning"
+
+// need only for utilities and test applications
+run "vacbld MySQL-Util.icc -showprogress=10 -showwarning"
diff --git a/os2/MySQL-Client.icc b/os2/MySQL-Client.icc
new file mode 100644
index 00000000000..e00fe28a3c9
--- /dev/null
+++ b/os2/MySQL-Client.icc
@@ -0,0 +1,87 @@
+// disable code inlining when building static libs
+InlineCode = "no"
+
+// include common options
+include "MySQL-Opt.icc"
+include "MySQL-Source.icc"
+
+option ProjectOptions = MySQLOptions
+ //, link(defaultlibsname, "readline.lib")
+{
+
+ option file(genobject, "..\\OBJ\\ZLIB\\")
+ {
+ target "..\\bin\\mysql.dll"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch
+ }
+ // target source files
+ source zlib
+ if debug_build {
+ source type('cpp') dbug
+ }
+ source type('cpp') my_sys
+ source type('cpp') my_sys_cli
+ source type('cpp') strings
+ source type('cpp') mysqlclientlib
+ }
+ }
+
+ option file(genobject, "..\\OBJ\\READLINE\\")
+ {
+ target "..\\bin\\mysql.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ //source readline
+ source type('cpp') "..\\client\\mysql.cc"
+ }
+ }
+
+ target "..\\bin\\mysqladmin.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ source type('cpp') "..\\client\\mysqladmin.c"
+ }
+
+ target "..\\bin\\mysqldump.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch
+ }
+ // target source files
+ source type('cpp') "..\\client\\mysqldump.c"
+ }
+
+ target "..\\bin\\mysqlshow.exe"
+ {
+ // target source files
+ source type('cpp') "..\\client\\mysqlshow.c"
+ }
+
+ target "..\\bin\\mysqlimport.exe"
+ {
+ // target source files
+ source type('cpp') "..\\client\\mysqlimport.c"
+ }
+
+ target "..\\bin\\mysqltest.exe"
+ {
+ source type('cpp') "..\\client\\mysqltest.c"
+ }
+
+}
diff --git a/os2/MySQL-Client.irs b/os2/MySQL-Client.irs
new file mode 100644
index 00000000000..4b5a9e3475a
--- /dev/null
+++ b/os2/MySQL-Client.irs
@@ -0,0 +1,2335 @@
+31 Run Specifications: Version 1.1
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+39 E:\rd\mysql\vacpp-3.23.40\bin\mysql.exe
+1
+0
+0
+5 Local
+0
+44 E:\rd\mysql\vacpp-3.23.40\bin\mysqladmin.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\mysqldump.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\mysqlshow.exe
+1
+0
+0
+5 Local
+0
+45 E:\rd\mysql\vacpp-3.23.40\bin\mysqlimport.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\mysqltest.exe
+1
+0
+0
+5 Local
+0
diff --git a/os2/MySQL-Lib.icc b/os2/MySQL-Lib.icc
new file mode 100644
index 00000000000..51f55ed8302
--- /dev/null
+++ b/os2/MySQL-Lib.icc
@@ -0,0 +1,72 @@
+// disable code inlining when building static libs
+InlineCode = "no"
+
+// include common options
+include "MySQL-Opt.icc"
+include "MySQL-Source.icc"
+
+option ProjectOptions = MySQLOptions
+{
+
+ option file(genobject, "..\\OBJ\\ZLIB\\")
+ {
+ target "..\\lib\\common.lib"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ source zlib
+ if debug_build {
+ source type('cpp') dbug
+ }
+ source type('cpp') heap
+ //source type('cpp') merge
+ source type('cpp') my_sys
+ source type('cpp') my_sys_cli
+ source type('cpp') my_sys_sql
+ source type('cpp') strings
+ }
+ }
+
+/*
+ option file(genobject, "..\\OBJ\\READLINE\\")
+ {
+ target "..\\lib\\readline.lib"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ source readline
+ }
+ }
+*/
+
+ target "..\\lib\\myisam.lib"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ source type('cpp') myisam
+ }
+
+ target "..\\lib\\isam.lib"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ source type('cpp') isam
+ }
+
+}
diff --git a/os2/MySQL-Opt.icc b/os2/MySQL-Opt.icc
new file mode 100644
index 00000000000..5f5cdb7c72f
--- /dev/null
+++ b/os2/MySQL-Opt.icc
@@ -0,0 +1,53 @@
+// set to 1 to enable debug code
+debug_build = 0
+
+// common options
+option BaseOptions = link(defaultlibsname, "tcpip32.lib")
+ ,link(libsearchpath, "..\\lib\\")
+ ,link(libsearchpath, "..\\bin\\")
+ ,link(pmtype, vio)
+ ,link(linkwithmultithreadlib, "yes")
+ ,link(linkwithsharedlib, "no")
+ ,gen(initauto, "yes")
+ ,define("__MT__", )
+ ,define("HAVE_BSD_SIGNALS", )
+ ,define("INCL_DOS", )
+ ,define("INCL_DOSERRORS", )
+ ,define("INCL_LONGLONG", )
+ ,define("OS2", )
+ ,define("USE_TLS", )
+ ,lang(signedchars, yes)
+ ,incl(searchpath, "..")
+ ,incl(searchpath, "..\\include")
+ ,incl(searchpath, "..\\my_sys")
+ ,incl(searchpath, "..\\regex")
+ ,incl(searchpath, "..\\sql")
+ ,incl(searchpath, "\\rd\\mysql\\zlib-1.1.3")
+ ,incl(searchpath, "\\rd\\mysql\\ufc")
+ ,incl(searchpath, "..\\os2")
+
+option ReleaseOptions = link(debug, "no")
+ , define("DBUG_OFF", )
+ , gen(arch, "pentium")
+ , opt(tune, "pentium2")
+ , opt(level, "0")
+ , opt(stackchaining, no)
+ , opt(size, yes)
+ , opt(autoinline, InlineCode)
+ , opt(inline, InlineCode)
+ , opt(schedule, no)
+
+option DebugOptions = link(debug, "yes")
+ , gen(debug, "yes")
+ , define("DBUG_ON", )
+
+
+if debug_build {
+
+option MySQLOptions = BaseOptions, DebugOptions
+
+} else {
+
+option MySQLOptions = BaseOptions, ReleaseOptions
+
+}
diff --git a/os2/MySQL-ReadLine.icc b/os2/MySQL-ReadLine.icc
new file mode 100644
index 00000000000..3f63b0815e6
--- /dev/null
+++ b/os2/MySQL-ReadLine.icc
@@ -0,0 +1,27 @@
+// disable code inlining when building static libs
+InlineCode = "no"
+
+// include common options
+include "MySQL-Opt.icc"
+include "MySQL-Source.icc"
+
+option ProjectOptions = MySQLOptions
+{
+
+
+
+ option file(genobject, "..\\OBJ\\READLINE\\")
+ {
+ target "..\\lib\\readline.lib"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ source readline
+ }
+ }
+
+}
diff --git a/os2/MySQL-Source.icc b/os2/MySQL-Source.icc
new file mode 100644
index 00000000000..48780857185
--- /dev/null
+++ b/os2/MySQL-Source.icc
@@ -0,0 +1,298 @@
+group client_pch =
+ 'os2.h',
+ 'assert.h', 'direct.h', 'errno.h', 'nerrno.h',
+ 'limits.h', 'io.h', 'math.h',
+ 'stdio.h', 'stdlib.h', 'stddef.h',
+ 'sys/stat.h', 'sys/types.h', 'sys/time.h',
+ 'types.h', 'string.h', 'stdarg.h',
+
+ 'my_base.h', 'config-os2.h', 'my_dir.h',
+ 'global.h', 'thr_alarm.h', 'm_string.h',
+ 'mysql.h', 'zconf.h', 'zlib.h', 'mysys_err.h',
+ //'my_os2dirsrch.h',
+ 'm_ctype.h',
+ 'mysqld_error.h',
+ 'my_list.h', 'my_sys.h', 'my_net.h',
+ 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h'
+
+group mysqlclientlib =
+ "..\\client\\readline.cc",
+ "..\\client\\sql_string.cc",
+ "..\\client\\completion_hash.cc",
+ //"..\\libmysql\\dll.c",
+ "..\\libmysql\\libmysql.c",
+ "..\\libmysql\\errmsg.c",
+ "..\\libmysql\\get_password.c",
+ "..\\libmysql\\net.c",
+ "..\\libmysql\\password.c",
+ "..\\libmysql\\violite.c"
+
+group zlib =
+ "\\rd\\mysql\\zlib-1.1.3\\compress.c", "\\rd\\mysql\\zlib-1.1.3\\crc32.c",
+ "\\rd\\mysql\\zlib-1.1.3\\deflate.c", "\\rd\\mysql\\zlib-1.1.3\\gzio.c", "\\rd\\mysql\\zlib-1.1.3\\infblock.c",
+ "\\rd\\mysql\\zlib-1.1.3\\infcodes.c", "\\rd\\mysql\\zlib-1.1.3\\inffast.c",
+ "\\rd\\mysql\\zlib-1.1.3\\inflate.c", "\\rd\\mysql\\zlib-1.1.3\\inftrees.c",
+ "\\rd\\mysql\\zlib-1.1.3\\infutil.c", "\\rd\\mysql\\zlib-1.1.3\\trees.c", "\\rd\\mysql\\zlib-1.1.3\\uncompr.c",
+ "\\rd\\mysql\\zlib-1.1.3\\zutil.c", "\\rd\\mysql\\zlib-1.1.3\\adler32.c"
+
+group ufc =
+ "\\rd\\mysql\\ufc\\crypt.c",
+ "\\rd\\mysql\\ufc\\crypt_util.c",
+ "\\rd\\mysql\\ufc\\crypt-entry.c"
+
+group sql =
+ "..\\sql\\convert.cc",
+ "..\\sql\\derror.cc",
+ "..\\sql\\field.cc",
+ "..\\sql\\field_conv.cc",
+ "..\\sql\\filesort.cc",
+ "..\\sql\\ha_heap.cc",
+ "..\\sql\\ha_isam.cc",
+ "..\\sql\\ha_isammrg.cc",
+ "..\\sql\\ha_myisam.cc",
+ "..\\sql\\ha_myisammrg.cc",
+ "..\\sql\\handler.cc",
+ "..\\sql\\hash_filo.cc",
+ "..\\sql\\hostname.cc",
+ "..\\sql\\init.cc",
+ "..\\sql\\item.cc",
+ "..\\sql\\item_buff.cc",
+ "..\\sql\\item_cmpfunc.cc",
+ "..\\sql\\item_create.cc",
+ "..\\sql\\item_func.cc",
+ "..\\sql\\item_strfunc.cc",
+ "..\\sql\\item_sum.cc",
+ "..\\sql\\item_timefunc.cc",
+ "..\\sql\\item_uniq.cc",
+ "..\\sql\\key.cc",
+ "..\\sql\\lock.cc",
+ "..\\sql\\log.cc",
+ "..\\sql\\log_event.cc",
+ "..\\sql\\md5.c",
+ "..\\sql\\mf_iocache.cc",
+ "..\\sql\\mini_client.cc",
+ "..\\sql\\mini_client_errors.c",
+ "..\\sql\\mysqld.cc",
+ "..\\sql\\net_pkg.cc",
+ "..\\sql\\net_serv.cc",
+ "..\\sql\\opt_ft.cc",
+ "..\\sql\\opt_range.cc",
+ "..\\sql\\OPT_SUM.cc",
+ "..\\sql\\password.c",
+ "..\\sql\\procedure.cc",
+ "..\\sql\\records.cc",
+ "..\\sql\\slave.cc",
+ "..\\sql\\sql_acl.cc",
+ "..\\sql\\sql_analyse.cc",
+ "..\\sql\\sql_base.cc",
+ "..\\sql\\sql_cache.cc",
+ "..\\sql\\sql_class.cc",
+ "..\\sql\\sql_crypt.cc",
+ "..\\sql\\sql_db.cc",
+ "..\\sql\\sql_delete.cc",
+ "..\\sql\\sql_insert.cc",
+ "..\\sql\\sql_lex.cc",
+ "..\\sql\\sql_list.cc",
+ "..\\sql\\sql_load.cc",
+ "..\\sql\\sql_manager.cc",
+ "..\\sql\\sql_map.cc",
+ "..\\sql\\sql_parse.cc",
+ "..\\sql\\sql_rename.cc",
+ "..\\sql\\sql_repl.cc",
+ "..\\sql\\sql_select.cc",
+ "..\\sql\\sql_show.cc",
+ "..\\sql\\sql_string.cc",
+ "..\\sql\\sql_table.cc",
+ "..\\sql\\sql_test.cc",
+ "..\\sql\\sql_update.cc",
+ "..\\sql\\sql_udf.cc",
+ "..\\sql\\sql_yacc.cc",
+ "..\\sql\\table.cc",
+ "..\\sql\\thr_malloc.cc",
+ "..\\sql\\time.cc",
+ "..\\sql\\unireg.cc",
+ "..\\sql\\violite.c"
+
+group isam =
+ "..\\isam\\changed.c", "..\\isam\\close.c",
+ "..\\isam\\create.c", "..\\isam\\delete.c", "..\\isam\\extra.c",
+ "..\\isam\\info.c", "..\\isam\\log.c", "..\\isam\\open.c",
+ "..\\isam\\panic.c", "..\\isam\\range.c",
+ "..\\isam\\rfirst.c", "..\\isam\\rkey.c", "..\\isam\\rlast.c",
+ "..\\isam\\rnext.c", "..\\isam\\rprev.c", "..\\isam\\rrnd.c",
+ "..\\isam\\rsame.c", "..\\isam\\rsamepos.c",
+ "..\\isam\\static.c", "..\\isam\\update.c",
+ "..\\isam\\write.c", "..\\isam\\_cache.c",
+ "..\\isam\\_dbug.c", "..\\isam\\_dynrec.c",
+ "..\\isam\\_key.c", "..\\isam\\_locking.c",
+ "..\\isam\\_packrec.c", "..\\isam\\_page.c",
+ "..\\isam\\_search.c", "..\\isam\\_statrec.c"
+
+group strings =
+ "..\\strings\\bchange.c",
+ "..\\strings\\bmove.c",
+ "..\\strings\\bmove_upp.c",
+ "..\\strings\\ctype-big5.c",
+ "..\\strings\\ctype-czech.c",
+ "..\\strings\\ctype-euc_kr.c",
+ "..\\strings\\ctype-gb2312.c",
+ "..\\strings\\ctype-gbk.c",
+ "..\\strings\\ctype-sjis.c",
+ "..\\strings\\ctype-tis620.c",
+ "..\\strings\\ctype-ujis.c",
+ "..\\strings\\ctype_extra_sources.c",
+ "..\\strings\\ctype_autoconf.c",
+ "..\\strings\\ctype.c",
+ "..\\strings\\int2str.c",
+ "..\\strings\\is_prefix.c",
+ "..\\strings\\llstr.c",
+ "..\\strings\\longlong2str.c",
+ "..\\strings\\str2int.c",
+ "..\\strings\\strappend.c",
+ "..\\strings\\strcend.c",
+ "..\\strings\\strcont.c",
+ "..\\strings\\strend.c",
+ "..\\strings\\strfill.c",
+ "..\\strings\\strinstr.c",
+ "..\\strings\\strmake.c",
+ "..\\strings\\strmov.c",
+ "..\\strings\\strnlen.c",
+ "..\\strings\\strnmov.c",
+ "..\\strings\\strtoull.c",
+ "..\\strings\\strxmov.c",
+ "..\\strings\\strxnmov.c"
+
+
+ group heap = "..\\heap\\hp_block.c", "..\\heap\\hp_clear.c",
+ "..\\heap\\hp_close.c", "..\\heap\\hp_create.c", "..\\heap\\hp_delete.c",
+ "..\\heap\\hp_extra.c", "..\\heap\\hp_hash.c",
+ "..\\heap\\hp_info.c", "..\\heap\\hp_open.c",
+ "..\\heap\\hp_panic.c", "..\\heap\\hp_rename.c",
+ "..\\heap\\hp_rfirst.c", "..\\heap\\hp_rkey.c",
+ "..\\heap\\hp_rlast.c", "..\\heap\\hp_rnext.c",
+ "..\\heap\\hp_rprev.c", "..\\heap\\hp_rrnd.c",
+ "..\\heap\\hp_rsame.c", "..\\heap\\hp_scan.c",
+ "..\\heap\\hp_static.c", "..\\heap\\hp_update.c",
+ "..\\heap\\hp_write.c", "..\\heap\\_check.c", "..\\heap\\_rectest.c"
+
+
+ group merge = "..\\merge\\close.c", "..\\merge\\create.c", "..\\merge\\delete.c",
+ "..\\merge\\extra.c", "..\\merge\\info.c", "..\\merge\\open.c",
+ "..\\merge\\panic.c", "..\\merge\\rrnd.c", "..\\merge\\rsame.c",
+ "..\\merge\\static.c", "..\\merge\\update.c",
+ "..\\merge\\_locking.c"
+
+
+ group myisammrg = "..\\myisammrg\\myrg_close.c",
+ "..\\myisammrg\\myrg_create.c", "..\\myisammrg\\myrg_delete.c",
+ "..\\myisammrg\\myrg_extra.c", "..\\myisammrg\\myrg_info.c",
+ "..\\myisammrg\\myrg_locking.c",
+ "..\\myisammrg\\myrg_open.c", "..\\myisammrg\\myrg_panic.c",
+ "..\\myisammrg\\myrg_queue.c",
+ "..\\myisammrg\\myrg_rfirst.c", "..\\myisammrg\\myrg_rkey.c",
+ "..\\myisammrg\\myrg_rlast.c", "..\\myisammrg\\myrg_rnext.c",
+ "..\\myisammrg\\myrg_rprev.c", "..\\myisammrg\\myrg_rrnd.c",
+ "..\\myisammrg\\myrg_rsame.c",
+ "..\\myisammrg\\myrg_static.c",
+ "..\\myisammrg\\myrg_update.c"
+
+ group my_sys = "..\\mysys\\array.c", "..\\mysys\\charset.c",
+ "..\\mysys\\checksum.c", "..\\mysys\\default.c", "..\\mysys\\errors.c",
+ "..\\mysys\\getopt.c", "..\\mysys\\getopt1.c",
+ "..\\mysys\\getvar.c", "..\\mysys\\hash.c", "..\\mysys\\list.c",
+ "..\\mysys\\mf_brkhant.c", "..\\mysys\\mf_cache.c",
+ "..\\mysys\\mf_casecnv.c", "..\\mysys\\mf_dirname.c",
+ "..\\mysys\\mf_fn_ext.c", "..\\mysys\\mf_format.c",
+ "..\\mysys\\mf_getdate.c",
+ "..\\mysys\\mf_iocache2.c", "..\\mysys\\mf_keycache.c",
+ "..\\mysys\\mf_loadpath.c", "..\\mysys\\mf_pack.c",
+ "..\\mysys\\mf_pack2.c", "..\\mysys\\mf_path.c",
+ "..\\mysys\\mf_qsort2.c",
+ //"..\\mysys\\mf_qsort.c",
+ "..\\mysys\\mf_radix.c", "..\\mysys\\mf_same.c",
+ "..\\mysys\\mf_sort.c", "..\\mysys\\mf_soundex.c",
+ "..\\mysys\\mf_stripp.c", "..\\mysys\\mf_tempfile.c",
+ "..\\mysys\\mf_unixpath.c", "..\\mysys\\mf_wcomp.c",
+ "..\\mysys\\mf_wfile.c", "..\\mysys\\mulalloc.c",
+ "..\\mysys\\my_alarm.c", "..\\mysys\\my_alloc.c",
+ "..\\mysys\\my_append.c", "..\\mysys\\my_bitmap.c",
+ "..\\mysys\\my_chsize.c", "..\\mysys\\my_clock.c",
+ "..\\mysys\\my_compress.c", "..\\mysys\\my_copy.c",
+ "..\\mysys\\my_create.c", "..\\mysys\\my_delete.c",
+ "..\\mysys\\my_div.c", "..\\mysys\\my_error.c",
+ "..\\mysys\\my_fopen.c", "..\\mysys\\my_fstream.c",
+ "..\\mysys\\my_getwd.c", "..\\mysys\\my_init.c",
+ "..\\mysys\\my_lib.c", "..\\mysys\\my_lock.c",
+ "..\\mysys\\my_lockmem.c", "..\\mysys\\my_lread.c",
+ "..\\mysys\\my_lwrite.c", "..\\mysys\\my_malloc.c",
+ "..\\mysys\\my_messnc.c", "..\\mysys\\my_mkdir.c",
+ "..\\mysys\\my_net.c", "..\\mysys\\my_once.c",
+ "..\\mysys\\my_open.c",
+ "..\\mysys\\my_os2cond.c",
+ "..\\mysys\\my_os2dlfcn.c",
+ "..\\mysys\\my_os2dirsrch.c",
+ "..\\mysys\\my_os2mutex.c", "..\\mysys\\my_os2thread.c",
+ "..\\mysys\\my_os2tls.c",
+ "..\\mysys\\my_os2file64.c",
+ "..\\mysys\\my_pread.c", "..\\mysys\\my_pthread.c",
+ "..\\mysys\\my_quick.c", "..\\mysys\\my_read.c",
+ "..\\mysys\\my_realloc.c", "..\\mysys\\my_redel.c",
+ "..\\mysys\\my_rename.c", "..\\mysys\\my_seek.c",
+ "..\\mysys\\my_static.c", "..\\mysys\\my_tempnam.c",
+ "..\\mysys\\my_thr_init.c", "..\\mysys\\my_vsnprintf.c",
+ "..\\mysys\\my_write.c", "..\\mysys\\ptr_cmp.c",
+ "..\\mysys\\queues.c", "..\\mysys\\raid.cc",
+ "..\\mysys\\safemalloc.c", "..\\mysys\\string.c",
+ "..\\mysys\\thr_alarm.c",
+ "..\\mysys\\thr_mutex.c", "..\\mysys\\thr_rwlock.c",
+ "..\\mysys\\tree.c", "..\\mysys\\typelib.c"
+
+ group my_sys_cli = "..\\mysys\\mf_iocache.c"
+ group my_sys_sql = "..\\mysys\\thr_lock.c"
+
+ group myisam = "..\\myisam\\ft_parser.c",
+ "..\\myisam\\ft_search.c", "..\\myisam\\ft_static.c",
+ "..\\myisam\\ft_stopwords.c", "..\\myisam\\ft_update.c",
+ "..\\myisam\\mi_cache.c", "..\\myisam\\mi_changed.c",
+ "..\\myisam\\mi_check.c", "..\\myisam\\mi_checksum.c",
+ "..\\myisam\\mi_close.c", "..\\myisam\\mi_create.c",
+ "..\\myisam\\mi_dbug.c", "..\\myisam\\mi_delete.c",
+ "..\\myisam\\mi_delete_all.c", "..\\myisam\\mi_delete_table.c",
+ "..\\myisam\\mi_dynrec.c", "..\\myisam\\mi_extra.c",
+ "..\\myisam\\mi_info.c", "..\\myisam\\mi_key.c",
+ "..\\myisam\\mi_locking.c", "..\\myisam\\mi_log.c",
+ "..\\myisam\\mi_open.c", "..\\myisam\\mi_packrec.c",
+ "..\\myisam\\mi_page.c", "..\\myisam\\mi_panic.c",
+ "..\\myisam\\mi_range.c", "..\\myisam\\mi_rename.c",
+ "..\\myisam\\mi_rfirst.c", "..\\myisam\\mi_rkey.c",
+ "..\\myisam\\mi_rlast.c", "..\\myisam\\mi_rnext.c",
+ "..\\myisam\\mi_rnext_same.c", "..\\myisam\\mi_rprev.c",
+ "..\\myisam\\mi_rrnd.c", "..\\myisam\\mi_rsame.c",
+ "..\\myisam\\mi_rsamepos.c", "..\\myisam\\mi_scan.c",
+ "..\\myisam\\mi_search.c", "..\\myisam\\mi_static.c",
+ "..\\myisam\\mi_statrec.c", "..\\myisam\\mi_unique.c",
+ "..\\myisam\\mi_update.c", "..\\myisam\\mi_write.c",
+ "..\\myisam\\sort.c"
+
+ group dbug = "..\\dbug\\dbug.c", "..\\dbug\\factorial.c", "..\\dbug\\sanity.c"
+
+ group readline = "..\\readline\\bind.c", "..\\readline\\callback.c",
+ "..\\readline\\complete.c", "..\\readline\\display.c",
+ //"..\\readline\\emacs_keymap.c",
+ "..\\readline\\funmap.c", "..\\readline\\histexpand.c",
+ "..\\readline\\histfile.c", "..\\readline\\history.c",
+ "..\\readline\\histsearch.c", "..\\readline\\input.c",
+ "..\\readline\\isearch.c", "..\\readline\\keymaps.c",
+ "..\\readline\\kill.c", "..\\readline\\macro.c",
+ "..\\readline\\nls.c", "..\\readline\\parens.c",
+ "..\\readline\\readline.c", "..\\readline\\rltty.c",
+ "..\\readline\\search.c", "..\\readline\\shell.c",
+ "..\\readline\\signals.c", "..\\readline\\terminal.c",
+ "..\\readline\\tilde.c", "..\\readline\\undo.c",
+ "..\\readline\\util.c",
+ //"..\\readline\\vi_keymap.c",
+ "..\\readline\\vi_mode.c", "..\\readline\\xmalloc.c"
+
+group regex = "..\\regex\\regcomp.c", "..\\regex\\regerror.c",
+ "..\\regex\\regexec.c", "..\\regex\\regfree.c", "..\\regex\\reginit.c"
+
diff --git a/os2/MySQL-Sql.icc b/os2/MySQL-Sql.icc
new file mode 100644
index 00000000000..0c3fc69d68c
--- /dev/null
+++ b/os2/MySQL-Sql.icc
@@ -0,0 +1,117 @@
+// disable code inlining when building static libs
+InlineCode = "no"
+
+// include common options
+include "MySQL-Opt.icc"
+include "MySQL-Source.icc"
+
+option ProjectOptions = MySQLOptions
+ , define( "MYSQL_SERVER", "")
+{
+
+ option file(genobject, "..\\OBJ\\ZLIB\\")
+ {
+ target "..\\bin\\mysqld.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ //source type('cpp') gpch
+ source type('cpp') 'os2.h'
+ source type('cpp')
+ //'ctype.h',
+ 'string.h', 'assert.h', 'share.h', 'stdarg.h', 'stdio.h',
+ 'stdlib.h', 'stddef.h', 'math.h', 'io.h', 'limits.h',
+ 'process.h', 'errno.h', 'nerrno.h', 'sys/types.h',
+ 'sys/time.h', 'sys/stat.h', 'sys/param.h', 'sys/ioccom.h',
+ 'sys/filio.h', 'sys/sockio.h', 'sys/ioctlos2.h','sys/ioctl.h', 'types.h'
+
+ source type('cpp')
+ 'global.h', 'my_base.h', 'config-os2.h',
+ 'my_dir.h', 'my_sys.h', 'mysql.h',
+ 'my_bitmap.h', 'violite.h', 'mysql_priv.h',
+ 'm_string.h', 'm_ctype.h'
+
+ source type('cpp') 'myisam.h'
+ source type('cpp') 'myisampack.h'
+ source type('cpp') '.\myisam\myisamdef.h'
+
+ source type('cpp') 'sql_string.h'
+ source type('cpp') 'item.h'
+ source type('cpp') 'unireg.h'
+ source type('cpp') 'field.h'
+ source type('cpp') 'sql_lex.h'
+ source type('cpp') 'sql_list.h'
+ source type('cpp') 'md5.h'
+ source type('cpp') 'sql_acl.h'
+ source type('cpp') 'slave.h'
+ source type('cpp') 'ha_myisam.h'
+ source type('cpp') 'procedure.h'
+ source type('cpp') 'sql_select.h'
+ source type('cpp') 'errmsg.h'
+ source type('cpp') 't_ctype.h'
+ source type('cpp') 'direct.h'
+ source type('cpp') 'mysys_err.h'
+ source type('cpp') 'zconf.h'
+ source type('cpp') 'zlib.h'
+ source type('cpp') 'my_tree.h'
+ source type('cpp') '..\mysys\my_static.h'
+ source type('cpp') 'netdb.h'
+ source type('cpp') 'thr_alarm.h'
+ source type('cpp') 'heap.h'
+ source type('cpp') '..\myisam\fulltext.h'
+ source type('cpp') '..\myisam\ftdefs.h'
+ source type('cpp') 'myisammrg.h'
+
+ }
+ source type('cpp') 'sys/un.h'
+ source type('cpp') 'ha_heap.h'
+ source type('cpp') 'ha_myisammrg.h'
+ source type('cpp') 'opt_ft.h'
+ source type('cpp') 'hash_filo.h'
+ source type('cpp') 'mini_client.h'
+ source type('cpp') 'sql_repl.h'
+ source type('cpp') 'netinet/in_systm.h'
+ source type('cpp') 'netinet/tcp.h'
+ source type('cpp') 'sql_analyse.h'
+ source type('cpp') 'item_create.h'
+ source type('cpp') '..\mysys\mysys_priv.h'
+ source type('cpp') 'sys/utime.h'
+ source type('cpp') 'sys/select.h'
+
+ // target source files
+ source "rint.obj"
+ source zlib, ufc, regex
+ if debug_build {
+ source type('cpp') dbug
+ }
+ source type('cpp') heap
+ source type('cpp') isam
+ source type('cpp') merge
+ source type('cpp') myisam
+ source type('cpp') myisammrg
+ source type('cpp') my_sys
+ source type('cpp') my_sys_sql
+ source type('cpp') strings
+ source type('cpp') sql
+ }
+ }
+/*
+ option define( "MYSQL_SERVER", "")
+ {
+ target "..\\bin\\mysqlbinlog.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ //source type('cpp') client_pch //, 'sql_string.h'
+ }
+ // target source files
+ source type('cpp')
+ "..\\sql\\mysqlbinlog.cc",
+ "..\\sql\\mini_client.cc",
+ "..\\sql\\net_serv.cc"
+ }
+ }
+*/
+}
diff --git a/os2/MySQL-Util.icc b/os2/MySQL-Util.icc
new file mode 100644
index 00000000000..61b1f53bc5f
--- /dev/null
+++ b/os2/MySQL-Util.icc
@@ -0,0 +1,134 @@
+// disable code inlining when building static libs
+InlineCode = "no"
+
+// include common options
+include "MySQL-Opt.icc"
+include "MySQL-Source.icc"
+
+option ProjectOptions = MySQLOptions
+ , link(defaultlibsname, "common.lib")
+ , link(defaultlibsname, "myisam.lib")
+ , link(defaultlibsname, "isam.lib")
+ , link(defaultlibsname, "mysql.lib")
+{
+
+ target "..\\bin\\myisamchk.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch
+ }
+ source type('cpp') "..\\myisam\\myisamchk.c"
+ }
+
+ target "..\\bin\\myisamlog.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch
+ }
+
+ // target source files
+ source type('cpp') "..\\myisam\\myisamlog.c"
+ }
+
+ target "..\\bin\\myisampack.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch
+ }
+ // target source files
+ source type('cpp') "..\\myisam\\myisampack.c"
+ }
+
+ target "..\\bin\\test\\is_test1.exe"
+ {
+ // target source files
+ source type('cpp') "..\\isam\\test1.c"
+ }
+ target "..\\bin\\test\\is_test2.exe"
+ {
+ // target source files
+ source type('cpp') "..\\isam\\test2.c"
+ }
+ target "..\\bin\\test\\mi_test1.exe"
+ {
+ // target source files
+ source type('cpp') "..\\myisam\\mi_test1.c"
+ }
+ target "..\\bin\\test\\mi_test2.exe"
+ {
+ // target source files
+ source type('cpp') "..\\myisam\\mi_test2.c"
+ }
+ target "..\\bin\\test\\ft_eval.exe"
+ {
+ // target source files
+ source type('cpp') "..\\myisam\\ft_eval.c"
+ }
+ target "..\\bin\\test\\ft_test1.exe"
+ {
+ // target source files
+ source type('cpp') "..\\myisam\\ft_test1.c"
+ }
+
+ //target "..\\bin\\test\\testhash.exe"
+ {
+ // target source files
+ //source type('cpp') "..\\mysys\\testhash.c"
+ }
+
+ target "..\\bin\\test\\test_charset.exe"
+ {
+ // target source files
+ source type('cpp') "..\\mysys\\test_charset.c"
+ }
+
+ target "..\\bin\\test\\hp_test1.exe"
+ {
+ // target source files
+ source type('cpp') "..\\heap\\hp_test1.c"
+ }
+ target "..\\bin\\test\\hp_test2.exe"
+ {
+ // target source files
+ source type('cpp') "..\\heap\\hp_test2.c"
+ }
+
+ option define( "MAIN", "")
+ {
+ target "..\\bin\\test\\thr_lock.exe"
+ {
+ // target source files
+ source type('cpp') "..\\mysys\\thr_lock.c"
+ }
+ }
+
+ target "..\\bin\\test\\insert_test.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch
+ }
+ source type('cpp') "..\\client\\insert_test.c"
+ }
+ target "..\\bin\\test\\select_test.exe"
+ {
+ source type('cpp') "..\\client\\select_test.c"
+ }
+ target "..\\bin\\test\\thread_test.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') client_pch
+ }
+ source type('cpp') "..\\client\\thread_test.c"
+ }
+
+}
diff --git a/os2/MySQL-Util.irs b/os2/MySQL-Util.irs
new file mode 100644
index 00000000000..01a1f62a483
--- /dev/null
+++ b/os2/MySQL-Util.irs
@@ -0,0 +1,3067 @@
+31 Run Specifications: Version 1.1
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamchk.exe
+1
+0
+0
+5 Local
+0
+43 E:\rd\mysql\vacpp-3.23.40\bin\myisamlog.exe
+1
+0
+0
+5 Local
+0
+44 E:\rd\mysql\vacpp-3.23.40\bin\myisampack.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\is_test1.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\is_test2.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\mi_test1.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\mi_test2.exe
+1
+0
+0
+5 Local
+0
+46 E:\rd\mysql\vacpp-3.23.40\bin\test\ft_eval.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\ft_test1.exe
+1
+0
+0
+5 Local
+0
+51 E:\rd\mysql\vacpp-3.23.40\bin\test\test_charset.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\hp_test1.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\hp_test2.exe
+1
+0
+0
+5 Local
+0
+47 E:\rd\mysql\vacpp-3.23.40\bin\test\thr_lock.exe
+1
+0
+0
+5 Local
+0
+50 E:\rd\mysql\vacpp-3.23.40\bin\test\insert_test.exe
+1
+0
+0
+5 Local
+0
+50 E:\rd\mysql\vacpp-3.23.40\bin\test\select_test.exe
+1
+0
+0
+5 Local
+0
+50 E:\rd\mysql\vacpp-3.23.40\bin\test\thread_test.exe
+1
+0
+0
+5 Local
+0
diff --git a/os2/MySQL-binlog.icc b/os2/MySQL-binlog.icc
new file mode 100644
index 00000000000..d441198f5e0
--- /dev/null
+++ b/os2/MySQL-binlog.icc
@@ -0,0 +1,68 @@
+// disable code inlining when building static libs
+InlineCode = "no"
+
+// include common options
+include "MySQL-Opt.icc"
+include "MySQL-Source.icc"
+
+option ProjectOptions = MySQLOptions
+ , define( "MYSQL_SERVER", "")
+ , link(defaultlibsname, "common.lib")
+ , link(defaultlibsname, "myisam.lib")
+ , link(defaultlibsname, "isam.lib")
+ , link(defaultlibsname, "mysql.lib")
+{
+ option define( "MYSQL_SERVER", "")
+ {
+ target "..\\bin\\mysqlbinlog.exe"
+ {
+ // optimized precompiled headers
+ option macros('global', 'yes')
+ {
+ source type('cpp') 'os2.h'
+ source type('cpp') 'errno.h', 'nerrno.h'
+ source type('cpp') 'config-os2.h', 'mysql_com.h'
+/*
+ source type('cpp')
+ 'global.h', 'my_base.h', 'config-os2.h',
+ 'my_dir.h', 'my_sys.h', 'mysql.h',
+ 'my_bitmap.h', 'violite.h',
+ 'mysql_priv.h',
+ 'm_string.h'
+*/
+ }
+ // target source files
+ source type('cpp')
+ "..\\sql\\mysqlbinlog.cc"
+ option macros('global', 'yes')
+ {
+ source type('cpp') 'sys/stat.h'
+ }
+ source type('cpp') "..\\sql\\mini_client.cc"
+ option macros('global', 'yes')
+ {
+ source type('cpp') 'os2.h'
+ source type('cpp') 'math.h'
+ source type('cpp') 'stdio.h'
+ source type('cpp') 'stdlib.h'
+ source type('cpp') 'stddef.h'
+ source type('cpp') 'limits.h'
+ source type('cpp') 'sys/types.h'
+ source type('cpp') 'sys/time.h'
+ source type('cpp') 'types.h'
+ source type('cpp') 'stdarg.h'
+ source type('cpp') 'string.h'
+ }
+ source type('cpp') "..\\sql\\net_serv.cc",
+ "..\\sql\\mini_client_errors.c"
+ option macros('global', 'yes')
+ {
+ source type('cpp') 'assert.h'
+ }
+ source type('cpp') "..\\sql\\violite.c",
+ "..\\sql\\password.c"
+ //"..\\sql\\thr_malloc.cc"
+ }
+ }
+
+}
diff --git a/os2/MySQL-binlog.irs b/os2/MySQL-binlog.irs
new file mode 100644
index 00000000000..8d094544f1c
--- /dev/null
+++ b/os2/MySQL-binlog.irs
@@ -0,0 +1,7 @@
+31 Run Specifications: Version 1.1
+45 E:\rd\mysql\vacpp-3.23.40\bin\mysqlbinlog.exe
+1
+0
+0
+5 Local
+0
diff --git a/os2/MySQL-sql.irs b/os2/MySQL-sql.irs
new file mode 100644
index 00000000000..dc0b016d8d4
--- /dev/null
+++ b/os2/MySQL-sql.irs
@@ -0,0 +1,13 @@
+31 Run Specifications: Version 1.1
+40 E:\rd\mysql\vacpp-3.23.40\bin\mysqld.exe
+1
+0
+0
+5 Local
+0
+40 E:\rd\mysql\vacpp-3.23.40\bin\mysqld.exe
+1
+0
+0
+5 Local
+0
diff --git a/os2/build-all.cmd b/os2/build-all.cmd
new file mode 100644
index 00000000000..9cb9ef6ea44
--- /dev/null
+++ b/os2/build-all.cmd
@@ -0,0 +1,11 @@
+
+mkdir ..\bin
+mkdir ..\bin\test
+mkdir ..\lib
+mkdir ..\obj
+mkdir ..\obj\zlib
+
+vacbld MySQL-Lib.icc -showprogress=10 -showwarning >> build-all.log
+vacbld MySQL-Client.icc -showprogress=10 -showwarning >> build-all.log
+vacbld MySQL-Sql.icc -showprogress=10 -showwarning >> build-all.log
+vacbld MySQL-Util.icc -showprogress=10 -showwarning >> build-all.log
diff --git a/os2/build-all.log b/os2/build-all.log
new file mode 100644
index 00000000000..a5a64db316f
--- /dev/null
+++ b/os2/build-all.log
@@ -0,0 +1,39 @@
+Item 237 of 47475 (0%) ... source file ..\mysys\list.c
+Item 4357 of 29226 (15%) ... source region "extern int _Optlink _spawnve(int, const char *, const char ..."
+Item 10021 of 16290 (62%) ... initializer [0x7319920] for uchar to_upper_latin1[]
+Item 11487 of 15248 (75%) ... kernel-provided extension source file \rd\mysql\zlib-1.1.3\crc32.c
+Item 12920 of 15380 (84%) ... body of function [0x6dca980] int my_strcoll_czech(const uchar *, const uchar *)
+Item 13952 of 16411 (85%) ... output object file E:\rd\mysql\vacpp-3.23.33\os2\ft_search.obj
+Item 14083 of 16542 (85%) ... publish library or executable marker
+Item 1278 of 16668 (8%) ... source region "typedef STARTDATA *PSTARTDATA;"
+Item 6013 of 8617 (70%) ... kernel-provided extension source file \rd\mysql\zlib-1.1.3\trees.c
+Item 6962 of 8581 (81%) ... initializer [0x229bf00] for const char @485 (static target)[23] "Failed in mysql_init()"
+Item 7519 of 9019 (83%) ... initializer [0x2337bc0] for const char @630 (static target)[20] "No query specified
+"
+Item 8502 of 10001 (85%) ... publish library or executable marker
+Item 182 of 49201 (0%) ... source file ..\myisam\mi_statrec.c
+Item 2136 of 46089 (5%) ... source region "class Item_sum_udf_float :public Item_udf_sum { public: Item_sum_udf_float ..."
+Item 11112 of 25912 (43%) ... source region "extern uint _nisam_get_key(N_KEYDEF *keyinfo ..."
+Item 13919 of 24304 (57%) ... initializer [0x1ec6f10] for const short yypgoto[]
+Item 15179 of 23800 (64%) ... kernel-provided extension source file \rd\mysql\zlib-1.1.3\trees.c
+Item 17342 of 24056 (72%) ... initializer [0x29d1180] for __vftType __vft10Field_date5Field[46]
+Item 17912 of 24406 (73%) ... body of function [0x1d1df40] void Item_func_case::print(String *)
+Item 18247 of 24721 (74%) ... template instantiation (0x2b9dd20) of declaration of class I_List<thread_info> (2b9dc20)
+Item 18775 of 25165 (75%) ... initializer [0x2c45600] for __vftType __vft18Item_func_get_lock4Item[34]
+Item 19066 of 25369 (75%) ... initializer [0x2c800d0] for const char @2105 (static target)[22] "parser stack overflow"
+Item 19395 of 25535 (76%) ... body of function [0x171eef0] db_type ha_checktype(db_type)
+Item 19682 of 25654 (77%) ... body of function [0x17f1860] void kill_mysql()
+Item 20070 of 25717 (78%) ... body of function [0x183e570] Item *create_func_date_format(Item *, Item *)
+Item 20541 of 25764 (80%) ... body of function [0x1802b40] uint acl_get(const char *, const char *, const char *, const char *, const char *)
+Item 21017 of 25874 (81%) ... body of function [0x2c55180] String *field_str::get_max_arg(String *)
+Item 21406 of 25988 (82%) ... initializer [0x372d950] for const char @2567 (static target)[7] "%s(%d)"
+Item 22411 of 25867 (87%) ... body of function [0x161b160] Item_func_udf_int::Item_func_udf_int(udf_func *)
+Item 23345 of 25805 (90%) ... initializer [0x3447840] for const char @2709 (static target)[27] "waiting for handler insert"
+Item 23783 of 26226 (91%) ... initializer [0x39a95b0] for const char @2766 (static target)[25] "Creating delayed handler"
+Item 24887 of 27330 (91%) ... body of function [0x2b075a0] Item_load_file::~Item_load_file()
+Item 25018 of 27461 (91%) ... body of function [0x2cf5e50] Item_sum::Item_sum()
+Item 25267 of 27710 (91%) ... body of function [0x1c93d80] bool select_export::send_data(List<Item> &)
+Item 25484 of 27927 (91%) ... body of function [0x116e840] Item *create_func_ascii(Item *)
+Item 3212 of 9073 (35%) ... source region "extern int _mi_cmp_static_record(MI_INFO *info,const byte ..."
+Item 7171 of 8564 (84%) ... code csect _test_handle from library E:\bin\IBMCPP40\LIB\CPPRMS40.LIB
+Item 8345 of 9738 (86%) ... target E:\rd\mysql\vacpp-3.23.33\os2\..\bin\test\testhash.exe
diff --git a/os2/mysql.base b/os2/mysql.base
new file mode 100644
index 00000000000..4f0886e0697
--- /dev/null
+++ b/os2/mysql.base
@@ -0,0 +1,127 @@
+#include "mysql.ih"
+
+<WARPIN VERSION <$WARPIN_VERSION>>
+<HEAD>
+
+<PCK INDEX=1
+ PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\SQL Database Engine\<$MySQL\Ver>"
+ TARGET="?:\usr\local\mysql" BASE
+ TITLE="SQL Database Engine"
+ EXECUTE="$(1)\bootstrap.cmd [bootstrap]"
+ CONFIG.SYS="SET EMXOPT=-h1024 | UNIQUE(-h)"
+ CREATEOBJECT="WPFolder|MySQL <$MySQL.Ver>|<WP_DESKTOP>|OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>"
+ CREATEOBJECT="WPProgram|Console|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(1)\bin\mysql.exe;STARTUPDIR=$(1)\bin;ICONFILE=$(1)\bin\icons\mysql-client.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_CONSOLE>;"
+ CREATEOBJECT="WPProgram|Start server|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(1)\bin\mysqld.exe;ICONFILE=$(1)\bin\icons\mysql-startserver.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_START>;"
+ CREATEOBJECT="WPProgram|Shutdown server|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(1)\bin\mysqladmin.exe;STARTUPDIR=$(1)\bin;PARAMETERS=-u root shutdown;ICONFILE=$(1)\bin\icons\mysql-shutdownserver.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_SHUTDOWN>;"
+ CREATEOBJECT="WPProgram|Readme first|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=e.exe;PARAMETERS=$(1)\readme.os2;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_README>;"
+ SELECT
+ >This package will install MySQL for OS/2 SQL engine
+</PCK>
+
+<PCK INDEX=2
+ PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\Developement Kit\<$MySQL\Ver>"
+ TARGET="?:\usr\local\mysql"
+ TITLE="Developement Kit"
+ SELECT
+ >This package will install MySQL for OS/2 sdk
+</PCK>
+
+<PCK INDEX=3
+ PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\PDF manual\<$MySQL\Ver>"
+ TARGET="?:\usr\local\mysql"
+ TITLE="PDF manual"
+ EXTERNAL="mysql-3-23-28-gamma-pdf.wpi"
+ CREATEOBJECT="WPShadow|PDF Manual|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|SHADOWID=$(1)\docs\manual.pdf"
+ SELECT
+ >This package will install MySQL for OS/2 documentation
+</PCK>
+
+<PCK INDEX=4
+ PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\INF manual\<$MySQL\Ver>"
+ TARGET="?:\usr\local\mysql"
+ TITLE="INF manual"
+ EXTERNAL="mysql-3-23-28-gamma-inf.wpi"
+ CREATEOBJECT="WPProgram|MySQL Manual|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=view.exe;PARAMETERS=$(1)\docs\manual.inf;ICONFILE=$(1)\bin\icons\mysql-manual.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_INFMANUAL>;"
+ SELECT
+ >This package will install MySQL for OS/2 documentation
+</PCK>
+
+<PCK INDEX=5
+ PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\Test suite\<$MySQL\Ver>"
+ TARGET="?:\usr\local\mysql"
+ TITLE="Test suite"
+ EXTERNAL="mysql-<$MySQL-Ver>-test.wpi"
+ CREATEOBJECT="WPProgram|Run MySQL Test Suite|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(5)\mysql-test\mysql-test.cmd;PARAMETERS=$(1)\docs\manual.inf;ICONFILE=$(1)\bin\icons\mysql-manual.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_TESTSUITE>;"
+ SELECT
+ >This package will install MySQL for OS/2 test suite
+</PCK>
+
+</HEAD>
+
+<!-- Here come the different pages. They are linked by
+ the <NEXTBUTTON> tags, which must have a target.
+ Each page must have a TYPE= attribute, which tells
+ WarpIn what will be visible on that page. -->
+
+<BODY>
+
+<!-- page1: introduction ->>
+<PAGE INDEX=1 TYPE=README>
+<TEXT>
+</TEXT>
+<NEXTBUTTON TARGET=2>~Next</NEXTBUTTON>
+<README FORMAT=HTML>
+
+<P>Welcome to the latest port of MySQL for <B>OS/2 and eComStation</B>.
+
+<P>You are about to install <B>MySQL <$MySQL.Ver></B>
+
+<BR>
+<BR>
+<P>Select "Next" to continue.
+
+<P>Select "Cancel" to abort installation.
+</README>
+</PAGE>
+
+<!-- show readme.os2 -->
+<PAGE INDEX=2 TYPE=README>
+<NEXTBUTTON TARGET=3>~Next</NEXTBUTTON>
+<TEXT>
+</TEXT>
+<README FORMAT=PLAIN EXTRACTFROMPCK="1">readme.os2</README>
+</PAGE>
+
+<!-- show GPL license -->
+<PAGE INDEX=3 TYPE=README>
+<NEXTBUTTON TARGET=4>~I agree</NEXTBUTTON>
+<TEXT>
+By pressing the "I agree" button, you agree to all terms and conditions to the below licence agreement.
+</TEXT>
+<README FORMAT=HTML EXTRACTFROMPCK="1">license.htm</README>
+</PAGE>
+
+
+<!-- The TYPE=CONTAINER will list the packages which can be installed. -->
+
+<PAGE INDEX=4 TYPE=CONTAINER>
+<NEXTBUTTON TARGET=5>~Next</NEXTBUTTON>
+<TEXT>
+Please select the packages which are to be installed. You may change the target paths for the packages.
+</TEXT>
+</PAGE>
+
+<!-- Here's another TYPE=TEXT page before we install.
+ The special target "0" indicates that after this page we
+ should start installation.
+ Note that the TYPE=INSTALL page (which we had in Alpha #3)
+ is no longer supported. -->
+
+<PAGE INDEX=5 TYPE=TEXT>
+<NEXTBUTTON TARGET=0>I~nstall</NEXTBUTTON>
+<TEXT>
+Press "Install" to begin installing this archive.</TEXT>
+</PAGE>
+
+</BODY>
+</WARPIN>
diff --git a/os2/mysql.ih b/os2/mysql.ih
new file mode 100644
index 00000000000..71978c4135a
--- /dev/null
+++ b/os2/mysql.ih
@@ -0,0 +1,7 @@
+#define WARPIN_VERSION "0.9.12"
+#define MySQL.Major 3
+#define MySQL.Minor 23
+#define MySQL.Rev 40
+#define MySQL\VER 3\23\40
+#define MySQL.VER 3.23.40
+#define MySQL-VER 3-23-40
diff --git a/os2/readme.os2 b/os2/readme.os2
new file mode 100644
index 00000000000..9936dd15369
--- /dev/null
+++ b/os2/readme.os2
@@ -0,0 +1,190 @@
+MySQL 3.23.40 for OS/2 Warp build 1
+====================================================
+
+Contents
+--------
+Welcome to the latest port of MySQL for OS/2 and eComStation.
+
+Modules included in this build:
+ - protocol data compression
+ - transaction support
+ - perl BDB/BDI support (not in this package)
+ - Library and header files for C/CPP developers included
+
+This package has been built using IBM VAC++ 4.0
+
+The MySQL server is distributed under the GPL license. Please refer to
+the file COPYING for the license information.
+
+The MySQL client library is distributed under the LGPL license.
+Please refer to the file COPYING for the license information.
+
+Most of the MySQL clients are distributed under the GPL license, but
+some files may be in the public domain.
+
+The latest information about MySQL can be found at: http://www.mysql.com
+
+To get the latest information about this port please subscribe to our
+newsgroup/mailinglist mysql2 at www.egroups.com.
+
+To see what MySQL can do, take a look at the features section in the
+manual. For future plans see the TODO appendix in the manual.
+
+New features/bug fixes history is in the news appendix in the manual.
+
+For the currently known bugs/misfeatures (known errors) see the bugs
+appendix in the manual. The OS/2 section contains notes that are
+specific to the MySQL OS/2 and eComStation version.
+
+Please note that MySQL is a constantly moving target. New builds for
+Linux are made available every week. This port may therefore be a few
+minor versions after the latest Linux/Win32 builds but its generally
+more stable than the "latest and greates" port.
+
+MySQL is brought to you by: TcX DataKonsult AB & MySQL Finland AB
+
+This port is brought to you by:
+
+Yuri Dario <mc6530@mclink.it>, development, porting
+Timo Maier <tam@gmx.de>, documentation, testing
+John M Alfredsson <jma@jmast.se>, documentation, testing
+
+
+Installation
+------------
+Prerequisite:
+
+- OS/2 Warp 3 with FP ?? or later,
+ OS/2 Warp 4 with FP ?? or later,
+ OS/2 Warp Server for e-Business,
+ eComStation 1.0 (prev 1/2 OK)
+- TCPIP 4.x installed (requires 32-bit tcpip stack)
+- WarpIN installer 0.9.12 (ftp://ftp.os2.org/xworkplace/warpin-0-9-12.zip)
+
+Note: probably some fixpak level is required on both Warp3&Warp4 to
+ support >2GB file sizes.
+
+Save the installation archives into a temporary folder and double click
+on the main package; otherwise you can drop the mysql package in your
+WarpIN object or type
+
+ WARPIN MYSQL-3-23-??-B1.WPI
+
+from the command line.
+The configuration file for MySQL is named my.cnf and it is placed into
+your %ETC% directory. Usually it located into the boot driver under
+
+ x:\MPTN\ETC
+
+If the installation detect an existing configuration file, this will be
+renamed to my.cnf.bak; your current settings aren't migrated to current
+installation. This file is not deleted by uninstall process.
+Startup options for MySQL daemon could be added there.
+
+As default, client connections uses data compression: if you don't like it,
+remove the following from your %ETC%\my.cnf
+
+ [client]
+ compress
+
+The server switches automatically compression mode on client request.
+
+SMP systems: while my developement system is a SMP one, and here MySQL seems
+to run fine with two processors enabled, keep in mind that both EMX runtime
+and current thread model are not SMP safe.
+
+This release comes with DLL client library MYSQL.DLL: it is installed by
+default into mysql\bin together with client applications. Copy it to your
+x:\OS2\DLL or another directory in your LIBPATH to run command line
+utilities from every place.
+
+
+Documentation
+-------------
+Documentation is provided in separate files. You can use either
+the PDF documentation (requires Adobe Acrobat Reader) or the
+INF documentation (requires OS/2 view or NewView).
+
+The PDF documentation is found in MYSQL-3-23-28-PDF.WPI and
+the INF documentation is found in MYSQL-3-23-28-INF.WPI
+
+The latest documentation can always be downloaded from
+http://www.mysql.com. However this documentation may
+no fully apply to this port.
+The INF documentation could contain errors because of semi-automatic
+translation from texi original.
+
+Support
+-------
+Since MySQL is a OpenSource freeware product there are no
+formal support options available.
+
+Please subscribe to mysql2 at www.egroups.com to get in contact
+with other users using this port.
+
+http://www.egroups.com/group/mysql2
+
+This newsgroup/mailinglist is the official "home" of this port.
+
+
+Know problems
+-------------
+alter_table.test and show_check are failing, reporting a different status
+message: actually seems only a different text, no bugs in table checking.
+
+
+Apache/2 + PHP
+--------------
+To avoid problems with different socket when you use PHP and Apache
+webserver, get the PHP4 module from the Apache Server for OS/2 homepage
+http://silk.apana.org.au/apache/
+
+
+Developing MySQL
+----------------
+If you want to help us develop MySQL for OS2/eComStation please join
+the mysql2 mailinglist at www.egroups.com and ask for help to set up
+your environment!
+
+All questions that are specific to the OS2/eComStation version should
+be posted to this list! Please remember to include all relevant
+information that may help solve your problem.
+
+
+Building MySQL (EMX)
+--------------------
+NOTE: these instructions are outdated
+
+db-3.2.x: before compiling MySQL, you need to setup Berkeley DB. Untar
+the distribution, enter dist directory and run
+
+attrib -r * /s
+sh -c s_config
+
+to create proper aclocal macros and configure headers.
+
+In the src directory you will find patches used to build this release
+of MySQL.
+You can run 'sh -c config.status' to create current makefiles without
+running autoconf & configure.
+
+apply previous patches (if not already included)
+sh -c autoconf (upgrade scripts)
+sh -c configure.os2 (config system)
+edit config.status:
+ s%@MYSQL_UNIX_ADDR@%\\socket\\MySQL%g
+ s%@LN_CP_F@%cp.exe%g
+ replace -O2 -m486 with -mpentiumpro
+sh -c config.status (upgrade makefiles again)
+edit libmysql\Makefile
+ remove all occurences of -Zexe
+ replace libmysqlclient with libmysql (case sensitive search)
+edit client\Makefile
+ replace libmysqlclient with libmysql (case sensitive search)
+make
+
+After config.status, you have to edit include\mysql_version.h and correct
+the socket definition (\\socket\\MySQL is correct).
+If you go with configure, you have to change LN_CP_F macro from 'ln -s' to
+'cp' and correct all makefiles (sh -c config.status will do it).
+
diff --git a/os2/rint.cmd b/os2/rint.cmd
new file mode 100644
index 00000000000..522eff166bf
--- /dev/null
+++ b/os2/rint.cmd
@@ -0,0 +1,4 @@
+REM -DLONG_DOUBLE
+REM -DFLOAT
+REM none -> double
+gcc -Zomf -c -x assembler-with-cpp rint.s
diff --git a/os2/rint.obj b/os2/rint.obj
new file mode 100644
index 00000000000..41c766c6661
--- /dev/null
+++ b/os2/rint.obj
Binary files differ
diff --git a/os2/rint.s b/os2/rint.s
new file mode 100644
index 00000000000..7f6569ed72c
--- /dev/null
+++ b/os2/rint.s
@@ -0,0 +1,32 @@
+/ rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
+
+#include <emx/asm386.h>
+
+#define FUNC MATHSUFFIX2(rint)
+
+ .globl LABEL(FUNC)
+
+ .text
+
+ ALIGN
+
+/ double _rint (double x)
+
+#define cw1 0(%esp)
+#define cw2 2(%esp)
+/define ret_addr 4(%esp)
+#define x 8(%esp)
+
+LABEL(FUNC):
+ PROFILE_NOFRAME
+ subl $4, %esp
+ fstcww cw1
+ movw cw1, %ax
+ andw $0xf3ff, %ax /* round to nearest or even */
+ movw %ax, cw2
+ fldcww cw2
+ FLD x /* x */
+ frndint
+ fldcww cw1
+ addl $4, %esp
+ EPILOGUE(FUNC)
diff --git a/sql/field.cc b/sql/field.cc
index 894ef2ab013..01178efbdb1 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2295,7 +2295,7 @@ void Field_timestamp::store(longlong nr)
}
else
#endif
- longstore(ptr,timestamp);
+ longstore(ptr,(ulong)timestamp);
}
diff --git a/sql/field.h b/sql/field.h
index ee18d2fa7ae..fc0bfdc75d5 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -38,8 +38,8 @@ public:
static void operator delete(void *ptr_arg, size_t size) {} /*lint -e715 */
enum utype { NONE,DATE,SHIELD,NOEMPTY,CASEUP,PNR,BGNR,PGNR,YES,NO,REL,
- CHECK,EMPTY,UNKNOWN,CASEDN,NEXT_NUMBER,INTERVAL_FIELD,BIT_FIELD,
- TIMESTAMP_FIELD,CAPITALIZE,BLOB_FIELD};
+ CHECK,EMPTY,UNKNOWN_FIELD,CASEDN,NEXT_NUMBER,INTERVAL_FIELD,
+ BIT_FIELD, TIMESTAMP_FIELD,CAPITALIZE,BLOB_FIELD};
char *ptr; // Position to field in record
uchar *null_ptr; // Byte where null_bit is
uint8 null_bit; // And position to it
diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc
index 6bb43ec2970..5eee5c6163a 100644
--- a/sql/gen_lex_hash.cc
+++ b/sql/gen_lex_hash.cc
@@ -472,7 +472,7 @@ int main(int argc,char **argv)
int error;
MY_INIT(argv[0]);
- start_value=8214901L; best_t1=4099790L; best_t2=2406115L; best_type=4; /* mode=4799 add=2 type: 0 */
+ start_value=487844L; best_t1=4969454L; best_t2=2266538L; best_type=2; /* mode=4567 add=5 type: 0 */
if (get_options(argc,(char **) argv))
exit(1);
diff --git a/sql/hostname.cc b/sql/hostname.cc
index fed9e60b574..bc812341337 100644
--- a/sql/hostname.cc
+++ b/sql/hostname.cc
@@ -26,7 +26,7 @@
#ifdef __cplusplus
extern "C" { // Because of SCO 3.2V4.2
#endif
-#ifndef __WIN__
+#if !defined( __WIN__) && !defined(OS2)
#include <sys/resource.h>
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
diff --git a/sql/item_func.cc b/sql/item_func.cc
index ef3372629f6..989d7709513 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1489,8 +1489,14 @@ longlong Item_func_get_lock::val_int()
thd->mysys_var->current_cond= &ull->cond;
pthread_mutex_unlock(&thd->mysys_var->mutex);
+#ifdef HAVE_TIMESPEC_TS_SEC
+ abstime.ts_sec=time((time_t*) 0)+(time_t) timeout;
+ abstime.ts_nsec=0;
+#else
abstime.tv_sec=time((time_t*) 0)+(time_t) timeout;
abstime.tv_nsec=0;
+#endif
+
while ((error=pthread_cond_timedwait(&ull->cond,&LOCK_user_locks,&abstime))
!= ETIME && error != ETIMEDOUT && ull->locked)
{
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 80f72c30e57..bd7fde79629 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1009,8 +1009,8 @@ String *Item_func_encrypt::val_str(String *str)
if (arg_count == 1)
{ // generate random salt
time_t timestamp=current_thd->query_start();
- salt[0] = bin_to_ascii(timestamp & 0x3f);
- salt[1] = bin_to_ascii((timestamp >> 5) & 0x3f);
+ salt[0] = bin_to_ascii( (ulong) timestamp & 0x3f);
+ salt[1] = bin_to_ascii(( (ulong) timestamp >> 5) & 0x3f);
salt[2] = 0;
salt_ptr=salt;
}
@@ -1103,7 +1103,7 @@ void Item_func_soundex::fix_length_and_dec()
*/
extern "C" {
-extern char *soundex_map; // In mysys/static.c
+extern const char *soundex_map; // In mysys/static.c
}
static char get_scode(char *ptr)
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 1263d361b7f..41efa0f5658 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -55,7 +55,7 @@ int Log_event::write_header(IO_CACHE* file)
// make sure to change this when the header gets bigger
char buf[LOG_EVENT_HEADER_LEN];
char* pos = buf;
- int4store(pos, when); // timestamp
+ int4store(pos, (ulong) when); // timestamp
pos += 4;
*pos++ = get_type_code(); // event type code
int4store(pos, server_id);
diff --git a/sql/md5.c b/sql/md5.c
index 0775ba3bd1a..4c2e80107b8 100644
--- a/sql/md5.c
+++ b/sql/md5.c
@@ -123,10 +123,10 @@ void MD5Init (MD5_CTX *context) /* context */
operation, processing another message block, and updating the
context.
*/
-void MD5Update (context, input, inputLen)
-MD5_CTX *context; /* context */
-unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
+void MD5Update (
+MD5_CTX *context, /* context */
+unsigned char *input, /* input block */
+unsigned int inputLen) /* length of input block */
{
unsigned int i, idx, partLen;
@@ -164,9 +164,9 @@ unsigned int inputLen; /* length of input block */
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
-void MD5Final (digest, context)
-unsigned char digest[16]; /* message digest */
-MD5_CTX *context; /* context */
+void MD5Final (
+unsigned char digest[16], /* message digest */
+MD5_CTX *context) /* context */
{
unsigned char bits[8];
unsigned int idx, padLen;
@@ -193,9 +193,9 @@ MD5_CTX *context; /* context */
/* MD5 basic transformation. Transforms state based on block.
*/
-static void MD5Transform (state, block)
-UINT4 state[4];
-unsigned char block[64];
+static void MD5Transform (
+UINT4 state[4],
+unsigned char block[64])
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
@@ -287,10 +287,10 @@ unsigned char block[64];
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
a multiple of 4.
*/
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
+static void Encode (
+unsigned char *output,
+UINT4 *input,
+unsigned int len)
{
unsigned int i, j;
@@ -306,10 +306,10 @@ unsigned int len;
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
a multiple of 4.
*/
-static void Decode (output, input, len)
-UINT4 *output;
-unsigned char *input;
-unsigned int len;
+static void Decode (
+UINT4 *output,
+unsigned char *input,
+unsigned int len)
{
unsigned int i, j;
diff --git a/sql/mini_client.cc b/sql/mini_client.cc
index 2886b6e02d2..88a02e227a3 100644
--- a/sql/mini_client.cc
+++ b/sql/mini_client.cc
@@ -82,6 +82,9 @@ static void mc_free_old_query(MYSQL *mysql);
#if defined(MSDOS) || defined(__WIN__)
#define ERRNO WSAGetLastError()
#define perror(A)
+#elif defined(OS2)
+#define ERRNO sock_errno()
+#define SOCKET_ERROR -1
#else
#include <sys/errno.h>
#define ERRNO errno
@@ -235,7 +238,7 @@ static void mc_free_old_query(MYSQL *mysql)
static int mc_sock_connect(my_socket s, const struct sockaddr *name,
uint namelen, uint to)
{
-#if defined(__WIN__)
+#if defined(__WIN__) || defined(OS2)
return connect(s, (struct sockaddr*) name, namelen);
#else
int flags, res, s_err;
@@ -330,18 +333,18 @@ mc_net_safe_read(MYSQL *mysql)
{
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
vio_description(net->vio),len));
- if(errno != EINTR)
+ if (socket_errno != EINTR)
+ {
+ mc_end_server(mysql);
+ if(net->last_errno != ER_NET_PACKET_TOO_LARGE)
{
- mc_end_server(mysql);
- if(net->last_errno != ER_NET_PACKET_TOO_LARGE)
- {
- net->last_errno=CR_SERVER_LOST;
- strmov(net->last_error,ER(net->last_errno));
- }
- else
- strmov(net->last_error, "Packet too large - increase \
+ net->last_errno=CR_SERVER_LOST;
+ strmov(net->last_error,ER(net->last_errno));
+ }
+ else
+ strmov(net->last_error, "Packet too large - increase \
max_allowed_packet on this server");
- }
+ }
return(packet_error);
}
if (net->read_pos[0] == 255)
@@ -451,7 +454,7 @@ mc_simple_command(MYSQL *mysql,enum enum_server_command command,
if (net_write_command(net,(uchar) command,arg,
length ? length :(uint) strlen(arg)))
{
- DBUG_PRINT("error",("Can't send command to server. Error: %d",errno));
+ DBUG_PRINT("error",("Can't send command to server. Error: %d",socket_errno));
mc_end_server(mysql);
if (mc_mysql_reconnect(mysql) ||
net_write_command(net,(uchar) command,arg,
@@ -535,9 +538,9 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
if (mc_sock_connect(sock,(struct sockaddr *) &UNIXaddr, sizeof(UNIXaddr),
mysql->options.connect_timeout) <0)
{
- DBUG_PRINT("error",("Got error %d on connect to local server",ERRNO));
+ DBUG_PRINT("error",("Got error %d on connect to local server",socket_errno));
net->last_errno=CR_CONNECTION_ERROR;
- sprintf(net->last_error,ER(net->last_errno),unix_socket,ERRNO);
+ sprintf(net->last_error,ER(net->last_errno),unix_socket,socket_errno);
goto error;
}
}
@@ -585,7 +588,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
if ((sock = socket(AF_INET,SOCK_STREAM,0)) == SOCKET_ERROR)
{
net->last_errno=CR_IPSOCK_ERROR;
- sprintf(net->last_error,ER(net->last_errno),ERRNO);
+ sprintf(net->last_error,ER(net->last_errno),socket_errno);
goto error;
}
net->vio = vio_new(sock,VIO_TYPE_TCPIP,FALSE);
@@ -622,7 +625,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
if (!(hp=gethostbyname(host)))
{
net->last_errno=CR_UNKNOWN_HOST;
- sprintf(net->last_error, ER(CR_UNKNOWN_HOST), host, errno);
+ sprintf(net->last_error, ER(CR_UNKNOWN_HOST), host, socket_errno);
goto error;
}
memcpy(&sock_addr.sin_addr,hp->h_addr, (size_t) hp->h_length);
@@ -630,11 +633,12 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
#endif
sock_addr.sin_port = (ushort) htons((ushort) port);
if (mc_sock_connect(sock,(struct sockaddr *) &sock_addr, sizeof(sock_addr),
- mysql->options.connect_timeout) <0)
+ mysql->options.connect_timeout) <0)
{
- DBUG_PRINT("error",("Got error %d on connect to '%s'",ERRNO,host));
+ DBUG_PRINT("error",("Got error %d on connect to '%s'",
+ socket_errno,host));
net->last_errno= CR_CONN_HOST_ERROR;
- sprintf(net->last_error ,ER(CR_CONN_HOST_ERROR), host, ERRNO);
+ sprintf(net->last_error ,ER(CR_CONN_HOST_ERROR), host, socket_errno);
if (thr_alarm_in_use(&alarmed))
thr_end_alarm(&alarmed);
goto error;
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 19af3af8c68..06d0b1528f4 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -28,7 +28,9 @@
#include <my_bitmap.h>
#include <violite.h>
+#ifdef __EMX__
#undef write // remove pthread.h macro definition for EMX
+#endif
typedef ulong table_map; /* Used for table bits in join */
typedef ulong key_map; /* Used for finding keys */
@@ -110,7 +112,7 @@ void kill_one_thread(THD *thd, ulong id);
#define FLUSH_TIME 0 /* Don't flush tables */
#define MAX_CONNECT_ERRORS 10 // errors before disabling host
-#ifdef __WIN__
+#if defined(__WIN__) || defined(OS2)
#define IF_WIN(A,B) (A)
#undef FLUSH_TIME
#define FLUSH_TIME 1800 /* Flush every half hour */
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 57e65025c8f..35aeaecc6e1 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -57,7 +57,9 @@ extern "C" { // Because of SCO 3.2V4.2
#include <grp.h>
#endif
-#ifndef __WIN__
+#if defined(OS2)
+# include <sys/un.h>
+#elif !defined( __WIN__)
#include <sys/resource.h>
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
@@ -358,6 +360,10 @@ HANDLE hEventShutdown;
static NTService Service; // Service object for WinNT
#endif
+#ifdef OS2
+pthread_cond_t eventShutdown;
+#endif
+
static void start_signal_handler(void);
static void *signal_hand(void *arg);
static void set_options(void);
@@ -405,7 +411,7 @@ static void close_connections(void)
(void) pthread_mutex_unlock(&LOCK_manager);
/* kill connection thread */
-#if !defined(__WIN__) && !defined(__EMX__)
+#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
DBUG_PRINT("quit",("waiting for select thread: %lx",select_thread));
(void) pthread_mutex_lock(&LOCK_thread_count);
@@ -576,6 +582,8 @@ void kill_mysql(void)
// SetEvent(hEventShutdown);
// CloseHandle(hEvent);
}
+#elif defined(OS2)
+ pthread_cond_signal( &eventShutdown); // post semaphore
#elif defined(HAVE_PTHREAD_KILL)
if (pthread_kill(signal_thread,MYSQL_KILL_SIGNAL))// End everything nicely
{
@@ -592,7 +600,10 @@ void kill_mysql(void)
/* Force server down. kill all connections and threads and exit */
-#ifndef __WIN__
+#if defined(OS2)
+extern "C" void kill_server(int sig_ptr)
+#define RETURN_FROM_KILL_SERVER return
+#elif !defined(__WIN__)
static void *kill_server(void *sig_ptr)
#define RETURN_FROM_KILL_SERVER return 0
#else
@@ -615,7 +626,7 @@ static void __cdecl kill_server(int sig_ptr)
else
sql_print_error(ER(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */
-#if defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__)
+#if defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__) && !defined(OS2)
my_thread_init(); // If this is a new thread
#endif
close_connections();
@@ -623,7 +634,9 @@ static void __cdecl kill_server(int sig_ptr)
unireg_abort(1); /* purecov: inspected */
else
unireg_end(0);
+#ifndef OS2
pthread_exit(0); /* purecov: deadcode */
+#endif
RETURN_FROM_KILL_SERVER;
}
@@ -645,7 +658,7 @@ static sig_handler print_signal_warning(int sig)
#ifdef DONT_REMEMBER_SIGNAL
sigset(sig,print_signal_warning); /* int. thread system calls */
#endif
-#ifndef __WIN__
+#if !defined(__WIN__) && !defined(OS2)
if (sig == SIGALRM)
alarm(2); /* reschedule alarm */
#endif
@@ -655,7 +668,9 @@ static sig_handler print_signal_warning(int sig)
void unireg_end(int signal_number __attribute__((unused)))
{
clean_up();
+#ifndef OS2
pthread_exit(0); // Exit is in main thread
+#endif
}
@@ -746,7 +761,7 @@ static void set_ports()
static void set_user(const char *user)
{
-#ifndef __WIN__
+#if !defined(__WIN__) && !defined(OS2)
struct passwd *ent;
// don't bother if we aren't superuser
@@ -794,7 +809,7 @@ static void set_user(const char *user)
static void set_root(const char *path)
{
-#if !defined(__WIN__) && !defined(__EMX__)
+#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
if (chroot(path) == -1)
{
sql_perror("chroot");
@@ -853,7 +868,7 @@ static void server_init(void)
}
if (listen(ip_sock,(int) back_log) < 0)
sql_print_error("Warning: listen() on TCP/IP failed with error %d",
- errno);
+ socket_errno);
}
if (mysqld_chroot)
@@ -940,7 +955,7 @@ static void server_init(void)
#endif
if (listen(unix_sock,(int) back_log) < 0)
sql_print_error("Warning: listen() on Unix socket failed with error %d",
- errno);
+ socket_errno);
}
#endif
DBUG_PRINT("info",("server started"));
@@ -1088,13 +1103,17 @@ static sig_handler abort_thread(int sig __attribute__((unused)))
** the signal thread is ready before continuing
******************************************************************************/
-#ifdef __WIN__
+#if defined(__WIN__) || defined(OS2)
static void init_signals(void)
{
int signals[] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGABRT } ;
for (uint i=0 ; i < sizeof(signals)/sizeof(int) ; i++)
signal( signals[i], kill_server) ;
+#if defined(__WIN__)
signal(SIGBREAK,SIG_IGN); //ignore SIGBREAK for NT
+#else
+ signal(SIGBREAK, kill_server);
+#endif
}
static void start_signal_handler(void)
@@ -1473,6 +1492,29 @@ int __stdcall handle_kill(ulong ctrl_type)
}
#endif
+#ifdef OS2
+pthread_handler_decl(handle_shutdown,arg)
+{
+ my_thread_init();
+
+ // wait semaphore
+ pthread_cond_wait( &eventShutdown, NULL);
+
+ // close semaphore and kill server
+ pthread_cond_destroy( &eventShutdown);
+
+ // exit main loop on main thread, so kill will be done from
+ // main thread (this is thread 2)
+ abort_loop = 1;
+
+ // unblock select()
+ so_cancel( ip_sock);
+ so_cancel( unix_sock);
+
+ return 0;
+}
+#endif
+
const char *load_default_groups[]= { "mysqld","server",0 };
#ifdef HAVE_LIBWRAP
@@ -1558,7 +1600,7 @@ int main(int argc, char **argv)
load_defaults("my",load_default_groups,&argc,&argv);
defaults_argv=argv;
mysql_tmpdir=getenv("TMPDIR"); /* Use this if possible */
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
if (!mysql_tmpdir)
mysql_tmpdir=getenv("TEMP");
if (!mysql_tmpdir)
@@ -1646,7 +1688,7 @@ int main(int argc, char **argv)
my_pthread_attr_setprio(&connection_attrib,WAIT_PRIOR);
pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_SYSTEM);
-#ifdef SET_RLIMIT_NOFILE
+#if defined( SET_RLIMIT_NOFILE) || defined( OS2)
/* connections and databases neads lots of files */
{
uint wanted_files=10+(uint) max(max_connections*5,
@@ -1854,6 +1896,14 @@ The server will not act as a slave.");
Service.SetShutdownEvent(hEventShutdown);
}
#endif
+#ifdef OS2
+ {
+ pthread_cond_init( &eventShutdown, NULL);
+ pthread_t hThread;
+ if (pthread_create(&hThread,&connection_attrib,handle_shutdown,0))
+ sql_print_error("Warning: Can't create thread to handle shutdown requests");
+ }
+#endif
if (
#ifdef HAVE_BERKELEY_DB
@@ -2192,8 +2242,10 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
}
#ifdef HAVE_SYS_UN_H
FD_SET(unix_sock,&clientFDs);
+#ifdef HAVE_FCNTL
socket_flags=fcntl(unix_sock, F_GETFL, 0);
#endif
+#endif
DBUG_PRINT("general",("Waiting for connections."));
while (!abort_loop)
@@ -2205,10 +2257,10 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
#else
if (select((int) max_used_connection,&readFDs,0,0,0) < 0)
{
- if (errno != EINTR)
+ if (socket_errno != EINTR)
{
if (!select_errors++ && !abort_loop) /* purecov: inspected */
- sql_print_error("mysqld: Got error %d from select",errno); /* purecov: inspected */
+ sql_print_error("mysqld: Got error %d from select",socket_errno); /* purecov: inspected */
}
continue;
}
@@ -2344,6 +2396,11 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
create_new_thread(thd);
}
+#ifdef OS2
+ // kill server must be invoked from thread 1!
+ kill_server(MYSQL_KILL_SIGNAL);
+#endif
+
#ifdef __NT__
pthread_mutex_lock(&LOCK_thread_count);
handler_count--;
@@ -4385,6 +4442,29 @@ static uint set_maximum_open_files(uint max_file_limit)
}
#endif
+#ifdef OS2
+static uint set_maximum_open_files(uint max_file_limit)
+{
+ LONG cbReqCount;
+ ULONG cbCurMaxFH, cbCurMaxFH0;
+ APIRET ulrc;
+
+ // get current limit
+ cbReqCount = 0;
+ DosSetRelMaxFH( &cbReqCount, &cbCurMaxFH0);
+
+ // set new limit
+ cbReqCount = max_file_limit - cbCurMaxFH0;
+ ulrc = DosSetRelMaxFH( &cbReqCount, &cbCurMaxFH);
+ if (ulrc) {
+ sql_print_error("Warning: DosSetRelMaxFH couldn't increase number of open files to more than %d",
+ cbCurMaxFH0);
+ cbCurMaxFH = cbCurMaxFH0;
+ }
+
+ return cbCurMaxFH;
+}
+#endif
/*
Return a bitfield from a string of substrings separated by ','
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 4c4642034e1..ba0944a2516 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -50,7 +50,7 @@ ulong net_buffer_length=8192; /* Default length. Enlarged if necessary */
#if !defined(__WIN__) && !defined(MSDOS)
#include <sys/socket.h>
#else
-#undef MYSQL_SERVER // Win32 can't handle interrupts
+#undef MYSQL_SERVER /* Win32 can't handle interrupts */
#endif
#if !defined(MSDOS) && !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__)
#include <netinet/in_systm.h>
@@ -68,9 +68,15 @@ void sql_print_error(const char *format,...);
#define RETRY_COUNT mysqld_net_retry_count
extern ulong mysqld_net_retry_count;
#else
+
+#ifdef OS2 /* avoid name conflict */
+#define thr_alarm_t thr_alarm_t_net
+#define ALARM ALARM_net
+#endif
+
typedef my_bool thr_alarm_t;
typedef my_bool ALARM;
-#define thr_alarm_init(A) (*A)=0
+#define thr_alarm_init(A) (*(A))=0
#define thr_alarm_in_use(A) (*(A))
#define thr_end_alarm(A)
#define thr_alarm(A,B,C) local_thr_alarm((A),(B),(C))
@@ -124,7 +130,7 @@ int my_net_init(NET *net, Vio* vio)
if (vio != 0) /* If real connection */
{
net->fd = vio_fd(vio); /* For perl DBI/DBD */
-#if defined(MYSQL_SERVER) && !defined(___WIN__) && !defined(__EMX__)
+#if defined(MYSQL_SERVER) && !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
if (!(test_flags & TEST_BLOCKING))
vio_blocking(vio, FALSE);
#endif
@@ -271,7 +277,7 @@ net_real_write(NET *net,const char *packet,ulong len)
int length;
char *pos,*end;
thr_alarm_t alarmed;
-#if !defined(__WIN__)
+#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
ALARM alarm_buff;
#endif
uint retry_count=0;
@@ -329,7 +335,7 @@ net_real_write(NET *net,const char *packet,ulong len)
if ((int) (length=vio_write(net->vio,pos,(int) (end-pos))) <= 0)
{
my_bool interrupted = vio_should_retry(net->vio);
-#if (!defined(__WIN__) && !defined(__EMX__))
+#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2))
if ((interrupted || length==0) && !thr_alarm_in_use(&alarmed))
{
if (!thr_alarm(&alarmed,(uint) net_write_timeout,&alarm_buff))
@@ -418,7 +424,7 @@ static void my_net_skip_rest(NET *net, ulong remain, thr_alarm_t *alarmed)
{
if (!thr_alarm(alarmed,net->timeout,&alarm_buff) ||
(!vio_is_blocking(net->vio) && vio_blocking(net->vio,TRUE) < 0))
- return; // Can't setup, abort
+ return; /* Can't setup, abort */
}
while (remain > 0)
{
@@ -448,7 +454,7 @@ my_real_read(NET *net, ulong *complen)
uint i,retry_count=0;
ulong len=packet_error;
thr_alarm_t alarmed;
-#if (!defined(__WIN__) && !defined(__EMX__)) || defined(MYSQL_SERVER)
+#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER)
ALARM alarm_buff;
#endif
my_bool net_blocking=vio_is_blocking(net->vio);
@@ -475,7 +481,7 @@ my_real_read(NET *net, ulong *complen)
DBUG_PRINT("info",("vio_read returned %d, errno: %d",
length, vio_errno(net->vio)));
-#if (!defined(__WIN__) && !defined(__EMX__)) || defined(MYSQL_SERVER)
+#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER)
/*
We got an error that there was no data on the socket. We now set up
an alarm to not 'read forever', change the socket to non blocking
diff --git a/sql/slave.cc b/sql/slave.cc
index 7cb9bdfd3fc..f6e8822ea14 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -703,7 +703,7 @@ static int init_slave_thread(THD* thd)
thd->mysys_var=my_thread_var;
thd->dbug_thread_id=my_thread_id();
-#ifndef __WIN__
+#if !defined(__WIN__) && !defined(OS2)
sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index a38829f3605..d885d308770 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1401,7 +1401,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
{
int error;
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
/* Win32 can't drop a file that is open */
if (lock_type == TL_WRITE_ALLOW_READ
#ifdef HAVE_GEMINI_DB
@@ -1411,7 +1411,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
{
lock_type= TL_WRITE;
}
-#endif /* __WIN__ */
+#endif /* __WIN__ || OS2 */
table_list->table=table;
table->grant= table_list->grant;
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 7cd892f6079..d0300b57bdb 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -338,7 +338,9 @@ bool mysql_change_db(THD *thd,const char *name)
}
(void) sprintf(path,"%s/%s",mysql_data_home,dbname);
- unpack_dirname(path,path); // Convert if not unix
+ length=unpack_dirname(path,path); // Convert if not unix
+ if (length && path[length-1] == FN_LIBCHAR)
+ path[length-1]=0; // remove ending '\'
if (access(path,F_OK))
{
net_printf(&thd->net,ER_BAD_DB_ERROR,dbname);
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 50e4a6dedd4..c14fbda3bc5 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -876,7 +876,7 @@ static pthread_handler_decl(handle_delayed_insert,arg)
pthread_mutex_unlock(&LOCK_thread_count);
pthread_mutex_lock(&di->mutex);
-#ifndef __WIN__ /* Win32 calls this in pthread_create */
+#if !defined( __WIN__) && !defined(OS2) /* Win32 calls this in pthread_create */
if (my_thread_init())
{
strmov(thd->net.last_error,ER(thd->net.last_errno=ER_OUT_OF_RESOURCES));
@@ -895,7 +895,7 @@ static pthread_handler_decl(handle_delayed_insert,arg)
}
thd->mysys_var=my_thread_var;
thd->dbug_thread_id=my_thread_id();
-#ifndef __WIN__
+#if !defined(__WIN__) && !defined(OS2)
sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index ce8e34b9265..274b1814674 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -156,7 +156,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
else
{
unpack_filename(name,ex->file_name);
-#ifndef __WIN__
+#if !defined(__WIN__) && !defined(OS2)
MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(MY_WME)))
DBUG_RETURN(-1);
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 796b571722f..2e5333925e7 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -62,9 +62,13 @@ extern VioSSLAcceptorFd* ssl_acceptor_fd;
#ifdef __WIN__
static void test_signal(int sig_ptr)
{
-#ifndef DBUG_OFF
+#if !defined( DBUG_OFF)
MessageBox(NULL,"Test signal","DBUG",MB_OK);
#endif
+#if defined(OS2)
+ fprintf( stderr, "Test signal %d\n", sig_ptr);
+ fflush( stderr);
+#endif
}
static void init_signals(void)
{
@@ -477,7 +481,7 @@ pthread_handler_decl(handle_one_connection,arg)
pthread_detach_this_thread();
-#ifndef __WIN__ /* Win32 calls this in pthread_create */
+#if !defined( __WIN__) && !defined(OS2) /* Win32 calls this in pthread_create */
if (my_thread_init()) // needed to be called first before we call
// DBUG_ macros
{
@@ -499,9 +503,9 @@ pthread_handler_decl(handle_one_connection,arg)
thd->thread_id));
// now that we've called my_thread_init(), it is safe to call DBUG_*
-#ifdef __WIN__
+#if defined(__WIN__)
init_signals(); // IRENA; testing ?
-#else
+#elif !defined(OS2)
sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
@@ -602,7 +606,7 @@ pthread_handler_decl(handle_bootstrap,arg)
thd->thread_stack= (char*) &thd;
thd->mysys_var=my_thread_var;
thd->dbug_thread_id=my_thread_id();
-#ifndef __WIN__
+#if !defined(__WIN__) && !defined(OS2)
sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
@@ -940,7 +944,9 @@ bool do_command(THD *thd)
#ifdef __WIN__
sleep(1); // must wait after eof()
#endif
+#ifndef OS2
send_eof(net); // This is for 'quit request'
+#endif
close_connection(net);
close_thread_tables(thd); // Free before kill
free_root(&thd->mem_root,MYF(0));
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 1728427370f..5c3d8def542 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1073,19 +1073,31 @@ int mysql_optimize_table(THD* thd, TABLE_LIST* tables, HA_CHECK_OPT* check_opt)
int mysql_analyze_table(THD* thd, TABLE_LIST* tables, HA_CHECK_OPT* check_opt)
{
+#ifdef OS2
+ thr_lock_type lock_type = TL_WRITE;
+#else
+ thr_lock_type lock_type = TL_READ_NO_INSERT;
+#endif
+
DBUG_ENTER("mysql_analyze_table");
DBUG_RETURN(mysql_admin_table(thd, tables, check_opt,
- "analyze",TL_READ_NO_INSERT, 1,0,0,
+ "analyze", lock_type, 1,0,0,
&handler::analyze));
}
int mysql_check_table(THD* thd, TABLE_LIST* tables,HA_CHECK_OPT* check_opt)
{
+#ifdef OS2
+ thr_lock_type lock_type = TL_WRITE;
+#else
+ thr_lock_type lock_type = TL_READ_NO_INSERT;
+#endif
+
DBUG_ENTER("mysql_check_table");
DBUG_RETURN(mysql_admin_table(thd, tables, check_opt,
- "check",
- TL_READ_NO_INSERT, 0, 0, HA_OPEN_FOR_REPAIR,
+ "check", lock_type,
+ 0, 0, HA_OPEN_FOR_REPAIR,
&handler::check));
}
@@ -1543,7 +1555,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
}
-#if defined( __WIN__) || defined( __EMX__)
+#if defined( __WIN__) || defined( __EMX__) || defined( OS2)
// Win32 can't rename an open table, so we must close the org table!
table_name=thd->strdup(table_name); // must be saved
if (close_cached_table(thd,table))
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 2ba937be50a..8184ae3b15e 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -53,7 +53,7 @@ extern "C"
FreeLibrary((HMODULE)lib);
}
-#else
+#elif !defined(OS2)
#include <dlfcn.h>
#endif
diff --git a/sql/violite.c b/sql/violite.c
index 902110ff072..aff4224e5a3 100644
--- a/sql/violite.c
+++ b/sql/violite.c
@@ -39,7 +39,7 @@
#include <sys/ioctl.h>
#endif
-#if defined(__EMX__)
+#if defined(__EMX__) || defined(OS2)
#define ioctlsocket ioctl
#endif /* defined(__EMX__) */
@@ -105,7 +105,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
sprintf(vio->desc,
(vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"),
vio->sd);
-#if !defined(___WIN__) && !defined(__EMX__)
+#if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK)
vio->fcntl_mode = fcntl(sd, F_GETFL);
#elif defined(HAVE_SYS_IOCTL_H) /* hpux */
@@ -116,7 +116,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
{
/* set to blocking mode by default */
ulong arg=0, r;
- r = ioctlsocket(sd,FIONBIO,(void*) &arg, sizeof(arg));
+ r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg, sizeof(arg));
}
#endif
}
@@ -154,7 +154,7 @@ void vio_delete(Vio * vio)
int vio_errno(Vio *vio __attribute__((unused)))
{
- return errno; /* On Win32 this mapped to WSAGetLastError() */
+ return socket_errno; /* On Win32 this mapped to WSAGetLastError() */
}
@@ -163,12 +163,17 @@ int vio_read(Vio * vio, gptr buf, int size)
int r;
DBUG_ENTER("vio_read");
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size));
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
if (vio->type == VIO_TYPE_NAMEDPIPE)
{
DWORD length;
+#ifdef OS2
+ if (!DosRead((HFILE)vio->hPipe, buf, size, &length))
+ DBUG_RETURN(-1);
+#else
if (!ReadFile(vio->hPipe, buf, size, &length, NULL))
DBUG_RETURN(-1);
+#endif
DBUG_RETURN(length);
}
r = recv(vio->sd, buf, size,0);
@@ -179,7 +184,7 @@ int vio_read(Vio * vio, gptr buf, int size)
#ifndef DBUG_OFF
if (r < 0)
{
- DBUG_PRINT("vio_error", ("Got error %d during read",errno));
+ DBUG_PRINT("vio_error", ("Got error %d during read",socket_errno));
}
#endif /* DBUG_OFF */
DBUG_PRINT("exit", ("%d", r));
@@ -192,12 +197,17 @@ int vio_write(Vio * vio, const gptr buf, int size)
int r;
DBUG_ENTER("vio_write");
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size));
-#ifdef __WIN__
+#if defined( __WIN__) || defined(OS2)
if ( vio->type == VIO_TYPE_NAMEDPIPE)
{
DWORD length;
+#ifdef OS2
+ if (!DosWrite((HFILE)vio->hPipe, (char*) buf, size, &length))
+ DBUG_RETURN(-1);
+#else
if (!WriteFile(vio->hPipe, (char*) buf, size, &length, NULL))
DBUG_RETURN(-1);
+#endif
DBUG_RETURN(length);
}
r = send(vio->sd, buf, size,0);
@@ -207,7 +217,7 @@ int vio_write(Vio * vio, const gptr buf, int size)
#ifndef DBUG_OFF
if (r < 0)
{
- DBUG_PRINT("vio_error", ("Got error on write: %d",errno));
+ DBUG_PRINT("vio_error", ("Got error on write: %d",socket_errno));
}
#endif /* DBUG_OFF */
DBUG_PRINT("exit", ("%d", r));
@@ -221,7 +231,7 @@ int vio_blocking(Vio * vio, my_bool set_blocking_mode)
DBUG_ENTER("vio_blocking");
DBUG_PRINT("enter", ("set_blocking_mode: %d", (int) set_blocking_mode));
-#if !defined(___WIN__) && !defined(__EMX__)
+#if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK)
if (vio->sd >= 0)
@@ -346,7 +356,7 @@ int vio_close(Vio * vio)
}
if (r)
{
- DBUG_PRINT("vio_error", ("close() failed, error: %d",errno));
+ DBUG_PRINT("vio_error", ("close() failed, error: %d",socket_errno));
/* FIXME: error handling (not critical for MySQL) */
}
vio->type= VIO_CLOSED;
@@ -385,7 +395,7 @@ my_bool vio_peer_addr(Vio * vio, char *buf)
if (getpeername(vio->sd, (struct sockaddr *) (& (vio->remote)),
&addrLen) != 0)
{
- DBUG_PRINT("exit", ("getpeername, error: %d", errno));
+ DBUG_PRINT("exit", ("getpeername, error: %d", socket_errno));
DBUG_RETURN(1);
}
my_inet_ntoa(vio->remote.sin_addr,buf);
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 1fb98273fec..cccf6730046 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -236,7 +236,7 @@ int my_strnncoll_big5(const uchar * s1, int len1, const uchar * s2, int len2)
return (int) (len1-len2);
}
-int my_strnxfrm_big5(uchar * dest, uchar * src, int len, int srclen)
+int my_strnxfrm_big5(uchar * dest, const uchar * src, int len, int srclen)
{
uint16 e;
/*uchar *d = dest; XXX: unused*/
@@ -276,7 +276,7 @@ int my_strcoll_big5(const uchar * s1, const uchar * s2)
return 0;
}
-int my_strxfrm_big5(uchar * dest, uchar * src, int len)
+int my_strxfrm_big5(uchar * dest, const uchar * src, int len)
{
uint16 e;
uchar *d = dest;
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 9628f21b8d4..a5d55789bb8 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -2610,7 +2610,7 @@ int my_strcoll_gbk(const uchar * s1, const uchar * s2)
s2, (uint) strlen((char*) s2));
}
-int my_strnxfrm_gbk(uchar * dest, uchar * src, int len, int srclen)
+int my_strnxfrm_gbk(uchar * dest, const uchar * src, int len, int srclen)
{
uint16 e;
@@ -2630,7 +2630,7 @@ int my_strnxfrm_gbk(uchar * dest, uchar * src, int len, int srclen)
return srclen;
}
-int my_strxfrm_gbk(uchar * dest, uchar * src, int len)
+int my_strxfrm_gbk(uchar * dest, const uchar * src, int len)
{
return my_strnxfrm_gbk(dest,src,len,(uint) strlen((char*) src));
}
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 9a5a91f9265..566271be845 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -228,10 +228,10 @@ int my_strcoll_sjis(const uchar *s1, const uchar *s2)
s2,(uint) strlen((char*) s2));
}
-int my_strnxfrm_sjis(uchar *dest, uchar *src, int len, int srclen)
+int my_strnxfrm_sjis(uchar *dest, const uchar *src, int len, int srclen)
{
uchar *d_end = dest + len;
- uchar *s_end = src + srclen;
+ uchar *s_end = (uchar*) src + srclen;
while (dest < d_end && src < s_end) {
if (ismbchar_sjis((char*) src, (char*) s_end)) {
*dest++ = *src++;
@@ -244,7 +244,7 @@ int my_strnxfrm_sjis(uchar *dest, uchar *src, int len, int srclen)
return srclen;
}
-int my_strxfrm_sjis(uchar *dest, uchar *src, int len)
+int my_strxfrm_sjis(uchar *dest, const uchar *src, int len)
{
return my_strnxfrm_sjis(dest, src, len, (uint) strlen((char*) src));
}
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 321487c85cb..1c0acc38e24 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -535,7 +535,7 @@ int my_strnncoll_tis620(const uchar * s1, int len1, const uchar * s2, int len2)
Arg: Destination buffer, source string, dest length and source length
Ret: Conveted string size
*/
-int my_strnxfrm_tis620(uchar * dest, uchar * src, int len, int srclen)
+int my_strnxfrm_tis620(uchar * dest, const uchar * src, int len, int srclen)
{
uint bufSize;
uchar *tmp;
@@ -567,7 +567,7 @@ int my_strcoll_tis620(const uchar * s1, const uchar * s2)
Arg: Destination buffer, String and dest buffer size
Ret: Converting string size
*/
-int my_strxfrm_tis620(uchar * dest, uchar * src, int len)
+int my_strxfrm_tis620(uchar * dest, const uchar * src, int len)
{
uint bufSize;
uchar *tmp;
diff --git a/strings/ctype.c b/strings/ctype.c
index 16b652d42f1..d6f02ec5054 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -47,7 +47,7 @@ CHARSET_INFO *find_compiled_charset_by_name(const char *name)
return NULL;
}
-uint8 compiled_charset_number(const char *name)
+uint compiled_charset_number(const char *name)
{
CHARSET_INFO *cs;
for (cs = compiled_charsets; cs->number > 0; cs++)
@@ -57,7 +57,7 @@ uint8 compiled_charset_number(const char *name)
return 0; /* this mimics find_type() */
}
-const char *compiled_charset_name(uint8 charset_number)
+const char *compiled_charset_name(uint charset_number)
{
CHARSET_INFO *cs;
for (cs = compiled_charsets; cs->number > 0; cs++)
diff --git a/strings/strnlen.c b/strings/strnlen.c
index 6eb872ee08d..3d625f7d48a 100644
--- a/strings/strnlen.c
+++ b/strings/strnlen.c
@@ -29,7 +29,7 @@
uint strnlen(register const char *s, register uint maxlen)
{
- const char *end= memchr(s, '\0', maxlen);
+ const char *end= (const char *)memchr(s, '\0', maxlen);
return end ? (uint) (end - s) : maxlen;
}