diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-31 03:22:31 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-31 03:22:31 +0200 |
commit | 4765ab612ca4f5ee35c413437f7da04889bd0a14 (patch) | |
tree | a7cd1bf6f7f295d11ffce88081f69bc1963bfd06 | |
parent | bacf546eaaa2666a1634ea224af2c53cb17dcfb9 (diff) | |
download | mariadb-git-4765ab612ca4f5ee35c413437f7da04889bd0a14.tar.gz |
Update for OS2 (patch from Yuri Dario).
Use LONG_TIMEOUT (one year) instead of ~0 for long timeouts
Fixed error messages.
Fixed problem with const propagation when comparing columns of different types
BitKeeper/deleted/.del-.cvsignore~a91d63182f0b2366:
Delete: sql/share/norwegian/.cvsignore
BitKeeper/deleted/.del-.cvsignore~469064b5190d703d:
Delete: sql/share/norwegian-ny/.cvsignore
Docs/manual.texi:
Changelog
client/client_priv.h:
Update for OS2
client/mysqldump.c:
Update for OS2
include/mysqld_error.h:
Updated error texts
isam/create.c:
Removed warning
myisam/myisamchk.c:
Fix for OS2
myisam/myisampack.c:
Fix for OS2
mysys/mf_cache.c:
Fix for OS2
mysys/mf_tempfile.c:
Fix for OS2
mysys/my_os2file64.c:
Fix for OS2
mysys/my_tempnam.c:
Fix for OS2
os2/ChangeLog.os2:
Fix for OS2
os2/MySQL-Client.icc:
Fix for OS2
os2/MySQL-Opt.icc:
Fix for OS2
os2/MySQL-Source.icc:
Fix for OS2
os2/MySQL-Sql.icc:
Fix for OS2
os2/MySQL-Util.icc:
Fix for OS2
sql/mysqld.cc:
Use LONG_TIMEOUT (one year) instead of ~0 for long timeouts. This avoids some problems when users spefices wrong arguments to mysqld.
sql/nt_servc.cc:
C
sql/share/czech/errmsg.txt:
Updated error texts
sql/share/danish/errmsg.txt:
Updated error texts
sql/share/dutch/errmsg.txt:
Updated error texts
sql/share/english/errmsg.txt:
Updated error texts
sql/share/estonian/errmsg.txt:
Updated error texts
sql/share/french/errmsg.txt:
Updated error texts
sql/share/german/errmsg.txt:
Updated error texts
sql/share/greek/errmsg.txt:
Updated error texts
sql/share/hungarian/errmsg.txt:
Updated error texts
sql/share/italian/errmsg.txt:
Updated error texts
sql/share/japanese/errmsg.txt:
Updated error texts
sql/share/korean/errmsg.txt:
Updated error texts
sql/share/norwegian-ny/errmsg.txt:
Updated error texts
sql/share/norwegian/errmsg.txt:
Updated error texts
sql/share/polish/errmsg.txt:
Updated error texts
sql/share/portuguese/errmsg.txt:
Updated error texts
sql/share/romanian/errmsg.txt:
Updated error texts
sql/share/russian/errmsg.txt:
Updated error texts
sql/share/slovak/errmsg.txt:
Updated error texts
sql/share/spanish/errmsg.txt:
Updated error texts
sql/share/swedish/errmsg.txt:
Updated error texts
sql/share/ukrainian/errmsg.txt:
Updated error texts
sql/sql_select.cc:
Fixed problem with const propagation when comparing columns of different types.
Fixed bug when HEAP table is converted to MyISAM tables in GROUP BY on long strings.
51 files changed, 1442 insertions, 665 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 6514b36e703..e01f8ceb5b4 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -46840,6 +46840,12 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.44 @itemize @bullet @item +Fixed bug in const-propagation when comparing columns of different +types. (@code{SELECT * FROM date_col="2001-01-01" and date_col=time_col}) +@item +Fixed bug that caused error message @code{Can't write, because of unique +constraint} with some @code{GROUP BY} queries. +@item Fixed problem with sjis character strings used within quoted table names. @item Fixed coredump when using @code{CREATE ... FULLTEXT} keys with other table @@ -46847,6 +46853,8 @@ handlers than MyISAM. @item Add missing @code{InnoDB} variables to @code{SHOW VARIABLES}. @item +Foreign keys checking is now done for @code{InnoDB} tables. +@item Don't use @code{signal()} on windows because this appears to not be 100 % reliable. @item @@ -46858,7 +46866,9 @@ Fixed bug when doing @code{LEFT JOIN ... ON (column_name = constant) WHERE colu When using replications, aborted queries that contained @code{%} could cause a core dump. @item -TCP_NODELAY was not used on some systems. (Speed problem). +@code{TCP_NODELAY} was not used on some systems. (Speed problem). +@item +Applied portability fixes for OS/2 (Patch by Yuri Dario). @end itemize @node News-3.23.43, News-3.23.42, News-3.23.44, News-3.23.x diff --git a/client/client_priv.h b/client/client_priv.h index 7bee03a8ab5..377d42763a2 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -28,4 +28,5 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE, OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS, + OPT_DROP, OPT_LOCKS, OPT_KEYWORDS, OPT_DELAYED, OPT_OPTIMIZE, OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES}; diff --git a/client/mysqldump.c b/client/mysqldump.c index 597a1393f69..12e08669864 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -44,6 +44,7 @@ #include <m_string.h> #include <m_ctype.h> +#include "client_priv.h" #include "mysql.h" #include "mysql_version.h" #include "mysqld_error.h" @@ -87,10 +88,6 @@ static DYNAMIC_STRING extended_row; #include "sslopt-vars.h" FILE *md_result_file; -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[] = { {"all-databases", no_argument, 0, 'A'}, @@ -98,12 +95,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, MD_OPT_CHARSETS_DIR}, + {"character-sets-dir",required_argument,0, 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, MD_OPT_DEFAULT_CHARSET}, + {"default-character-set", required_argument, 0, 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}, @@ -307,10 +304,10 @@ static int get_options(int *argc,char ***argv) case 'A': opt_alldbs=1; break; - case MD_OPT_DEFAULT_CHARSET: + case OPT_DEFAULT_CHARSET: default_charset= optarg; break; - case MD_OPT_CHARSETS_DIR: + case OPT_CHARSETS_DIR: charsets_dir= optarg; break; case 'f': diff --git a/include/mysqld_error.h b/include/mysqld_error.h index af0c8508671..bfa279193b7 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -214,16 +214,8 @@ #define ER_NO_PERMISSON_TO_CREATE_USER 1211 #define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212 #define ER_LOCK_DEADLOCK 1213 -#define ER_DUMMY1 1214 -#define ER_DUMMY2 1215 -#define ER_DUMMY3 1216 -#define ER_DUMMY4 1217 -#define ER_DUMMY5 1218 -#define ER_DUMMY6 1219 -#define ER_DUMMY7 1220 -#define ER_DUMMY8 1221 -#define ER_TABLE_CANT_HANDLE_FULLTEXT 1222 -#define ER_CANNOT_ADD_FOREIGN 1223 -#define ER_NO_REFERENCED_ROW 1224 -#define ER_ROW_IS_REFERENCED 1225 -#define ER_ERROR_MESSAGES 226 +#define ER_TABLE_CANT_HANDLE_FULLTEXT 1214 +#define ER_CANNOT_ADD_FOREIGN 1215 +#define ER_NO_REFERENCED_ROW 1216 +#define ER_ROW_IS_REFERENCED 1217 +#define ER_ERROR_MESSAGES 218 diff --git a/isam/create.c b/isam/create.c index bcdd6b0892a..c59b20d8b0c 100644 --- a/isam/create.c +++ b/isam/create.c @@ -253,10 +253,10 @@ int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo, share.base.fields=fields; share.base.pack_fields=packed; share.base.sortkey= (ushort) ~0; - share.base.max_data_file_length= (pointer == 4) ? ~0L : + share.base.max_data_file_length= (pointer == 4) ? (ulong) ~0L : (options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? - (1L << (pointer*8)) : - (pointer == 3 && reclength >= 256L) ? NI_POS_ERROR : + (ulong) (1L << (pointer*8)) : + (pointer == 3 && reclength >= 256L) ? (ulong) NI_POS_ERROR : ((ulong) reclength * (1L << (pointer*8))); share.base.max_key_file_length= (share.base.key_reflength == 3 ? NI_POS_ERROR : diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index aa0713437f4..d8d57863a11 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -35,6 +35,10 @@ SET_STACK_SIZE(9000) /* Minimum stack size for program */ #define my_raid_delete(A,B,C) my_delete(A,B) #endif +#ifdef OS2 +#define _sanity(a,b) +#endif + static uint decode_bits; static char **default_argv; static const char *load_default_groups[]= { "myisamchk", 0 }; diff --git a/myisam/myisampack.c b/myisam/myisampack.c index 54a8db457e8..1aee5f20fa8 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -229,7 +229,7 @@ int main(int argc, char **argv) #endif } -enum options {OPT_CHARSETS_DIR_MP=256}; +enum options_mp {OPT_CHARSETS_DIR_MP=256}; static struct option long_options[] = { diff --git a/mysys/mf_cache.c b/mysys/mf_cache.c index ff29926ac50..8d6eda8305a 100644 --- a/mysys/mf_cache.c +++ b/mysys/mf_cache.c @@ -37,11 +37,11 @@ static my_bool cache_remove_open_tmp(IO_CACHE *cache, const char *name) #else int length; if (!(cache->file_name= - (char*) my_malloc((length=strlen(name)+1),MYF(MY_WME))) + (char*) my_malloc((length=strlen(name)+1),MYF(MY_WME)))) { my_close(cache->file,MYF(0)); cache->file = -1; - errno=my_error=ENOMEM; + errno=my_errno=ENOMEM; return 1; } memcpy(cache->file_name,name,length); diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index 2cdd720edbd..465311088c1 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -126,6 +126,9 @@ File create_temp_file(char *to, const char *dir, const char *prefix, // changing environ variable doesn't work with VACPP char buffer[256]; sprintf( buffer, "TMP=%s", dir); + // remove ending backslash + if (buffer[strlen(buffer)-1] == '\\') + buffer[strlen(buffer)-1] = '\0'; putenv( buffer); #else old_env= (char**) environ; diff --git a/mysys/my_os2file64.c b/mysys/my_os2file64.c index 8964e562ea1..b7ee40d292e 100644 --- a/mysys/my_os2file64.c +++ b/mysys/my_os2file64.c @@ -22,7 +22,6 @@ 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 @@ -255,7 +254,7 @@ int _lock64( int fd, int locktype, my_off_t start, return(-1); } -int _sopen64( const char *name, int oflag, int shflag, int mask) +int _sopen( const char *name, int oflag, int shflag, int mask) { int fail_errno; APIRET rc = 0; @@ -325,17 +324,60 @@ int _sopen64( const char *name, int oflag, int shflag, int mask) return hf; } -inline int open( const char *name, int oflag) +int read( int fd, void *buffer, unsigned int count) { - return _sopen64( name, oflag, OPEN_SHARE_DENYNONE, S_IREAD | S_IWRITE); + APIRET rc; + ULONG actual; + + rc = DosRead( fd, (PVOID) buffer, count, &actual); + + if (!rc) + return( actual);/* NO_ERROR */ + + // set errno + _OS2errno( rc); + // write failed + return(-1); } -inline int open( const char *name, int oflag, int mask) +int write( int fd, const void *buffer, unsigned int count) { - return _sopen64( name, oflag, OPEN_SHARE_DENYNONE, mask); + APIRET rc; + ULONG actual; + + rc = DosWrite( fd, (PVOID) buffer, count, &actual); + + if (!rc) + return( actual);/* NO_ERROR */ + + // set errno + _OS2errno( rc); + // write failed + return(-1); +} + +int close( int fd) +{ + APIRET rc; + ULONG actual; + + rc = DosClose( fd); + + if (!rc) + return( 0);/* NO_ERROR */ + + // set errno + _OS2errno( rc); + // write failed + return(-1); } -inline int sopen( const char *name, int oflag, int shflag, int mask) +inline int open( const char *name, int oflag) +{ + return sopen( name, oflag, OPEN_SHARE_DENYNONE, S_IREAD | S_IWRITE); +} + +inline int open( const char *name, int oflag, int mask) { - return _sopen64( name, oflag, shflag, mask); + return sopen( name, oflag, OPEN_SHARE_DENYNONE, mask); } diff --git a/mysys/my_tempnam.c b/mysys/my_tempnam.c index 7da037e8d49..6b7ac099581 100644 --- a/mysys/my_tempnam.c +++ b/mysys/my_tempnam.c @@ -95,6 +95,9 @@ my_string my_tempnam(const char *dir, const char *pfx, // changing environ variable doesn't work with VACPP char buffer[256]; sprintf( buffer, "TMP=%s", dir); + // remove ending backslash + if (buffer[strlen(buffer)-1] == '\\') + buffer[strlen(buffer)-1] = '\0'; putenv( buffer); #else old_env=(char**)environ; diff --git a/os2/BldLevel.cmd b/os2/BldLevel.cmd new file mode 100644 index 00000000000..2bc85a06abb --- /dev/null +++ b/os2/BldLevel.cmd @@ -0,0 +1,10 @@ +@echo off + +REM I'm using resources for BLDLEVEL info, because VA4 linker has the bad +REM feature of using versionstring content for padding files. + +REM To set fixpak level: -P"fixpak level" +SET MYSQL_VERSION=3.23.42 +SET MYSQL_BUILD=1 + +BldLevelInf -V%MYSQL_VERSION% -N"MySQL AB, Yuri Dario" -D"MySQL %MYSQL_VERSION% for OS/2 - Build %MYSQL_BUILD%" -Len BldLevel.rc diff --git a/os2/BldLevel.rc b/os2/BldLevel.rc new file mode 100644 index 00000000000..fe266a25c3c --- /dev/null +++ b/os2/BldLevel.rc @@ -0,0 +1 @@ +RCDATA 1 { "@#MySQL AB, Yuri Dario:3.23.42#@##1## 10 Sep 2001 11:57:17 paperino::en::::@@MySQL 3.23.42 for OS/2 - Build 1" } diff --git a/os2/BldLevelInf.cmd b/os2/BldLevelInf.cmd new file mode 100644 index 00000000000..40a85f3782a --- /dev/null +++ b/os2/BldLevelInf.cmd @@ -0,0 +1,570 @@ +/* $Id: BldLevelInf.cmd,v 1.5 2001/01/26 21:33:13 phaller Exp $ + * + * Adds a Description string to the given .def-file. + * Fills in default values; like build time and host. + * + */ + +if RxFuncQuery('SysLoadFuncs') = 1 then +do + call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'; + call SysLoadFuncs; +end + + +/* + * Set default parameter values. + */ +sDefFileIn = ''; +sDefFileOut = ''; +sASDFeatureId = ''; +sCountryCode = ''; +sDateTime = left(' 'date()' 'time(), 26); +sDescription = 'Odin32'; +sFixPakVer = ''; +sHostname = strip(substr(VALUE('HOSTNAME',,'OS2ENVIRONMENT'), 1, 11)); +sLanguageCode = ''; +sMiniVer = ''; +sVendor = 'Project Odin'; +sVersion = '0.5'; + + +/* + * Parse parameters. + */ +parse arg sArgs +if (sArgs = '') then +do + call syntax; + exit(1); +end + +do while (sArgs <> '') + sArgs = strip(sArgs); + if (substr(sArgs, 1, 1) = '-' | substr(sArgs, 1, 1) = '/') then + do /* + * Option. + */ + ch = translate(substr(sArgs, 2, 1)); + if (pos(ch, 'ACDHLMNPRTV') < 1) then + do + say 'invalid option:' substr(sArgs, 1, 2); + call syntax; + exit(2); + end + + /* get value and advance sArgs to next or to end. */ + if (substr(sArgs, 3, 1) = '"') then + do + iNext = pos('"', sArgs, 4); + fQuote = 1; + end + else + do + iNext = pos(' ', sArgs, 3); + if (iNext <= 0) then + iNext = length(sArgs); + fQuote = 0; + end + + if (iNext > 3 | ch = 'R') then + do + sValue = substr(sArgs, 3 + fQuote, iNext - 3 - fQuote); + sArgs = strip(substr(sArgs, iNext+1)); + /*say 'iNext:' iNext 'sValue:' sValue 'sArgs:' sArgs; */ + + /* check if we're gonna search for something in an file. */ + if (sValue <> '' & pos('#define=', sValue) > 0) then + sValue = LookupDefine(sValue); + end + else + do + say 'syntax error near' substr(sArgs, 1, 2)'.'; + call syntax; + exit(3); + end + + + /* set value */ + select + when (ch = 'A') then /* ASD Feature Id */ + sASDFeatureId = sValue; + + when (ch = 'C') then /* Country code */ + sCountryCode = sValue; + + when (ch = 'D') then /* Description */ + sDescription = sValue; + + when (ch = 'H') then /* Hostname */ + sHostname = sValue; + + when (ch = 'L') then /* Language code */ + sLanguageCode = sValue; + + when (ch = 'M') then /* MiniVer */ + sMiniVer = sValue; + + when (ch = 'N') then /* Vendor */ + sVendor = sValue; + + when (ch = 'R') then /* Vendor */ + sDescription = ReadDescription(sValue, sDefFile); + + when (ch = 'P') then /* Fixpak version */ + sFixPakVer = sValue; + + when (ch = 'T') then /* Date Time */ + sDateTime = sValue; + + when (ch = 'V') then /* Version */ + sVersion = sValue; + + /* Otherwise it's an illegal option */ + otherwise + say 'invalid option:' substr(sArgs, 1, 2); + call syntax; + exit(2); + end /* select */ + end + else + do /* + * Defition file... + */ + if (sDefFileOut <> '') then + do + say 'Syntax error: Can''t specify more than two defintion files!'; + exit(4); + end + if (sDefFileIn = '') then + parse value sArgs with sDefFileIn' 'sArgs + else + parse value sArgs with sDefFileOut' 'sArgs + sArgs = strip(sArgs); + end +end + + +/* check that a defintion file was specified. */ +if (sDefFileIn = '') then +do + say 'Syntax error: Will have to specify a .def-file to update.'; + call syntax; + exit(5); +end + + +/* + * Trim strings to correct lengths. + */ +sVendor = strip(substr(sVendor, 1, 31)); +if (substr(sDateTime, 1, 1) <> ' ') then + sDateTime = ' ' || sDateTime; +sDateTime = left(sDateTime, 26); +sHostname = strip(substr(sHostname, 1, 11)); +sMiniVer = strip(substr(sMiniVer, 1, 11)); +sDescription = strip(substr(sDescription, 1, 80)); +sCountryCode = strip(substr(sCountryCode, 1, 4)); +sLanguageCode = strip(substr(sLanguageCode, 1, 4)); +sASDFeatureId = strip(substr(sASDFeatureId, 1, 11)); +sFixPakVer = strip(substr(sFixPakVer, 1, 11)); + + +/* + * Signature + */ +sEnhSign = '##1##' + +/* + * Build description string. + */ +sDescription = '@#'sVendor':'sVersion'#@'sEnhSign||, + sDateTime||sHostname||, + ':'sASDFeatureId':'sLanguageCode':'sCountryCode':'sMiniVer||, + '::'sFixPakVer'@@'sDescription; + +/* + * Update .def-file. + */ +call SysFileDelete(sDefFileIn); +rc = lineout( sDefFileIn, 'RCDATA 1 { "' || sDescription || '" }'); + +/*rc = UpdateDefFile(sDefFileIn, sDefFileOut, sDescription);*/ +exit(rc); + + +/** + * Display script syntax. + */ +syntax: procedure + say 'Syntax: MakeDesc.cmd [options] <deffile in> <deffile out> [options]' + say ' <deffile> Defitionfile which will have an DESCRIPTION appended.' + say 'Options:' + say ' -A<string> ASD Feature Id.' + say ' -C<string> Country code.' + say ' -D<string> Description.' + say ' -R[deffile] Read description from .def file.' + say ' -H<string> Hostname.' + say ' -L<string> Language code.' + say ' -M<string> MiniVer.' + say ' -N<string> Vendor.' + say ' -P<string> Fixpak version.' + say ' -T<string> Date Time.' + say ' -V<string> Version.' + say '<string> could be a double qoute qouted string or a single word.' + say ' You could also reference #defines in C/C++ include files.' + say ' The string should then have this form:' + say ' "#define=<DEFINE_NAME>,<includefile.h>"' + say ''; + + return; + + +/** + * Search for a #define in an C/C++ header or source file. + * + * @returns String containing the defined value + * found for the define in the header file. + * Quits on fatal errors. + * @param A string on the form: "#define=DEFINETOFIND,includefile.h" + * @remark Write only code... - let's hope it works. + */ +LookupDefine: procedure + parse arg '#'sDefine'='sMacro','sIncludeFile + + /* + * Validate parameters. + */ + sMacro = strip(sMacro); + sIncludeFile = strip(sIncludeFile); + if (sMacro = '') then + do + say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.'; + say ' <DEFINE_NAME> was empty.'; + exit(-20); + end + if (sIncludeFile = '') then + do + say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.'; + say ' <includefile.h> was empty.'; + exit(-20); + end + + + sIllegal = translate(translate(sMacro),, + '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!',, + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_'); + + if (strip(translate(sIllegal, ' ', '!')) <> '') then + do + say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.'; + say ' <DEFINE_NAME> contains illegal charater(s).' + say ' 'sMacro; + say ' 'translate(sIllegal, ' ', '!'); + exit(-20); + end + + /* + * Open include file. + */ + sRc = stream(sIncludeFile, 'c', 'open read'); + if (pos('READY', sRc) <> 1) then + do /* search INCLUDE variable */ + sFile = SysSearchPath('INCLUDE', sIncludeFile); + if (sFile = '') then + do + say 'Can''t find include file 'sIncludeFile'.'; + exit(-20); + end + sIncludeFile = sFile; + + sRc = stream(sIncludeFile, 'c', 'open read'); + if (pos('READY', sRc) <> 1) then + do + say 'Failed to open include file' sIncludeFile'.'; + exit(-20); + end + end + + /* + * Search the file line by line. + * We'll check for lines starting with a hash (#) char. + * Then check that the word after the hash is 'define'. + * Then match the next word with the macro name. + * Then then get the next rest of the line to comment or continuation char. + * (continuation is not supported) + * Finally strip quotes. + */ + sValue = ''; + do while (lines(sIncludeFile) > 0) + sLine = strip(linein(sIncludeFile)); + if (sLine = '') then + iterate; + if (substr(sLine, 1, 1) <> '#') then + iterate; + sLine = substr(sLine, 2); + if (word(sLine, 1) <> 'define') then + iterate; + sLine = strip(substr(sLine, wordpos(sLine, 1) + length('define')+1)); + if ( substr(sLine, 1, length(sMacro)) <> sMacro, + | substr(sLine, length(sMacro)+1, 1) <> ' ') then + iterate; + sLine = strip(substr(sLine, length(sMacro) + 1)); + if (sLine = '') then + do + say 'error: #define' sMacro' is empty.'; + call stream sIncludeFile, 'c', 'close'; + exit(-20); + end + + chQuote = substr(sLine, 1, 1); + if (chQuote = '"' | chQuote = "'") then + do /* quoted string */ + iLastQuote = 0; + do forever + iLast = pos(chQuote, sLine, 2); + if (iLast <= 0) then + leave; + if (substr(sLine, iLast, 1) = '\') then + iterate; + iLastQuote = iLast; + leave; + end + + if (iLastQuote <= 0) then + do + say 'C/C++ syntax error in 'sIncludefile': didn''t find end quote.'; + call stream sIncludeFile, 'c', 'close'; + exit(-20); + end + + call stream sIncludeFile, 'c', 'close'; + sValue = substr(sLine, 2, iLastQuote - 2); + say 'Found 'sMacro'='sValue; + return sValue; + end + else + do + iCommentCPP = pos('//',sLine); + iCommentC = pos('/*',sLine); + if (iCommentC > 0 & iCommentCPP > 0 & iCommentC > iCommentCPP) then + iComment = iCommentCPP; + else if (iCommentC > 0 & iCommentCPP > 0 & iCommentC < iCommentCPP) then + iComment = iCommentC; + else if (iCommentCPP > 0) then + iComment = iCommentCPP; + else if (iCommentC > 0) then + iComment = iCommentC; + else + iComment = 0; + + if (iComment > 0) then + sValue = strip(substr(sLine, 1, iComment-1)); + else + sValue = strip(sLine); + + if (sValue <> '') then + do + if (substr(sValue, length(sValue)) = '\') then + do + say 'Found continuation char: Multiline definitions are not supported!\n'; + call stream sIncludeFile, 'c', 'close'; + exit(-20); + end + end + + if (sValue = '') then + say 'warning: The #define has no value.'; + + call stream sIncludeFile, 'c', 'close'; + say 'Found 'sMacro'='sValue; + return sValue; + end + end + + call stream sIncludeFile, 'c', 'close'; + say 'error: didn''t find #define' sMacro'.'; + exit(-20); + + + +/** + * Reads the description line for a .def-file. + * @returns The Description string, with quotes removed. + * Empty string is acceptable. + * On error we'll terminate the script. + * @param sDefFile Filaname of .def-file to read the description from. + * @param sDefFile2 Used if sDefFile is empty. + * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) + */ +ReadDescription: procedure; + parse arg sDefFile, sDefFile2 + + /* + * Validate parameters. + */ + if (sDefFile = '') then + sDefFile = sDefFile2; + if (sDefFile = '') then + do + say 'error: no definition file to get description from.' + exit(-1); + end + + /* + * Open file + */ + rc = stream(sDefFile, 'c', 'open read'); + if (pos('READY', rc) <> 1) then + do + say 'error: failed to open deffile file.'; + exit(-1); + end + + + /* + * Search for the 'DESCRIPTION' line. + */ + do while (lines(sDefFile) > 0) + sLine = strip(linein(sDefFile)); + if (sLine = '') then + iterate; + if (translate(word(sLine, 1)) <> 'DESCRIPTION') then + iterate; + sLine = strip(substr(sLine, wordpos(sLine, 1) + length('DESCRIPTION')+1)); + + ch = substr(sLine, 1, 1); + if (ch <> "'" & ch <> '"') then + do + say 'syntax error: description line in' sDefFile 'is misformed.'; + call stream sDefFile, 'c', 'close'; + exit(-10); + end + + iEnd = pos(ch, sLine, 2); + if (iEnd <= 0) then + do + say 'syntax error: description line in' sDefFile 'is misformed.'; + call stream sDefFile, 'c', 'close'; + exit(-10); + end + + call stream sDefFile, 'c', 'close'; + sValue = substr(sLine, 2, iEnd - 2); + say 'Found Description:' sValue; + return sValue; + end + + call stream sDefFile, 'c', 'close'; + say 'info: Didn''t find description line in' sDefFile'.'; + return ''; + + +/** + * This is a function which reads sDefFileIn into and + * internal array and changes the DESCRIPTION text if found. + * If DESCRIPTION isn't found, it is added at the end. + * The array is written to sDefFileOut. + * @returns 0 on succes. + * Errorcode on error. + * @param sDefFileIn Input .def-file. + * @param sDefFileOut Output .def-file. Overwritten. + * @param sDescription New description string. + * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) + */ +UpdateDefFile: procedure; + parse arg sDefFileIn, sDefFileOut, sDescription + + /* + * Validate parameters. + */ + if (sDefFileOut = '') then + sDefFileOut = sDefFileIn; + + /* + * Open file input file. + */ + rc = stream(sDefFileIn, 'c', 'open read'); + if (pos('READY', rc) <> 1) then + do + say 'error: failed to open' sDefFileIn 'file.'; + return 110; + end + + + /* + * Search for the 'BLDLEVEL' line. + */ + i = 0; + fDescription = 0; + do while (lines(sDefFileIn) > 0) + /* + * Read line. + */ + i = i + 1; + asFile.i = linein(sDefFileIn); + + /* + * Look for BLDLEVEL; + */ + if (asFile.i = '') then + iterate; + if (translate(word(strip(asFile.i), 1)) <> 'BLDLEVEL') then + iterate; + if (fDescription) then + do + say 'warning: multiple descriptions lines. Line' i 'removed'; + i = i - 1; + iterate; + end + + /* + * Found description - replace with new description. + */ + asFile.i = "BldLevel = '"||sDescription||"'"; + fDescription = 1; + end + + /* + * Add description is none was found. + */ + if (\fDescription) then + do + i = i + 1; + asFile.i = "BldLevel = '"||sDescription||"'"; + end + asFile.0 = i; + + + /* + * Close input file and open output file. + */ + call stream sDefFileIn, 'c', 'close'; + call SysFileDelete(sDefFileOut); + rc = stream(sDefFileOut, 'c', 'open write'); + if (pos('READY', rc) <> 1) then + do + say 'error: failed to open outputfile' sDefFileOut 'file.'; + return 110; + end + + /* + * Make firstline and write all the lines to the output file. + */ + /*call lineout sDefFileOut, '; Updated by makedesc.cmd', 1;*/ + do i = 1 to asFile.0 + rc = lineout(sDefFileOut, asFile.i); + if (rc > 0) then + do + say 'error: failed to write line' i 'to' sDefFileOut'.' + call stream sDefFileOut, 'c', 'close'; + return 5; + end + end + + /* + * Close output file and return succesfully. + */ + call stream sDefFileOut, 'c', 'close'; + return 0; + diff --git a/os2/ChangeLog.os2 b/os2/ChangeLog.os2 index 34547262fe2..8f2604c0453 100644 --- a/os2/ChangeLog.os2 +++ b/os2/ChangeLog.os2 @@ -1,4 +1,14 @@ +2001/09/16 + - fixed creation directory of temporary files + - enabled cached list file for deleting temp open files + +2001/09/10 + - Build source 3.23.42, released + +2001/09/08 + - fixed file api + 2001/06/12 - fixed support for > 2GB file size, needs also DosOpenL - mixed 64bit/32bit file size support, dinamic loading of diff --git a/os2/MySQL-Client.icc b/os2/MySQL-Client.icc index e00fe28a3c9..7a41567f983 100644 --- a/os2/MySQL-Client.icc +++ b/os2/MySQL-Client.icc @@ -6,7 +6,6 @@ include "MySQL-Opt.icc" include "MySQL-Source.icc" option ProjectOptions = MySQLOptions - //, link(defaultlibsname, "readline.lib") { option file(genobject, "..\\OBJ\\ZLIB\\") @@ -16,7 +15,7 @@ option ProjectOptions = MySQLOptions // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch + source type('cpp') client_global_pch } // target source files source zlib @@ -27,6 +26,8 @@ option ProjectOptions = MySQLOptions source type('cpp') my_sys_cli source type('cpp') strings source type('cpp') mysqlclientlib + source type('cpp') '..\libmysql\dll.c' + source BldLevelInfo } } @@ -37,51 +38,84 @@ option ProjectOptions = MySQLOptions // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch //, 'sql_string.h' + source type('cpp') client_global_pch } // target source files - //source readline source type('cpp') "..\\client\\mysql.cc" + source BldLevelInfo } } + option file(genobject, "..\\OBJ\\READLINE\\") + { target "..\\bin\\mysqladmin.exe" { // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch //, 'sql_string.h' + source type('cpp') client_global_pch } // target source files source type('cpp') "..\\client\\mysqladmin.c" + source BldLevelInfo } + } target "..\\bin\\mysqldump.exe" { // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch + source type('cpp') client_global_pch } // target source files source type('cpp') "..\\client\\mysqldump.c" + source BldLevelInfo } target "..\\bin\\mysqlshow.exe" { // target source files source type('cpp') "..\\client\\mysqlshow.c" + source BldLevelInfo } target "..\\bin\\mysqlimport.exe" { // target source files source type('cpp') "..\\client\\mysqlimport.c" + source BldLevelInfo } target "..\\bin\\mysqltest.exe" { source type('cpp') "..\\client\\mysqltest.c" + source BldLevelInfo + } + + target "..\\bin\\mysqlbinlog.exe" + { + // optimized precompiled headers + option macros('global', 'yes') + { + source type('cpp') client_global_pch + } + // target source files + source type('cpp') "..\\client\\mysqlbinlog.cc" + source BldLevelInfo + } + + target "..\\bin\\mysqlcheck.exe" + { + // optimized precompiled headers + option macros('global', 'yes') + { + source type('cpp') client_global_pch + } + + // target source files + source type('cpp') "..\\client\\mysqlcheck.c" + source BldLevelInfo } } diff --git a/os2/MySQL-Opt.icc b/os2/MySQL-Opt.icc index 5f5cdb7c72f..7045f111d9b 100644 --- a/os2/MySQL-Opt.icc +++ b/os2/MySQL-Opt.icc @@ -2,29 +2,30 @@ 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 BaseOptions = link(defaultlibsname, "tcpip32.lib") + , link(libsearchpath, "..\\lib\\") + , link(libsearchpath, "..\\bin\\") + , link(pmtype, vio) + , link(padding, no) + , 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, "..\\..\\zlib-1.1.3") + , incl(searchpath, "..\\..\\ufc") + , incl(searchpath, "..\\os2") option ReleaseOptions = link(debug, "no") , define("DBUG_OFF", ) diff --git a/os2/MySQL-Source.icc b/os2/MySQL-Source.icc index 48780857185..134a64dc9b0 100644 --- a/os2/MySQL-Source.icc +++ b/os2/MySQL-Source.icc @@ -1,4 +1,4 @@ -group client_pch = +group client_global_pch = 'os2.h', 'assert.h', 'direct.h', 'errno.h', 'nerrno.h', 'limits.h', 'io.h', 'math.h', @@ -9,17 +9,46 @@ group client_pch = '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', + 'm_ctype.h', 'mysqld_error.h', 'my_list.h', 'my_sys.h', 'my_net.h', - 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h' + 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h', + '.\regex\regex.h' + +group server_global_pch = + 'os2.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', + 'sys/utime.h', 'sys/select.h', 'sys/un.h', + 'netinet/in_systm.h', 'netinet/tcp.h', + + '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', + 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h', + 'sql_string.h', 'item.h', 'unireg.h', + 'field.h', 'sql_lex.h', 'sql_list.h', + 'md5.h', 'sql_acl.h', 'slave.h', + 'ha_myisam.h', 'procedure.h', 'sql_select.h', + 'errmsg.h', 't_ctype.h', 'direct.h', + 'mysys_err.h', 'zconf.h', 'zlib.h', + 'my_tree.h', '..\mysys\my_static.h', 'netdb.h', + 'thr_alarm.h', 'heap.h', '..\myisam\fulltext.h', + '..\myisam\ftdefs.h', 'myisammrg.h', + '.\regex\regex.h' + +group server_pch = + 'ha_heap.h', 'ha_myisammrg.h', 'opt_ft.h', + 'hash_filo.h', 'mini_client.h', 'sql_repl.h', + 'sql_analyse.h', 'item_create.h', '..\mysys\mysys_priv.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", @@ -28,17 +57,17 @@ group mysqlclientlib = "..\\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" + "..\\..\\zlib-1.1.3\\compress.c", "..\\..\\zlib-1.1.3\\crc32.c", + "..\\..\\zlib-1.1.3\\deflate.c", "..\\..\\zlib-1.1.3\\gzio.c", "..\\..\\zlib-1.1.3\\infblock.c", + "..\\..\\zlib-1.1.3\\infcodes.c", "..\\..\\zlib-1.1.3\\inffast.c", + "..\\..\\zlib-1.1.3\\inflate.c", "..\\..\\zlib-1.1.3\\inftrees.c", + "..\\..\\zlib-1.1.3\\infutil.c", "..\\..\\zlib-1.1.3\\trees.c", "..\\..\\zlib-1.1.3\\uncompr.c", + "..\\..\\zlib-1.1.3\\zutil.c", "..\\..\\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" + "..\\..\\ufc\\crypt.c", + "..\\..\\ufc\\crypt_util.c", + "..\\..\\ufc\\crypt-entry.c" group sql = "..\\sql\\convert.cc", @@ -106,7 +135,7 @@ group sql = "..\\sql\\sql_test.cc", "..\\sql\\sql_update.cc", "..\\sql\\sql_udf.cc", - "..\\sql\\sql_yacc.cc", + "..\\sql\\sql_yacc.c", "..\\sql\\table.cc", "..\\sql\\thr_malloc.cc", "..\\sql\\time.cc", @@ -140,8 +169,6 @@ group strings = "..\\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", @@ -162,6 +189,8 @@ group strings = "..\\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", @@ -242,7 +271,8 @@ group strings = "..\\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\\safemalloc.c", + "..\\mysys\\string.c", "..\\mysys\\thr_alarm.c", "..\\mysys\\thr_mutex.c", "..\\mysys\\thr_rwlock.c", "..\\mysys\\tree.c", "..\\mysys\\typelib.c" @@ -254,11 +284,13 @@ group strings = "..\\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_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_error.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", @@ -271,8 +303,8 @@ group strings = "..\\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" + "..\\myisam\\mi_update.c", "..\\myisam\\mi_write.c" + //"..\\myisam\\sort.c" group dbug = "..\\dbug\\dbug.c", "..\\dbug\\factorial.c", "..\\dbug\\sanity.c" @@ -293,6 +325,7 @@ group strings = //"..\\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" + group regex = "..\\regex\\regcomp.c", "..\\regex\\regerror.c", + "..\\regex\\regexec.c", "..\\regex\\regfree.c", "..\\regex\\reginit.c" + group BldLevelInfo = 'os2\BldLevel.rc' diff --git a/os2/MySQL-Sql.icc b/os2/MySQL-Sql.icc index addb645e2db..c1256d5e39e 100644 --- a/os2/MySQL-Sql.icc +++ b/os2/MySQL-Sql.icc @@ -5,6 +5,9 @@ InlineCode = "no" include "MySQL-Opt.icc" include "MySQL-Source.icc" +run before sources('..\sql\sql_yacc.yy') targets('..\sql\sql_yacc.c') + 'bison -y -d -o ..\sql\sql_yacc.c ..\sql\sql_yacc.yy' + option ProjectOptions = MySQLOptions , define( "MYSQL_SERVER", "") { @@ -16,68 +19,9 @@ option ProjectOptions = MySQLOptions // 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') server_global_pch } - 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' + source type('cpp') server_pch // target source files source "rint.obj" @@ -93,25 +37,10 @@ option ProjectOptions = MySQLOptions 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" + source type('cpp') sql, + "..\\myisam\\mi_check.c", + "..\\myisam\\sort.c" + source BldLevelInfo } } -*/ } diff --git a/os2/MySQL-Util.icc b/os2/MySQL-Util.icc index 61b1f53bc5f..5a7ae2959b9 100644 --- a/os2/MySQL-Util.icc +++ b/os2/MySQL-Util.icc @@ -6,20 +6,51 @@ 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") + , link(defaultlibsname, "mysql.lib") { + option file(genobject, "..\\OBJ\\ZLIB\\") + ,link(exportAll) + { + target "..\\bin\\mysqlu.dll" + { + // optimized precompiled headers + option macros('global', 'yes') + { + source type('cpp') client_global_pch + } + // target source files + source zlib, ufc, regex, 'strings\bmove_upp.c' + if debug_build { + source type('cpp') dbug + } + source type('cpp') heap + source type('cpp') merge + source type('cpp') myisam + source type('cpp') myisammrg + source type('cpp') isam + source type('cpp') my_sys + source type('cpp') my_sys_cli + source type('cpp') my_sys_sql + source type('cpp') strings + source type('cpp') '..\libmysql\dll.c' + source BldLevelInfo + } + } + + target "..\\bin\\myisamchk.exe" { // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch + source type('cpp') client_global_pch } - source type('cpp') "..\\myisam\\myisamchk.c" + // target source files + source type('cpp') "..\\myisam\\myisamchk.c", + "..\\myisam\\mi_check.c", + "..\\myisam\\sort.c" + source BldLevelInfo } target "..\\bin\\myisamlog.exe" @@ -27,11 +58,11 @@ option ProjectOptions = MySQLOptions // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch + source type('cpp') client_global_pch } - // target source files source type('cpp') "..\\myisam\\myisamlog.c" + source BldLevelInfo } target "..\\bin\\myisampack.exe" @@ -39,10 +70,23 @@ option ProjectOptions = MySQLOptions // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch + source type('cpp') client_global_pch } // target source files source type('cpp') "..\\myisam\\myisampack.c" + source BldLevelInfo + } + + target "..\\bin\\test\\comp_err.exe" + { + // target source files + source type('cpp') "..\\extra\\comp_err.c" + } + + target "..\\bin\\gen_lex_hash.exe" + { + // target source files + source type('cpp') "..\\sql\\gen_lex_hash.cc" } target "..\\bin\\test\\is_test1.exe" @@ -75,13 +119,13 @@ option ProjectOptions = MySQLOptions // target source files source type('cpp') "..\\myisam\\ft_test1.c" } - - //target "..\\bin\\test\\testhash.exe" +/* + target "..\\bin\\test\\testhash.exe" { // target source files - //source type('cpp') "..\\mysys\\testhash.c" + source type('cpp') "..\\mysys\\testhash.c" } - +*/ target "..\\bin\\test\\test_charset.exe" { // target source files @@ -99,6 +143,7 @@ option ProjectOptions = MySQLOptions source type('cpp') "..\\heap\\hp_test2.c" } +/* option define( "MAIN", "") { target "..\\bin\\test\\thr_lock.exe" @@ -107,13 +152,13 @@ option ProjectOptions = MySQLOptions 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_global_pch } source type('cpp') "..\\client\\insert_test.c" } @@ -126,9 +171,12 @@ option ProjectOptions = MySQLOptions // optimized precompiled headers option macros('global', 'yes') { - source type('cpp') client_pch + source type('cpp') client_global_pch } source type('cpp') "..\\client\\thread_test.c" } } + +run after sources('..\bin\gen_lex_hash.exe') targets('..\sql\lex_hash.h') + '..\bin\gen_lex_has.exe > ..\sql\lex_hash.h' diff --git a/os2/ReadMe.txt b/os2/ReadMe.txt new file mode 100644 index 00000000000..1a8158df4bf --- /dev/null +++ b/os2/ReadMe.txt @@ -0,0 +1,177 @@ +==================================================== + +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.14 (ftp://ftp.os2.org/xworkplace/warpin-0-9-14.exe) + +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-??-BLD1.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. + +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-42-PDF.WPI + +and the INF documentation is found in + + MYSQL-3-23-28-INF.WPI + +The latest documentation in other formats can always be downloaded from +http://www.mysql.com. However this documentation may not fully apply to +this port. +The INF documentation could contain errors because of semi-automatic +translation from texi original. Also it is not updated as the latest PDF +manual (sorry, but conversion from texi to ipf requires quite a lot of +work). + + +Support +------- +Since MySQL is a OpenSource freeware product there are no +formal support options available. + +Please subscribe to mysql2 at www.yahoogroups.com to get in contact +with other users using this port. + +http://www.yahoogroups.com/group/mysql2 + +This newsgroup/mailinglist is the official "home" of this port. + + +Donations +--------- +Since this software is ported for free, donations are welcome! +You can get also an extended support, which is not free and subject to +custom rates. +Ask in the mailing list for details. + + +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 (VAC++ 4) +------------------------ +Apply file and patches found in the src\ directory (if exists). +Create the following subdirectories + + bin\ + bin\test + lib\ + obj\ + obj\zlib + +Build os2\MySQL-Client.icc project first. +Then os2\MySQL-Util.icc; last is os2\MySQL-Sql.icc + diff --git a/os2/mysql-inf.wis b/os2/mysql-inf.wis new file mode 100644 index 00000000000..55259567a2e --- /dev/null +++ b/os2/mysql-inf.wis @@ -0,0 +1,15 @@ +#include "mysql.ih" + +<WARPIN VERSION <$WARPIN_VERSION>> +<HEAD> +<MSG> +This is not an installable archive. + +Please download and install the main archive: + + mysql-<$MySQL-Ver>-bld1.wpi + +</MSG> +</HEAD> +</WARPIN> +
\ No newline at end of file diff --git a/os2/mysql.wis b/os2/mysql.wis new file mode 100644 index 00000000000..50207a0c499 --- /dev/null +++ b/os2/mysql.wis @@ -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.txt;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-<$MySQL-Ver>-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\3\23\28" + 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 <B>MySQL for OS/2 and eComStation</B>. +<BR> +<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.txt --> +<PAGE INDEX=2 TYPE=README> +<NEXTBUTTON TARGET=3>~Next</NEXTBUTTON> +<TEXT> +</TEXT> +<README FORMAT=PLAIN EXTRACTFROMPCK="1">ReadMe.txt</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/mysqlalt.wis b/os2/mysqlalt.wis new file mode 100644 index 00000000000..55259567a2e --- /dev/null +++ b/os2/mysqlalt.wis @@ -0,0 +1,15 @@ +#include "mysql.ih" + +<WARPIN VERSION <$WARPIN_VERSION>> +<HEAD> +<MSG> +This is not an installable archive. + +Please download and install the main archive: + + mysql-<$MySQL-Ver>-bld1.wpi + +</MSG> +</HEAD> +</WARPIN> +
\ No newline at end of file diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 31e51a5729f..bfbe8f8a25a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1220,7 +1220,7 @@ the thread stack. Please read http://www.mysql.com/doc/L/i/Linux.html\n\n", Some pointers may be invalid and cause the dump to abort...\n"); safe_print_str("thd->query", thd->query, 1024); fprintf(stderr, "thd->thread_id=%ld\n", thd->thread_id); - fprintf(stderr, "\n + fprintf(stderr, "\n\ Successfully dumped variables, if you ran with --log, take a look at the\n\ details of what thread %ld did to cause the crash. In some cases of really\n\ bad corruption, the values shown above may be invalid\n\n", @@ -2721,6 +2721,8 @@ static struct option long_options[] = { {0, 0, 0, 0} }; +#define LONG_TIMEOUT ((ulong) 3600L*24L*365L) + CHANGEABLE_VAR changeable_vars[] = { { "back_log", (long*) &back_log, 50, 1, 65535, 0, 1 }, @@ -2738,15 +2740,15 @@ CHANGEABLE_VAR changeable_vars[] = { { "binlog_cache_size", (long*) &binlog_cache_size, 32*1024L, IO_SIZE, ~0L, 0, IO_SIZE }, { "connect_timeout", (long*) &connect_timeout, - CONNECT_TIMEOUT, 2, 65535, 0, 1 }, + CONNECT_TIMEOUT, 2, LONG_TIMEOUT, 0, 1 }, { "delayed_insert_timeout", (long*) &delayed_insert_timeout, - DELAYED_WAIT_TIMEOUT, 1, ~0L, 0, 1 }, + DELAYED_WAIT_TIMEOUT, 1, LONG_TIMEOUT, 0, 1 }, { "delayed_insert_limit", (long*) &delayed_insert_limit, DELAYED_LIMIT, 1, ~0L, 0, 1 }, { "delayed_queue_size", (long*) &delayed_queue_size, DELAYED_QUEUE_SIZE, 1, ~0L, 0, 1 }, { "flush_time", (long*) &flush_time, - FLUSH_TIME, 0, ~0L, 0, 1 }, + FLUSH_TIME, 0, LONG_TIMEOUT, 0, 1 }, #ifdef HAVE_GEMINI_DB { "gemini_buffer_cache", (long*) &gemini_buffer_cache, 128 * 8192, 16, LONG_MAX, 0, 1 }, @@ -2791,13 +2793,13 @@ CHANGEABLE_VAR changeable_vars[] = { (long*) &innobase_force_recovery, 0, 0, 6, 0, 1}, #endif { "interactive_timeout", (long*) &net_interactive_timeout, - NET_WAIT_TIMEOUT, 1, 31*24*60*60, 0, 1 }, + NET_WAIT_TIMEOUT, 1, LONG_TIMEOUT, 0, 1 }, { "join_buffer_size", (long*) &join_buff_size, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE }, { "key_buffer_size", (long*) &keybuff_size, KEY_CACHE_SIZE, MALLOC_OVERHEAD, (long) ~0, MALLOC_OVERHEAD, IO_SIZE }, { "long_query_time", (long*) &long_query_time, - 10, 1, ~0L, 0, 1 }, + 10, 1, LONG_TIMEOUT, 0, 1 }, { "lower_case_table_names", (long*) &lower_case_table_names, IF_WIN(1,0), 0, 1, 0, 1 }, { "max_allowed_packet", (long*) &max_allowed_packet, @@ -2836,9 +2838,9 @@ CHANGEABLE_VAR changeable_vars[] = { { "net_retry_count", (long*) &mysqld_net_retry_count, MYSQLD_NET_RETRY_COUNT, 1, ~0L, 0, 1 }, { "net_read_timeout", (long*) &net_read_timeout, - NET_READ_TIMEOUT, 1, 65535, 0, 1 }, + NET_READ_TIMEOUT, 1, LONG_TIMEOUT, 0, 1 }, { "net_write_timeout", (long*) &net_write_timeout, - NET_WRITE_TIMEOUT, 1, 65535, 0, 1 }, + NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1 }, { "open_files_limit", (long*) &open_files_limit, 0, 0, 65535, 0, 1}, { "query_buffer_size", (long*) &query_buff_size, @@ -2848,9 +2850,9 @@ CHANGEABLE_VAR changeable_vars[] = { { "record_rnd_buffer", (long*) &record_rnd_cache_size, 0, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE }, { "slave_net_timeout", (long*) &slave_net_timeout, - SLAVE_NET_TIMEOUT, 1, 65535, 0, 1 }, + SLAVE_NET_TIMEOUT, 1, LONG_TIMEOUT, 0, 1 }, { "slow_launch_time", (long*) &slow_launch_time, - 2L, 0L, ~0L, 0, 1 }, + 2L, 0L, LONG_TIMEOUT, 0, 1 }, { "sort_buffer", (long*) &sortbuff_size, MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ~0L, MALLOC_OVERHEAD, 1 }, { "table_cache", (long*) &table_cache_size, @@ -2864,7 +2866,7 @@ CHANGEABLE_VAR changeable_vars[] = { { "thread_stack", (long*) &thread_stack, DEFAULT_THREAD_STACK, 1024*32, ~0L, 0, 1024 }, { "wait_timeout", (long*) &net_wait_timeout, - NET_WAIT_TIMEOUT, 1, ~0L, 0, 1 }, + NET_WAIT_TIMEOUT, 1, LONG_TIMEOUT, 0, 1 }, { NullS, (long*) 0, 0, 0, 0, 0, 0} }; diff --git a/sql/nt_servc.cc b/sql/nt_servc.cc index 2e7f2fc9c93..6930800982e 100644 --- a/sql/nt_servc.cc +++ b/sql/nt_servc.cc @@ -53,11 +53,12 @@ NTService::NTService() -------------------------------------------------------------------------- */ NTService::~NTService() { - if(ServiceName != NULL) delete[] ServiceName; + if (ServiceName != NULL) delete[] ServiceName; } /* ------------------------------------------------------------------------ -------------------------------------------------------------------------- */ + BOOL NTService::GetOS() { bOsNT = FALSE; @@ -71,12 +72,14 @@ BOOL NTService::GetOS() return bOsNT; } + /* ------------------------------------------------------------------------ Init() Registers the main service thread with the service manager ServiceThread - pointer to the main programs entry function when the service is started -------------------------------------------------------------------------- */ + long NTService::Init(LPCSTR szInternName,void *ServiceThread) { @@ -94,6 +97,8 @@ long NTService::Init(LPCSTR szInternName,void *ServiceThread) return StartServiceCtrlDispatcher(stb); //register with the Service Manager } + + /* ------------------------------------------------------------------------ Install() - Installs the service with Service manager nError values: @@ -101,9 +106,13 @@ long NTService::Init(LPCSTR szInternName,void *ServiceThread) 1 Can't open the Service manager 2 Failed to create service -------------------------------------------------------------------------- */ -BOOL NTService::Install(int startType, LPCSTR szInternName,LPCSTR szDisplayName, - LPCSTR szFullPath, LPCSTR szAccountName,LPCSTR szPassword) + +BOOL NTService::Install(int startType, LPCSTR szInternName, + LPCSTR szDisplayName, + LPCSTR szFullPath, LPCSTR szAccountName, + LPCSTR szPassword) { + BOOL ret_val=FALSE; SC_HANDLE newService, scm; if (!SeekStatus(szInternName,1)) @@ -112,49 +121,40 @@ BOOL NTService::Install(int startType, LPCSTR szInternName,LPCSTR szDisplayName, char szFilePath[_MAX_PATH]; GetModuleFileName(NULL, szFilePath, sizeof(szFilePath)); - // open a connection to the SCM - scm = OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE); - - if (!scm) + if (!(scm = OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE))) + printf("Failed to install the service (Couldn't open the SCM)\n"); + else // Install the new service { - printf("Failed to install the service\n" - "Problems to open the SCM"); - CloseServiceHandle(scm); - return FALSE; - } - else // Install the new service - { newService = CreateService( - scm, - szInternName, - szDisplayName, - dwDesiredAccess, //default: SERVICE_ALL_ACCESS - dwServiceType, //default: SERVICE_WIN32_OWN_PROCESS - (startType == 1 ? SERVICE_AUTO_START : SERVICE_DEMAND_START), //default: SERVICE_AUTOSTART - dwErrorControl, //default: SERVICE_ERROR_NORMAL - szFullPath, //exec full path - szLoadOrderGroup, //default: NULL - lpdwTagID, //default: NULL - szDependencies, //default: NULL - szAccountName, //default: NULL - szPassword); //default: NULL - - if (!newService) + if (!(newService= + CreateService(scm, + szInternName, + szDisplayName, + dwDesiredAccess,//default: SERVICE_ALL_ACCESS + dwServiceType, //default: SERVICE_WIN32_OWN_PROCESS + //default: SERVICE_AUTOSTART + (startType == 1 ? SERVICE_AUTO_START : + SERVICE_DEMAND_START), + dwErrorControl, //default: SERVICE_ERROR_NORMAL + szFullPath, //exec full path + szLoadOrderGroup, //default: NULL + lpdwTagID, //default: NULL + szDependencies, //default: NULL + szAccountName, //default: NULL + szPassword))) //default: NULL + printf("Failed to install the service (Couldn't create service)\n"); + else { - printf("Failed to install the service.\n" - "Problems to create the service."); - CloseServiceHandle(scm); - CloseServiceHandle(newService); - return FALSE; + printf("Service successfully installed.\n"); + CloseServiceHandle(newService); + ret_val=TRUE; // Everything went ok } - else - printf("Service successfully installed.\n"); - } - CloseServiceHandle(scm); - CloseServiceHandle(newService); - return TRUE; - + CloseServiceHandle(scm); + } + return ret_val; } + + /* ------------------------------------------------------------------------ Remove() - Removes the service nError values: @@ -163,9 +163,10 @@ BOOL NTService::Install(int startType, LPCSTR szInternName,LPCSTR szDisplayName, 2 Failed to locate service 3 Failed to delete service -------------------------------------------------------------------------- */ + BOOL NTService::Remove(LPCSTR szInternName) { - + BOOL ret_value=FALSE; SC_HANDLE service, scm; if (!SeekStatus(szInternName,0)) @@ -174,44 +175,28 @@ BOOL NTService::Remove(LPCSTR szInternName) nError=0; // open a connection to the SCM - scm = OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE); - - if (!scm) + if (!(scm = OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE))) { - printf("Failed to remove the service\n" - "Problems to open the SCM"); - CloseServiceHandle(scm); - return FALSE; + printf("Failed to remove the service (Couldn't open the SCM)\n"); } else { - //open the service - service = OpenService(scm,szInternName, DELETE ); - if(service) + if ((service = OpenService(scm,szInternName, DELETE))) { - if(!DeleteService(service)) - { + if (!DeleteService(service)) printf("Failed to remove the service\n"); - CloseServiceHandle(service); - CloseServiceHandle(scm); - return FALSE; - } else + { printf("Service successfully removed.\n"); - } - else - { - printf("Failed to remove the service\n"); - printf("Problems to open the service\n"); + ret_value=TRUE; // everything went ok + } CloseServiceHandle(service); - CloseServiceHandle(scm); - return FALSE; } + else + printf("Failed to remove the service (Couldn't open the service)\n"); + CloseServiceHandle(scm); } - - CloseServiceHandle(service); - CloseServiceHandle(scm); - return TRUE; + return ret_value; } /* ------------------------------------------------------------------------ @@ -229,80 +214,66 @@ void NTService::Stop(void) ServiceMain() - This is the function that is called from the service manager to start the service -------------------------------------------------------------------------- */ + void NTService::ServiceMain(DWORD argc, LPTSTR *argv) { // registration function - pService->hServiceStatusHandle = - RegisterServiceCtrlHandler(pService->ServiceName, - (LPHANDLER_FUNCTION )NTService::ServiceCtrlHandler); - - if(!pService->hServiceStatusHandle) - { - pService->Exit(GetLastError()); - return; - } + if (!(pService->hServiceStatusHandle = + RegisterServiceCtrlHandler(pService->ServiceName, + (LPHANDLER_FUNCTION) + NTService::ServiceCtrlHandler))) + goto error; // notify SCM of progress - if(!pService->SetStatus(SERVICE_START_PENDING,NO_ERROR, 0, 1, 8000)) - { - pService->Exit(GetLastError()); - return; - } + if (!pService->SetStatus(SERVICE_START_PENDING,NO_ERROR, 0, 1, 8000)) + goto error; // create the exit event - pService->hExitEvent = CreateEvent (0, TRUE, FALSE,0); - if(!pService->hExitEvent) - { - pService->Exit(GetLastError()); - return; - } + if (!(pService->hExitEvent = CreateEvent (0, TRUE, FALSE,0))) + goto error; - if(!pService->SetStatus(SERVICE_START_PENDING,NO_ERROR, 0, 3, pService->nStartTimeOut)) - { - pService->Exit(GetLastError()); - return; - } + if (!pService->SetStatus(SERVICE_START_PENDING,NO_ERROR, 0, 3, + pService->nStartTimeOut)) + goto error; // save start arguments pService->my_argc=argc; pService->my_argv=argv; // start the service - if(!pService->StartService()) - { - pService->Exit(GetLastError()); - return; - } + if (!pService->StartService()) + goto error; - // the service is now running. - if(!pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0)) - { - pService->Exit(GetLastError()); - return; - } + // Check that the service is now running. + if (!pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0)) + goto error; // wait for exit event WaitForSingleObject (pService->hExitEvent, INFINITE); // wait for thread to exit - if (WaitForSingleObject (pService->hThreadHandle, 1000)==WAIT_TIMEOUT) + if (WaitForSingleObject (pService->hThreadHandle, 1000) == WAIT_TIMEOUT) CloseHandle(pService->hThreadHandle); pService->Exit(0); + return; + +error: + pService->Exit(GetLastError()); + return; } /* ------------------------------------------------------------------------ StartService() - starts the appliaction thread -------------------------------------------------------------------------- */ + BOOL NTService::StartService() { - // Start the real service's thread (application) - hThreadHandle = (HANDLE) _beginthread((THREAD_FC)fpServiceThread,0,(void *)this); - - if (hThreadHandle==0) return FALSE; - + if (!(hThreadHandle = (HANDLE) _beginthread((THREAD_FC)fpServiceThread,0, + (void *) this))) + return FALSE; bRunning = TRUE; return TRUE; } @@ -314,7 +285,7 @@ void NTService::StopService() bRunning=FALSE; // Set the event for application - if(hShutdownEvent) + if (hShutdownEvent) SetEvent(hShutdownEvent); // Set the event for ServiceMain @@ -325,113 +296,119 @@ void NTService::StopService() -------------------------------------------------------------------------- */ void NTService::PauseService() { - bPause = TRUE; - SuspendThread(hThreadHandle); + bPause = TRUE; + SuspendThread(hThreadHandle); } /* ------------------------------------------------------------------------ -------------------------------------------------------------------------- */ void NTService::ResumeService() { - bPause=FALSE; - ResumeThread(hThreadHandle); + bPause=FALSE; + ResumeThread(hThreadHandle); } /* ------------------------------------------------------------------------ -------------------------------------------------------------------------- */ BOOL NTService::SetStatus (DWORD dwCurrentState,DWORD dwWin32ExitCode, - DWORD dwServiceSpecificExitCode,DWORD dwCheckPoint,DWORD dwWaitHint) + DWORD dwServiceSpecificExitCode, DWORD dwCheckPoint, + DWORD dwWaitHint) { BOOL bRet; SERVICE_STATUS serviceStatus; - dwState=dwCurrentState; - - serviceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; - serviceStatus.dwCurrentState = dwCurrentState; + dwState=dwCurrentState; - if (dwCurrentState == SERVICE_START_PENDING) - serviceStatus.dwControlsAccepted = 0; //don't accept conrol events - else - serviceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | - SERVICE_ACCEPT_PAUSE_CONTINUE | SERVICE_ACCEPT_SHUTDOWN; + serviceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + serviceStatus.dwCurrentState = dwCurrentState; - // if a specific exit code is defined,set up the win32 exit code properly - if (dwServiceSpecificExitCode == 0) - serviceStatus.dwWin32ExitCode = dwWin32ExitCode; - else - serviceStatus.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR; + if (dwCurrentState == SERVICE_START_PENDING) + serviceStatus.dwControlsAccepted = 0; //don't accept control events + else + serviceStatus.dwControlsAccepted = (SERVICE_ACCEPT_STOP | + SERVICE_ACCEPT_PAUSE_CONTINUE | + SERVICE_ACCEPT_SHUTDOWN); - serviceStatus.dwServiceSpecificExitCode = dwServiceSpecificExitCode; + // if a specific exit code is defined,set up the win32 exit code properly + if (dwServiceSpecificExitCode == 0) + serviceStatus.dwWin32ExitCode = dwWin32ExitCode; + else + serviceStatus.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR; - serviceStatus.dwCheckPoint = dwCheckPoint; - serviceStatus.dwWaitHint = dwWaitHint; + serviceStatus.dwServiceSpecificExitCode = dwServiceSpecificExitCode; - // Pass the status to the Service Manager - bRet=SetServiceStatus (hServiceStatusHandle, &serviceStatus); + serviceStatus.dwCheckPoint = dwCheckPoint; + serviceStatus.dwWaitHint = dwWaitHint; - if(!bRet) StopService(); + // Pass the status to the Service Manager + if (!(bRet=SetServiceStatus (hServiceStatusHandle, &serviceStatus))) + StopService(); - return bRet; + return bRet; } /* ------------------------------------------------------------------------ -------------------------------------------------------------------------- */ void NTService::ServiceCtrlHandler(DWORD ctrlCode) { + DWORD dwState; - DWORD dwState = 0; - - if(!pService) return; + if (!pService) + return; dwState=pService->dwState; // get current state - switch(ctrlCode) - { + switch(ctrlCode) { - /*********** do we need this ? ******************************* - case SERVICE_CONTROL_PAUSE: - if (pService->bRunning && ! pService->bPause) - { - dwState = SERVICE_PAUSED; - pService->SetStatus(SERVICE_PAUSE_PENDING,NO_ERROR, 0, 1, pService->nPauseTimeOut); - pService->PauseService(); - } - break; - - case SERVICE_CONTROL_CONTINUE: - if (pService->bRunning && pService->bPause) - { - dwState = SERVICE_RUNNING; - pService->SetStatus(SERVICE_CONTINUE_PENDING,NO_ERROR, 0, 1, pService->nResumeTimeOut); - pService->ResumeService(); - } - break; - ****************************************************************/ - - case SERVICE_CONTROL_SHUTDOWN: - case SERVICE_CONTROL_STOP: - dwState = SERVICE_STOP_PENDING; - pService->SetStatus(SERVICE_STOP_PENDING,NO_ERROR, 0, 1, pService->nStopTimeOut); - pService->StopService(); - break; - - default: - pService->SetStatus(dwState, NO_ERROR,0, 0, 0); - break; +#ifdef NOT_USED /* do we need this ? */ + case SERVICE_CONTROL_PAUSE: + if (pService->bRunning && ! pService->bPause) + { + dwState = SERVICE_PAUSED; + pService->SetStatus(SERVICE_PAUSE_PENDING,NO_ERROR, 0, 1, + pService->nPauseTimeOut); + pService->PauseService(); + } + break; + + case SERVICE_CONTROL_CONTINUE: + if (pService->bRunning && pService->bPause) + { + dwState = SERVICE_RUNNING; + pService->SetStatus(SERVICE_CONTINUE_PENDING,NO_ERROR, 0, 1, + pService->nResumeTimeOut); + pService->ResumeService(); + } + break; +#endif + + case SERVICE_CONTROL_SHUTDOWN: + case SERVICE_CONTROL_STOP: + dwState = SERVICE_STOP_PENDING; + pService->SetStatus(SERVICE_STOP_PENDING,NO_ERROR, 0, 1, + pService->nStopTimeOut); + pService->StopService(); + break; + + default: + pService->SetStatus(dwState, NO_ERROR,0, 0, 0); + break; } //pService->SetStatus(dwState, NO_ERROR,0, 0, 0); } + /* ------------------------------------------------------------------------ -------------------------------------------------------------------------- */ + void NTService::Exit(DWORD error) { - if (hExitEvent) CloseHandle(hExitEvent); + if (hExitEvent) + CloseHandle(hExitEvent); // Send a message to the scm to tell that we stop if (hServiceStatusHandle) - SetStatus(SERVICE_STOPPED, error,0, 0, 0); + SetStatus(SERVICE_STOPPED, error,0, 0, 0); // If the thread has started kill it ??? // if (hThreadHandle) CloseHandle(hThreadHandle); @@ -441,100 +418,64 @@ void NTService::Exit(DWORD error) /* ------------------------------------------------------------------------ -------------------------------------------------------------------------- */ + BOOL NTService::SeekStatus(LPCSTR szInternName, int OperationType) { + BOOL ret_value=FALSE; SC_HANDLE service, scm; - LPQUERY_SERVICE_CONFIG ConfigBuf; - DWORD dwSize; - SERVICE_STATUS ss; - DWORD dwState = 0xFFFFFFFF; - int k; // open a connection to the SCM - scm = OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE); - - if (!scm) /* problems with the SCM */ - { + if (!(scm = OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE))) printf("There is a problem with the Service Control Manager!\n"); - CloseServiceHandle(scm); - return FALSE; - } - - if (OperationType == 1) /* an install operation */ + else { - service = OpenService(scm,szInternName, SERVICE_ALL_ACCESS ); - if(service) + if (OperationType == 1) { - ConfigBuf = (LPQUERY_SERVICE_CONFIG) LocalAlloc(LPTR, 4096); - printf("The service already exists!\n"); - if ( QueryServiceConfig(service,ConfigBuf,4096,&dwSize) ) + /* an install operation */ + if ((service = OpenService(scm,szInternName, SERVICE_ALL_ACCESS ))) { - printf("The current server installed: %s\n", ConfigBuf->lpBinaryPathName); + LPQUERY_SERVICE_CONFIG ConfigBuf; + DWORD dwSize; + + ConfigBuf = (LPQUERY_SERVICE_CONFIG) LocalAlloc(LPTR, 4096); + printf("The service already exists!\n"); + if (QueryServiceConfig(service,ConfigBuf,4096,&dwSize)) + printf("The current server installed: %s\n", + ConfigBuf->lpBinaryPathName); + LocalFree(ConfigBuf); + CloseServiceHandle(service); } - LocalFree(ConfigBuf); - CloseServiceHandle(scm); - CloseServiceHandle(service); - return FALSE; - } - else - { - CloseServiceHandle(scm); - CloseServiceHandle(service); - return TRUE; - } - } - else /* a remove operation */ - { - service = OpenService(scm,szInternName, SERVICE_ALL_ACCESS ); - if(!service) - { - printf("The service doesn't exists!\n"); - CloseServiceHandle(scm); - CloseServiceHandle(service); - return FALSE; + else + ret_value=TRUE; } - - memset(&ss, 0, sizeof(ss)); - k = QueryServiceStatus(service,&ss); - if (k) + else { - dwState = ss.dwCurrentState; - if (dwState == SERVICE_RUNNING ) - { - printf("Failed to remove the service:\n"); - printf("The service is running!\n" - "Stop the server and try again."); - CloseServiceHandle(service); - CloseServiceHandle(scm); - return FALSE; - } - else if (dwState == SERVICE_STOP_PENDING) - { - printf("Failed to remove the service:\n"); - printf("The service is in stop pending state!\n" - "Wait 30 seconds and try again.\n" - "If this condition persist, reboot the machine\n" - "and try again"); - CloseServiceHandle(service); - CloseServiceHandle(scm); - return FALSE; - } + /* a remove operation */ + if (!(service = OpenService(scm,szInternName, SERVICE_ALL_ACCESS ))) + printf("The service doesn't exists!\n"); else { - CloseServiceHandle(scm); + SERVICE_STATUS ss; + + memset(&ss, 0, sizeof(ss)); + if (QueryServiceStatus(service,&ss)) + { + DWORD dwState = ss.dwCurrentState; + if (dwState == SERVICE_RUNNING) + printf("Failed to remove the service because the service is running\nStop the service and try again\n"); + else if (dwState == SERVICE_STOP_PENDING) + printf("\ +Failed to remove the service because the service is in stop pending state!\n\ +Wait 30 seconds and try again.\n\ +If this condition persist, reboot the machine and try again\n"); + else + ret_value= TRUE; + } CloseServiceHandle(service); - return TRUE; } - } - else - { - CloseServiceHandle(scm); - CloseServiceHandle(service); - } - } - - return FALSE; - + } + CloseServiceHandle(scm); + } + return ret_value; } -/* ------------------------- the end -------------------------------------- */ diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 8ab9490e6e8..d1638bee16e 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -224,14 +224,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index a9ae97ff293..6585f717a78 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -218,14 +218,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 54d79293c74..d14400edc69 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -167,6 +167,8 @@ "Communicatiepakket kon niet worden gedecomprimeerd", "Fout bij het lezen van communicatiepakketten" "Timeout bij het lezen van communicatiepakketten", +"Got an error writing communication packets", +"Got timeout writing communication packets", "Resultaat string is langer dan max_allowed_packet", "Het gebruikte tabel type ondersteunt geen BLOB/TEXT kolommen", "Het gebruikte tabel type ondersteunt geen AUTO_INCREMENT kolommen", @@ -219,14 +221,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 895a34abafe..384d2c846c2 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -215,15 +215,7 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", -"Cannot delete a parent row: a foreign key constraint fails",
\ No newline at end of file +"Cannot delete a parent row: a foreign key constraint fails", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 6411be85b1b..20891c7b001 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -219,14 +219,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 3b1957e0f3b..104e561d642 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -215,14 +215,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 71ed306caa3..d0a08a1e7a8 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -218,14 +218,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 13e49221808..f778cb857d7 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -215,15 +215,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 28e890daea2..6ff12c8b49e 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -217,15 +217,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 5e64ebcc099..7a3daca9a59 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -215,15 +215,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 6bf0d588c08..fab60948943 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -217,15 +217,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 6448b8f7327..0dac448e2b2 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -215,15 +215,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/norwegian-ny/.cvsignore b/sql/share/norwegian-ny/.cvsignore deleted file mode 100755 index 2f68f259c40..00000000000 --- a/sql/share/norwegian-ny/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -errmsg.sys diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index ab213ed3f13..78075c3990c 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -217,15 +217,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/norwegian/.cvsignore b/sql/share/norwegian/.cvsignore deleted file mode 100755 index 2f68f259c40..00000000000 --- a/sql/share/norwegian/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -errmsg.sys diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index d51901b8a21..997d667f812 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -217,15 +217,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 4b16c7d5b25..f317d99d48f 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -219,15 +219,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 7971e29cb96..a3ae06d193f 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -215,15 +215,6 @@ "NЦo И permitido a %-.32s@%-.64s criar novos usuАrios", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 2347994c418..26d9f34528a 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -219,15 +219,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 8be8cccc8ea..c02c47696b0 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -207,26 +207,17 @@ "Этот сервер не slave, исправьте в конфигурационном файле или коммандой CHANGE MASTER TO", "Не получилось инициализировать структуру master info, проверте persmissions на файле master.info", "Не могу создать процесс SLAVE, проверьте системные ресурсы", -"User %-.64s has already more than 'max_user_connections' active connections", -"You may only use constant expressions with SET", -"Lock wait timeout exceeded", -"The total number of locks exceeds the lock table size", -"Update locks cannot be acquired during a READ UNCOMMITTED transaction", -"DROP DATABASE not allowed while thread is holding global read lock", -"CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", -"Incorrect table definition; All MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", +"У пользователя %-.64s уже больше чем 'max_user_connections' активных соединений", +"Можно использовать только выражение-константу совместно с SET", +"Таймаут ожидания блокировки", +"Общее количество блокировок превысило размер таблицы блокировок", +"Блокировка изменения не может быть получена во время READ UNCOMMITTED транзакции", +"DROP DATABASE запрещен во время глобальной блокировки чтения", +"CREATE DATABASE запрещен во время глобальной блокировки чтения", +"Неправильные аргуметны у %s", +"%-.32s@%-.64s не имеет привилегий создавать новых пользователей", +"Неверное определение таблицы; Все MERGE-таблицы должны быть в одной базе данных", +"Обнаружен deadlock во время получения блокировки; Попробуйте перезапустить транзакцию", "Таблица данного типа не может иметь FULLTEXT индекса", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 4e3b9090e4f..189db8a66f8 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -223,15 +223,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 298884151ea..57d4ac9646a 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -216,15 +216,6 @@ "%-.32s@%-.64s is not allowed to create new users", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 1498090101e..7e8dcaaafcc 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -215,16 +215,7 @@ "%-.32s@%-.64s har inte rДttigheter att skapa nya anvДndare", "Felaktig tabell definition: Alla tabeller i en MERGE tabell mЕste vara i samma databas", "Fick 'DEADLOCK' vid lЕsfЖrsЖk av block/rad; FЖrsЖk att starta om transaktionen", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"The used table type doesn't support FULLTEXT indexes", -"Cannot add foreign key constraint", -"Cannot add a child row: a foreign key constraint fails", -"Cannot delete a parent row: a foreign key constraint fails", +"Tabelltypen har inte hantering av FULLTEXT index", +"Kan inte lДgga till 'FOREIGN KEY constraint'", +"FOREIGN KEY konflikt: Kan inte skriva barn", +"FOREIGN KEY konflikt: Kan inte radera fader", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 628134a0ef6..4508fc75c27 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -220,15 +220,6 @@ "Користувачу %-.32s@%-.64s не дозволено створювати нових користувач╕в", "Incorrect table definition; All MERGE tables must be in the same database", "Deadlock found when trying to get lock; Try restarting transaction", -"Deadlock found when trying to get lock; Try restarting transaction", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", -"Dummy error message: this error number should only occur in MySQL-4", "Використаний тип таблиц╕ не п╕дтриму╓ FULLTEXT ╕ндекс╕в", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", diff --git a/sql/sql_select.cc b/sql/sql_select.cc index ef3cacf114c..14f09454734 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2942,7 +2942,9 @@ propagate_cond_constants(I_List<COND_CMP> *save_list,COND *and_level, Item_func_eq *func=(Item_func_eq*) cond; bool left_const= func->arguments()[0]->const_item(); bool right_const=func->arguments()[1]->const_item(); - if (!(left_const && right_const)) + if (!(left_const && right_const) && + (func->arguments()[0]->result_type() == + (func->arguments()[1]->result_type()))) { if (right_const) { @@ -3986,14 +3988,17 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure) { if (table->group && join->tmp_table_param.sum_func_count) { - DBUG_PRINT("info",("Using end_update")); if (table->keys) { + DBUG_PRINT("info",("Using end_update")); end_select=end_update; table->file->index_init(0); } else + { + DBUG_PRINT("info",("Using end_unique_update")); end_select=end_unique_update; + } } else if (join->sort_and_group) { @@ -4109,8 +4114,6 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) int error; bool found=0; COND *on_expr=join_tab->on_expr, *select_cond=join_tab->select_cond; - int (*next_select)(JOIN *,struct st_join_table *,bool)= - join_tab->next_select; if (!(error=(*join_tab->read_first_record)(join_tab))) { @@ -4134,7 +4137,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) break; // Searching after not null columns if (!select_cond || select_cond->val_int()) { - if ((error=(*next_select)(join,join_tab+1,0)) < 0) + if ((error=(*join_tab->next_select)(join,join_tab+1,0)) < 0) return error; if (not_used_in_distinct && found_records != join->found_records) return 0; @@ -4155,7 +4158,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) mark_as_null_row(join_tab->table); // For group by without error if (!select_cond || select_cond->val_int()) { - if ((error=(*next_select)(join,join_tab+1,0)) < 0) + if ((error=(*join_tab->next_select)(join,join_tab+1,0)) < 0) return error; /* purecov: inspected */ } } |