Commit 8226b37a authored by unknown's avatar unknown

Changed --replace to --replace_result in mysqltest

Changed errmsg -> my_errmsg (portability issue)
Fixed that mysqlbinlog writes SET TIMESTAMP before all queries
Fixed comments in default my.cnf files


Docs/manual.texi:
  Updated information about character sets
client/mysqladmin.c:
  Added missing help text
client/mysqltest.c:
  Changed --replace to --replace_result to not conflict with SQL replace command
include/my_sys.h:
  change errmsg -> my_errmsg (portability issue)
libmysql/errmsg.c:
  change errmsg -> my_errmsg (portability issue)
myisam/mi_cache.c:
  Changed seek+read to pread
myisam/mi_check.c:
  Fix bug that caused myisamchk to be very slow under some specific error conditions
myisam/mi_dynrec.c:
  cleanup
myisam/myisamchk.c:
  Write out value of checksum
myisam/myisamdef.h:
  cleanup
mysql-test/r/backup.result:
  Fixed the case where backup caused different error messages
mysql-test/r/bdb.result:
  Added new test case
mysql-test/r/fulltext.result:
  Fix for new CREATE TABLE format
mysql-test/t/backup.test:
  Use --replace_result and --send
mysql-test/t/bdb.test:
  New test case
mysql-test/t/status.test:
  Use --send
mysys/errors.c:
  change errmsg -> my_errmsg (portability issue)
mysys/my_error.c:
  change errmsg -> my_errmsg (portability issue)
mysys/typelib.c:
  Only accept full type names
sql/derror.cc:
  change errmsg -> my_errmsg (portability issue)
sql/ha_berkeley.cc:
  Fixed bug when using key parts that could be NULL
sql/log_event.cc:
  Log SET TIMESTAMP before all queries
sql/mysqlbinlog.cc:
  Incremented version number
sql/mysqld.cc:
  change errmsg -> my_errmsg (portability issue)
  Always accept --skip-gemeni, --skip-bdb and --skip-innobase
sql/slave.cc:
  cleanup
sql/sql_base.cc:
  cleanup
sql/sql_db.cc:
  cleanup
support-files/my-huge.cnf.sh:
  Remove usage of # at end of line
support-files/my-large.cnf.sh:
  Remove usage of # at end of line
support-files/my-medium.cnf.sh:
  Remove usage of # at end of line
support-files/my-small.cnf.sh:
  Remove usage of # at end of line
parent e9255e42
This diff is collapsed.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <my_pthread.h> /* because of signal() */ #include <my_pthread.h> /* because of signal() */
#endif #endif
#define ADMIN_VERSION "8.15" #define ADMIN_VERSION "8.16"
#define MAX_MYSQL_VAR 64 #define MAX_MYSQL_VAR 64
#define MAX_TIME_TO_WAIT 3600 /* Wait for shutdown */ #define MAX_TIME_TO_WAIT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3 #define MAX_TRUNC_LENGTH 3
...@@ -853,6 +853,8 @@ static void usage(void) ...@@ -853,6 +853,8 @@ static void usage(void)
refresh Flush all tables and close and open logfiles\n\ refresh Flush all tables and close and open logfiles\n\
shutdown Take server down\n\ shutdown Take server down\n\
status Gives a short status message from the server\n\ status Gives a short status message from the server\n\
start-slave Start slave\n\
stop-slave Stop slave\n\
variables Prints variables available\n\ variables Prints variables available\n\
version Get version info from server"); version Get version info from server");
} }
......
...@@ -157,7 +157,7 @@ struct st_query ...@@ -157,7 +157,7 @@ struct st_query
const char *command_names[] = { const char *command_names[] = {
"connection", "query","connect","sleep","inc","dec","source","disconnect", "connection", "query","connect","sleep","inc","dec","source","disconnect",
"let","echo","while","end","system","result", "require", "save_master_pos", "let","echo","while","end","system","result", "require", "save_master_pos",
"sync_with_master", "error", "send", "reap", "dirty_close", "replace", 0 "sync_with_master", "error", "send", "reap", "dirty_close", "replace_result", 0
}; };
TYPELIB command_typelib= {array_elements(command_names),"", TYPELIB command_typelib= {array_elements(command_names),"",
...@@ -723,22 +723,22 @@ static void get_replace(struct st_query *q) ...@@ -723,22 +723,22 @@ static void get_replace(struct st_query *q)
{ {
uint i; uint i;
char *from=q->first_argument; char *from=q->first_argument;
char *buff=my_malloc(strlen(from),MYF(MY_WME | MY_FAE)); char *buff,*start;
char word_end_chars[256],*pos; char word_end_chars[256],*pos;
POINTER_ARRAY to_array,from_array; POINTER_ARRAY to_array,from_array;
DBUG_ENTER("get_replace"); DBUG_ENTER("get_replace");
bzero((char*) &to_array,sizeof(to_array)); bzero((char*) &to_array,sizeof(to_array));
bzero((char*) &from_array,sizeof(from_array)); bzero((char*) &from_array,sizeof(from_array));
if (!*from) if (!*from)
die("Missing argument in %s\n", q->query); die("Missing argument in %s\n", q->query);
start=buff=my_malloc(strlen(from)+1,MYF(MY_WME | MY_FAE));
while (*from) while (*from)
{ {
char *to=buff; char *to=buff;
get_string(&buff, &from, q); get_string(&buff, &from, q);
if (!*from) if (!*from)
die("Wrong number of arguments in %s\n", q->query); die("Wrong number of arguments to replace in %s\n", q->query);
insert_pointer_name(&from_array,to); insert_pointer_name(&from_array,to);
to=buff; to=buff;
get_string(&buff, &from, q); get_string(&buff, &from, q);
...@@ -747,6 +747,7 @@ static void get_replace(struct st_query *q) ...@@ -747,6 +747,7 @@ static void get_replace(struct st_query *q)
for (i=1,pos=word_end_chars ; i < 256 ; i++) for (i=1,pos=word_end_chars ; i < 256 ; i++)
if (isspace(i)) if (isspace(i))
*pos++=i; *pos++=i;
*pos=0; /* End pointer */
if (!(glob_replace=init_replace((char**) from_array.typelib.type_names, if (!(glob_replace=init_replace((char**) from_array.typelib.type_names,
(char**) to_array.typelib.type_names, (char**) to_array.typelib.type_names,
(uint) from_array.typelib.count, (uint) from_array.typelib.count,
...@@ -755,13 +756,16 @@ static void get_replace(struct st_query *q) ...@@ -755,13 +756,16 @@ static void get_replace(struct st_query *q)
die("Can't initialize replace from %s\n", q->query); die("Can't initialize replace from %s\n", q->query);
free_pointer_array(&from_array); free_pointer_array(&from_array);
free_pointer_array(&to_array); free_pointer_array(&to_array);
my_free(buff, MYF(0)); my_free(start, MYF(0));
} }
void free_replace() void free_replace()
{ {
DBUG_ENTER("free_replace");
my_free((char*) glob_replace,MYF(0)); my_free((char*) glob_replace,MYF(0));
glob_replace=0;
free_replace_buffer(); free_replace_buffer();
DBUG_VOID_RETURN;
} }
...@@ -1270,7 +1274,7 @@ int parse_args(int argc, char **argv) ...@@ -1270,7 +1274,7 @@ int parse_args(int argc, char **argv)
{ {
switch(c) { switch(c) {
case '#': case '#':
DBUG_PUSH(optarg ? optarg : "d:t:o,/tmp/mysqltest.trace"); DBUG_PUSH(optarg ? optarg : "d:t:O,/tmp/mysqltest.trace");
break; break;
case 'v': case 'v':
verbose = 1; verbose = 1;
...@@ -1530,7 +1534,7 @@ void get_query_type(struct st_query* q) ...@@ -1530,7 +1534,7 @@ void get_query_type(struct st_query* q)
save=q->query[q->first_word_len]; save=q->query[q->first_word_len];
q->query[q->first_word_len]=0; q->query[q->first_word_len]=0;
type=find_type(q->query, &command_typelib, 1); type=find_type(q->query, &command_typelib, 1+2);
q->query[q->first_word_len]=save; q->query[q->first_word_len]=save;
if (type > 0) if (type > 0)
q->type=type; /* Found command */ q->type=type; /* Found command */
...@@ -1541,7 +1545,7 @@ int main(int argc, char** argv) ...@@ -1541,7 +1545,7 @@ int main(int argc, char** argv)
{ {
int error = 0; int error = 0;
struct st_query* q; struct st_query* q;
my_bool require_file=0; my_bool require_file=0,q_send_flag=0;
char save_file[FN_REFLEN]; char save_file[FN_REFLEN];
MY_INIT(argv[0]); MY_INIT(argv[0]);
...@@ -1579,7 +1583,7 @@ int main(int argc, char** argv) ...@@ -1579,7 +1583,7 @@ int main(int argc, char** argv)
0)) 0))
die("Failed in mysql_real_connect(): %s", mysql_error(&cur_con->mysql)); die("Failed in mysql_real_connect(): %s", mysql_error(&cur_con->mysql));
for(;!read_query(&q);) while (!read_query(&q))
{ {
int current_line_inc = 1, processed = 0; int current_line_inc = 1, processed = 0;
if (q->type == Q_UNKNOWN || q->type == Q_COMMENT_WITH_COMMAND) if (q->type == Q_UNKNOWN || q->type == Q_COMMENT_WITH_COMMAND)
...@@ -1604,9 +1608,13 @@ int main(int argc, char** argv) ...@@ -1604,9 +1608,13 @@ int main(int argc, char** argv)
case Q_REAP: case Q_REAP:
{ {
int flags = QUERY_REAP; int flags = QUERY_REAP;
if(q->type == Q_QUERY) if (q->type == Q_QUERY)
flags |= QUERY_SEND; flags |= QUERY_SEND;
if (q_send_flag)
{
flags=QUERY_SEND;
q_send_flag=0;
}
if (save_file[0]) if (save_file[0])
{ {
strmov(q->record_file,save_file); strmov(q->record_file,save_file);
...@@ -1617,8 +1625,7 @@ int main(int argc, char** argv) ...@@ -1617,8 +1625,7 @@ int main(int argc, char** argv)
break; break;
} }
case Q_SEND: case Q_SEND:
q->query += q->first_word_len; q_send_flag=1;
error |= run_query(&cur_con->mysql, q, QUERY_SEND);
break; break;
case Q_RESULT: case Q_RESULT:
get_file_name(save_file,q); get_file_name(save_file,q);
...@@ -1673,8 +1680,8 @@ int main(int argc, char** argv) ...@@ -1673,8 +1680,8 @@ int main(int argc, char** argv)
} }
free_used_memory(); free_used_memory();
exit(error); exit(error ? 1 : 0);
return error; return error ? 1 : 0; /* Keep compiler happy */
} }
...@@ -1789,7 +1796,6 @@ void free_pointer_array(POINTER_ARRAY *pa) ...@@ -1789,7 +1796,6 @@ void free_pointer_array(POINTER_ARRAY *pa)
pa->typelib.type_names=0; pa->typelib.type_names=0;
my_free((gptr) pa->str,MYF(0)); my_free((gptr) pa->str,MYF(0));
} }
return;
} /* free_pointer_array */ } /* free_pointer_array */
......
...@@ -162,7 +162,7 @@ void __CDECL hfree(void *ptr); ...@@ -162,7 +162,7 @@ void __CDECL hfree(void *ptr);
#else #else
extern int errno; /* declare errno */ extern int errno; /* declare errno */
#endif #endif
extern const char ** NEAR errmsg[]; extern const char ** NEAR my_errmsg[];
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE]; extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */ extern char *home_dir; /* Home directory for user */
extern char *my_progname; /* program-name (printed in errors) */ extern char *my_progname; /* program-name (printed in errors) */
......
...@@ -78,5 +78,5 @@ const char *client_errors[]= ...@@ -78,5 +78,5 @@ const char *client_errors[]=
void init_client_errs(void) void init_client_errs(void)
{ {
errmsg[CLIENT_ERRMAP] = &client_errors[0]; my_errmsg[CLIENT_ERRMAP] = &client_errors[0];
} }
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
/* Used instead of my_b_read() to allow for no-cacheed seeks */ /* Used instead of my_b_read() to allow for no-cacheed seeks */
#include "myisamdef.h" #include "myisamdef.h"
#define READING_NEXT 1
#define READING_HEADER 2
/* Copy block from cache if it`s in it. If re_read_if_possibly is */ /* Copy block from cache if it`s in it. If re_read_if_possibly is */
/* set read to cache (if after current file-position) else read to */ /* set read to cache (if after current file-position) else read to */
...@@ -39,8 +37,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, ...@@ -39,8 +37,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos))
read_length=(uint) (info->pos_in_file-pos); read_length=(uint) (info->pos_in_file-pos);
info->seek_not_done=1; info->seek_not_done=1;
VOID(my_seek(info->file,pos,MY_SEEK_SET,MYF(0))); if (my_pread(info->file,buff,read_length,pos,MYF(MY_NABP)))
if (my_read(info->file,buff,read_length,MYF(MY_NABP)))
DBUG_RETURN(1); DBUG_RETURN(1);
if (!(length-=read_length)) if (!(length-=read_length))
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -85,8 +82,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, ...@@ -85,8 +82,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
DBUG_RETURN(0); DBUG_RETURN(0);
} }
info->seek_not_done=1; info->seek_not_done=1;
VOID(my_seek(info->file,pos,MY_SEEK_SET,MYF(0))); if ((read_length=my_pread(info->file,buff,length,pos,MYF(0))) == length)
if ((read_length=my_read(info->file,buff,length,MYF(0))) == length)
DBUG_RETURN(0); DBUG_RETURN(0);
if (!(flag & READING_HEADER) || (int) read_length == -1 || if (!(flag & READING_HEADER) || (int) read_length == -1 ||
read_length+in_buff_length < 3) read_length+in_buff_length < 3)
......
...@@ -745,12 +745,14 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) ...@@ -745,12 +745,14 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
do do
{ {
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header, if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,
(start_block=block_info.next_filepos), (start_block=block_info.next_filepos),
sizeof(block_info.header),test(! flag) | 2)) sizeof(block_info.header),
(flag ? 0 : READING_NEXT) | READING_HEADER))
goto err; goto err;
if (start_block & (MI_DYN_ALIGN_SIZE-1)) if (start_block & (MI_DYN_ALIGN_SIZE-1))
{ {
mi_check_print_error(param,"Wrong aligned block at %s",llstr(start_block,llbuff)); mi_check_print_error(param,"Wrong aligned block at %s",
llstr(start_block,llbuff));
goto err2; goto err2;
} }
b_type=_mi_get_block_info(&block_info,-1,start_block); b_type=_mi_get_block_info(&block_info,-1,start_block);
...@@ -841,7 +843,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) ...@@ -841,7 +843,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
got_error=1; break; got_error=1; break;
} }
if (_mi_read_cache(&param->read_cache,(byte*) to,block_info.filepos, if (_mi_read_cache(&param->read_cache,(byte*) to,block_info.filepos,
(uint) block_info.data_len, test(flag == 1))) (uint) block_info.data_len,
flag == 1 ? READING_NEXT : 0))
goto err; goto err;
to+=block_info.data_len; to+=block_info.data_len;
link_used+= block_info.filepos-start_block; link_used+= block_info.filepos-start_block;
...@@ -895,7 +898,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) ...@@ -895,7 +898,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
break; break;
case COMPRESSED_RECORD: case COMPRESSED_RECORD:
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header, pos, if (_mi_read_cache(&param->read_cache,(byte*) block_info.header, pos,
info->s->pack.ref_length, 1)) info->s->pack.ref_length, READING_NEXT))
goto err; goto err;
start_recpos=pos; start_recpos=pos;
splits++; splits++;
...@@ -910,7 +913,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) ...@@ -910,7 +913,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
break; break;
} }
if (_mi_read_cache(&param->read_cache,(byte*) info->rec_buff, if (_mi_read_cache(&param->read_cache,(byte*) info->rec_buff,
block_info.filepos, block_info.rec_len,1)) block_info.filepos, block_info.rec_len, READING_NEXT))
goto err; goto err;
if (_mi_pack_rec_unpack(info,record,info->rec_buff,block_info.rec_len)) if (_mi_pack_rec_unpack(info,record,info->rec_buff,block_info.rec_len))
{ {
...@@ -2112,6 +2115,7 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2112,6 +2115,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
{ {
pos=MY_ALIGN(pos,MI_DYN_ALIGN_SIZE); pos=MY_ALIGN(pos,MI_DYN_ALIGN_SIZE);
param->retry_without_quick=1; param->retry_without_quick=1;
sort_info->start_recpos=pos;
} }
do do
{ {
...@@ -2130,8 +2134,9 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2130,8 +2134,9 @@ static int sort_get_next_record(SORT_INFO *sort_info)
llstr(param->search_after_block,llbuff), llstr(param->search_after_block,llbuff),
llstr(sort_info->start_recpos,llbuff2)); llstr(sort_info->start_recpos,llbuff2));
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,pos, if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,pos,
MI_BLOCK_INFO_HEADER_LENGTH, MI_BLOCK_INFO_HEADER_LENGTH,
test(! found_record) | 2)) (! found_record ? READING_NEXT : 0) |
READING_HEADER))
{ {
if (found_record) if (found_record)
{ {
...@@ -2172,6 +2177,7 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2172,6 +2177,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
block_info.header[i] <= MI_MAX_DYN_HEADER_BYTE) block_info.header[i] <= MI_MAX_DYN_HEADER_BYTE)
break; break;
pos+=(ulong) i; pos+=(ulong) i;
sort_info->start_recpos=pos;
continue; continue;
} }
if (b_type & BLOCK_DELETED) if (b_type & BLOCK_DELETED)
...@@ -2206,7 +2212,8 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2206,7 +2212,8 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (found_record) if (found_record)
goto try_next; goto try_next;
searching=1; searching=1;
pos++; pos+= MI_DYN_ALIGN_SIZE;
sort_info->start_recpos=pos;
block_info.second_read=0; block_info.second_read=0;
continue; continue;
} }
...@@ -2226,7 +2233,8 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2226,7 +2233,8 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (found_record) if (found_record)
goto try_next; goto try_next;
searching=1; searching=1;
pos++; pos+= MI_DYN_ALIGN_SIZE;
sort_info->start_recpos=pos;
block_info.second_read=0; block_info.second_read=0;
continue; continue;
} }
...@@ -2242,7 +2250,10 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2242,7 +2250,10 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (found_record) if (found_record)
goto try_next; goto try_next;
if (searching) if (searching)
pos++; {
pos+=MI_DYN_ALIGN_SIZE;
sort_info->start_recpos=pos;
}
else else
pos=block_info.filepos+block_info.block_len; pos=block_info.filepos+block_info.block_len;
block_info.second_read=0; block_info.second_read=0;
...@@ -2275,7 +2286,7 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2275,7 +2286,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (left_length < block_info.data_len || ! block_info.data_len) if (left_length < block_info.data_len || ! block_info.data_len)
{ {
mi_check_print_info(param,"Found block with too small length at %s; Skipped", mi_check_print_info(param,"Found block with too small length at %s; Skipped",
llstr(sort_info->start_recpos,llbuff)); llstr(sort_info->start_recpos,llbuff));
goto try_next; goto try_next;
} }
if (block_info.filepos + block_info.data_len > if (block_info.filepos + block_info.data_len >
...@@ -2286,9 +2297,11 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2286,9 +2297,11 @@ static int sort_get_next_record(SORT_INFO *sort_info)
goto try_next; goto try_next;
} }
if (_mi_read_cache(&param->read_cache,to,block_info.filepos, if (_mi_read_cache(&param->read_cache,to,block_info.filepos,
block_info.data_len, test(found_record == 1))) block_info.data_len,
(found_record == 1 ? READING_NEXT : 0)))
{ {
mi_check_print_info(param,"Read error for block at: %s (error: %d); Skipped", mi_check_print_info(param,
"Read error for block at: %s (error: %d); Skipped",
llstr(block_info.filepos,llbuff),my_errno); llstr(block_info.filepos,llbuff),my_errno);
goto try_next; goto try_next;
} }
...@@ -2335,8 +2348,9 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2335,8 +2348,9 @@ static int sort_get_next_record(SORT_INFO *sort_info)
case COMPRESSED_RECORD: case COMPRESSED_RECORD:
for (searching=0 ;; searching=1, sort_info->pos++) for (searching=0 ;; searching=1, sort_info->pos++)
{ {
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,sort_info->pos, if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,
share->pack.ref_length,1)) sort_info->pos,
share->pack.ref_length,READING_NEXT))
DBUG_RETURN(-1); DBUG_RETURN(-1);
if (searching && ! sort_info->fix_datafile) if (searching && ! sort_info->fix_datafile)
{ {
...@@ -2361,10 +2375,11 @@ static int sort_get_next_record(SORT_INFO *sort_info) ...@@ -2361,10 +2375,11 @@ static int sort_get_next_record(SORT_INFO *sort_info)
continue; continue;
} }
if (_mi_read_cache(&param->read_cache,(byte*) info->rec_buff, if (_mi_read_cache(&param->read_cache,(byte*) info->rec_buff,
block_info.filepos, block_info.rec_len,1)) block_info.filepos, block_info.rec_len,
READING_NEXT))
{ {
if (! searching) if (! searching)
mi_check_print_info(param,"Couldn't read hole record from %s", mi_check_print_info(param,"Couldn't read whole record from %s",
llstr(sort_info->pos,llbuff)); llstr(sort_info->pos,llbuff));
continue; continue;
} }
......
...@@ -1294,8 +1294,9 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf, ...@@ -1294,8 +1294,9 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf,
if (info->opt_flag & READ_CACHE_USED) if (info->opt_flag & READ_CACHE_USED)
{ {
if (_mi_read_cache(&info->rec_cache,(byte*) block_info.header,filepos, if (_mi_read_cache(&info->rec_cache,(byte*) block_info.header,filepos,
sizeof(block_info.header), sizeof(block_info.header),
test(!flag && skipp_deleted_blocks) | 2)) (!flag && skipp_deleted_blocks ? READING_NEXT : 0) |
READING_HEADER))
goto panic; goto panic;
b_type=_mi_get_block_info(&block_info,-1,filepos); b_type=_mi_get_block_info(&block_info,-1,filepos);
} }
...@@ -1368,7 +1369,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf, ...@@ -1368,7 +1369,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf,
{ {
if (_mi_read_cache(&info->rec_cache,(byte*) to,filepos, if (_mi_read_cache(&info->rec_cache,(byte*) to,filepos,
block_info.data_len, block_info.data_len,
test(!flag && skipp_deleted_blocks))) (!flag && skipp_deleted_blocks) ? READING_NEXT :0))
goto panic; goto panic;
} }
else else
......
...@@ -201,7 +201,7 @@ static struct option long_options[] = ...@@ -201,7 +201,7 @@ static struct option long_options[] =
static void print_version(void) static void print_version(void)
{ {
printf("%s Ver 1.42 for %s at %s\n",my_progname,SYSTEM_TYPE, printf("%s Ver 1.44 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE); MACHINE_TYPE);
} }
...@@ -952,7 +952,8 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name) ...@@ -952,7 +952,8 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name)
share->base.raid_chunksize); share->base.raid_chunksize);
} }
if (share->options & HA_OPTION_CHECKSUM) if (share->options & HA_OPTION_CHECKSUM)
printf("Using checksums\n"); printf("Checksum: %23s\n",llstr(info->s->state.checksum,llbuff));
;
if (share->options & HA_OPTION_DELAY_KEY_WRITE) if (share->options & HA_OPTION_DELAY_KEY_WRITE)
printf("Keys are only flushed at close\n"); printf("Keys are only flushed at close\n");
......
...@@ -290,6 +290,10 @@ struct st_myisam_info { ...@@ -290,6 +290,10 @@ struct st_myisam_info {
#define STATE_NOT_OPTIMIZED_KEYS 16 #define STATE_NOT_OPTIMIZED_KEYS 16
#define STATE_NOT_SORTED_PAGES 32 #define STATE_NOT_SORTED_PAGES 32
/* options to mi_read_cache */
#define READING_NEXT 1
#define READING_HEADER 2
#define mi_getint(x) ((uint) mi_uint2korr(x) & 32767) #define mi_getint(x) ((uint) mi_uint2korr(x) & 32767)
#define mi_putint(x,y,nod) { uint16 boh=(nod ? (uint16) 32768 : 0) + (uint16) (y);\ #define mi_putint(x,y,nod) { uint16 boh=(nod ? (uint16) 32768 : 0) + (uint16) (y);\
......
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
t1 backup error Failed copying .frm file: errno = 2 t1 backup error Failed copying .frm file: errno = X
test.t1 backup status Operation failed test.t1 backup status Operation failed
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 backup status OK test.t1 backup status OK
......
...@@ -477,3 +477,7 @@ Table Op Msg_type Msg_text ...@@ -477,3 +477,7 @@ Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t1 0 PRIMARY 1 a A 2 NULL NULL t1 0 PRIMARY 1 a A 2 NULL NULL
i j
1 2
i j
1 2
...@@ -17,6 +17,6 @@ Table Create Table ...@@ -17,6 +17,6 @@ Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`ticket` int(11) default NULL, `ticket` int(11) default NULL,
`inhalt` text, `inhalt` text,
KEY `tig`(`ticket`), KEY `tig` (`ticket`),
FULLTEXT KEY `tix`(`inhalt`) FULLTEXT KEY `tix` (`inhalt`)
) TYPE=MyISAM ) TYPE=MyISAM
...@@ -4,7 +4,7 @@ connection con1; ...@@ -4,7 +4,7 @@ connection con1;
set SQL_LOG_BIN=0; set SQL_LOG_BIN=0;
drop table if exists t1; drop table if exists t1;
create table t1(n int); create table t1(n int);
--replace "errno = 2" "errno = X" "errno = 22" "errno = X" --replace_result "errno = 2" "errno = X" "errno = 22" "errno = X"
backup table t1 to '../bogus'; backup table t1 to '../bogus';
backup table t1 to '../tmp'; backup table t1 to '../tmp';
drop table t1; drop table t1;
...@@ -29,9 +29,11 @@ select k from t3; ...@@ -29,9 +29,11 @@ select k from t3;
drop table t1,t2,t3; drop table t1,t2,t3;
restore table t1 from '../tmp'; restore table t1 from '../tmp';
connection con2; connection con2;
send lock tables t1 write; --send
lock tables t1 write;
connection con1; connection con1;
send backup table t1 to '../tmp'; --send
backup table t1 to '../tmp';
connection con2; connection con2;
reap; reap;
unlock tables; unlock tables;
......
...@@ -419,3 +419,13 @@ select * from t1 order by b desc; ...@@ -419,3 +419,13 @@ select * from t1 order by b desc;
optimize table t1; optimize table t1;
show keys from t1; show keys from t1;
drop table t1; drop table t1;
#
# Test of bug in create index with NULL columns
#
create table t1 (i int, j int )TYPE=BDB;
insert into t1 values (1,2);
select * from t1 where i=1 and j=2;
create index ax1 on t1 (i,j);
select * from t1 where i=1 and j=2;
drop table t1;
...@@ -13,7 +13,8 @@ lock tables t1 read; ...@@ -13,7 +13,8 @@ lock tables t1 read;
unlock tables; unlock tables;
lock tables t1 read; lock tables t1 read;
connection con1; connection con1;
send update t1 set n = 3; --send
update t1 set n = 3;
connection con2; connection con2;
sleep 0.5; sleep 0.5;
unlock tables; unlock tables;
......
...@@ -50,14 +50,14 @@ const char * NEAR globerrs[GLOBERRS]= ...@@ -50,14 +50,14 @@ const char * NEAR globerrs[GLOBERRS]=
void init_glob_errs(void) void init_glob_errs(void)
{ {
errmsg[GLOB] = & globerrs[0]; my_errmsg[GLOB] = & globerrs[0];
} /* init_glob_errs */ } /* init_glob_errs */
#else #else
void init_glob_errs() void init_glob_errs()
{ {
errmsg[GLOB] = & globerrs[0]; my_errmsg[GLOB] = & globerrs[0];
EE(EE_FILENOTFOUND) = "File '%s' not found (Errcode: %d)"; EE(EE_FILENOTFOUND) = "File '%s' not found (Errcode: %d)";
EE(EE_CANTCREATEFILE) = "Can't create/write to file '%s' (Errcode: %d)"; EE(EE_CANTCREATEFILE) = "Can't create/write to file '%s' (Errcode: %d)";
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/* Define some external variables for error handling */ /* Define some external variables for error handling */
const char ** NEAR errmsg[MAXMAPS]={0,0,0,0}; const char ** NEAR my_errmsg[MAXMAPS]={0,0,0,0};
char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE]; char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
/* Error message to user */ /* Error message to user */
...@@ -42,10 +42,10 @@ int my_error(int nr,myf MyFlags, ...) ...@@ -42,10 +42,10 @@ int my_error(int nr,myf MyFlags, ...)
va_start(ap,MyFlags); va_start(ap,MyFlags);
DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d", nr, MyFlags, errno)); DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d", nr, MyFlags, errno));
if (nr / ERRMOD == GLOB && errmsg[GLOB] == 0) if (nr / ERRMOD == GLOB && my_errmsg[GLOB] == 0)
init_glob_errs(); init_glob_errs();
olen=(uint) strlen(tpos=errmsg[nr / ERRMOD][nr % ERRMOD]); olen=(uint) strlen(tpos=my_errmsg[nr / ERRMOD][nr % ERRMOD]);
endpos=ebuff; endpos=ebuff;
while (*tpos) while (*tpos)
......
...@@ -56,7 +56,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name) ...@@ -56,7 +56,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
if (! *i) if (! *i)
DBUG_RETURN(pos+1); DBUG_RETURN(pos+1);
} }
if (! *i) if (! *i && (!*j || !(full_name & 1)))
{ {
find++; find++;
findpos=pos; findpos=pos;
...@@ -64,7 +64,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name) ...@@ -64,7 +64,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
} }
if (find == 0 && (full_name & 4) && x[0] == '#' && strend(x)[-1] == '#' && if (find == 0 && (full_name & 4) && x[0] == '#' && strend(x)[-1] == '#' &&
(findpos=atoi(x+1)-1) >= 0 && (uint) findpos < typelib->count) (findpos=atoi(x+1)-1) >= 0 && (uint) findpos < typelib->count)
find=1; find=1;
else if (find == 0 || ! x[0]) else if (find == 0 || ! x[0])
{ {
DBUG_PRINT("exit",("Couldn't find type")); DBUG_PRINT("exit",("Couldn't find type"));
......
...@@ -30,8 +30,8 @@ void init_errmessage(void) ...@@ -30,8 +30,8 @@ void init_errmessage(void)
{ {
DBUG_ENTER("init_errmessage"); DBUG_ENTER("init_errmessage");
read_texts(ERRMSG_FILE,&errmsg[ERRMAPP],ER_ERROR_MESSAGES); read_texts(ERRMSG_FILE,&my_errmsg[ERRMAPP],ER_ERROR_MESSAGES);
errmesg=errmsg[ERRMAPP]; /* Init global variabel */ errmesg=my_errmsg[ERRMAPP]; /* Init global variabel */
init_myfunc_errs(); /* Init myfunc messages */ init_myfunc_errs(); /* Init myfunc messages */
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
...@@ -779,6 +779,7 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff, ...@@ -779,6 +779,7 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff,
for (; key_part != end && (int) key_length > 0 ; key_part++) for (; key_part != end && (int) key_length > 0 ; key_part++)
{ {
uint offset=0;
if (key_part->null_bit) if (key_part->null_bit)
{ {
if (!(*buff++ = (*key_ptr == 0))) // Store 0 if NULL if (!(*buff++ = (*key_ptr == 0))) // Store 0 if NULL
...@@ -788,9 +789,9 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff, ...@@ -788,9 +789,9 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff,
key->flags|=DB_DBT_DUPOK; key->flags|=DB_DBT_DUPOK;
continue; continue;
} }
key_ptr++; offset=1; // Data is at key_ptr+1
} }
buff=key_part->field->pack_key_from_key_image(buff,key_ptr, buff=key_part->field->pack_key_from_key_image(buff,key_ptr+offset,
key_part->length); key_part->length);
key_ptr+=key_part->store_length; key_ptr+=key_part->store_length;
key_length-=key_part->store_length; key_length-=key_part->store_length;
......
...@@ -442,6 +442,7 @@ Query_log_event::Query_log_event(const char* buf, int event_len): ...@@ -442,6 +442,7 @@ Query_log_event::Query_log_event(const char* buf, int event_len):
void Query_log_event::print(FILE* file, bool short_form) void Query_log_event::print(FILE* file, bool short_form)
{ {
char buff[40],*end; // Enough for SET TIMESTAMP
if (!short_form) if (!short_form)
{ {
print_header(file); print_header(file);
...@@ -449,8 +450,12 @@ void Query_log_event::print(FILE* file, bool short_form) ...@@ -449,8 +450,12 @@ void Query_log_event::print(FILE* file, bool short_form)
(ulong) thread_id, (ulong) exec_time, error_code); (ulong) thread_id, (ulong) exec_time, error_code);
} }
if(db && db[0]) if (db && db[0])
fprintf(file, "use %s;\n", db); fprintf(file, "use %s;\n", db);
end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10);
*end++=';';
*end++='\n';
my_fwrite(file, (byte*) buff, (uint) (end-buff),MYF(MY_NABP | MY_WME));
my_fwrite(file, (byte*) query, q_len, MYF(MY_NABP | MY_WME)); my_fwrite(file, (byte*) query, q_len, MYF(MY_NABP | MY_WME));
fprintf(file, ";\n"); fprintf(file, ";\n");
} }
......
...@@ -106,7 +106,7 @@ static void die(const char* fmt, ...) ...@@ -106,7 +106,7 @@ static void die(const char* fmt, ...)
static void print_version() static void print_version()
{ {
printf("%s Ver 1.1 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); printf("%s Ver 1.2 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
} }
...@@ -377,7 +377,7 @@ static void dump_local_log_entries(const char* logname) ...@@ -377,7 +377,7 @@ static void dump_local_log_entries(const char* logname)
die("Bad magic number; The file is probably not a MySQL binary log"); die("Bad magic number; The file is probably not a MySQL binary log");
} }
while(1) for (;;)
{ {
char llbuff[21]; char llbuff[21];
my_off_t old_off = my_b_tell(file); my_off_t old_off = my_b_tell(file);
......
...@@ -642,7 +642,7 @@ void clean_up(void) ...@@ -642,7 +642,7 @@ void clean_up(void)
#ifdef USE_RAID #ifdef USE_RAID
end_raid(); end_raid();
#endif #endif
x_free((gptr) errmsg[ERRMAPP]); /* Free messages */ x_free((gptr) my_errmsg[ERRMAPP]); /* Free messages */
free_defaults(defaults_argv); free_defaults(defaults_argv);
my_free(mysql_tmpdir,MYF(0)); my_free(mysql_tmpdir,MYF(0));
x_free(opt_bin_logname); x_free(opt_bin_logname);
...@@ -1677,7 +1677,7 @@ int main(int argc, char **argv) ...@@ -1677,7 +1677,7 @@ int main(int argc, char **argv)
case 1: case 1:
sql_print_error("\ sql_print_error("\
Warning: one should set server-id to a non-0 value if log-bin is enabled.\n\ Warning: one should set server-id to a non-0 value if log-bin is enabled.\n\
Will log updates to binary log, but will not accept connections from slaves."); mysqld log updates to binary log, but will not accept connections from slaves.");
break; break;
#endif #endif
case 2: case 2:
...@@ -2409,7 +2409,7 @@ enum options { ...@@ -2409,7 +2409,7 @@ enum options {
OPT_INNOBASE_LOG_GROUP_HOME_DIR, OPT_INNOBASE_LOG_GROUP_HOME_DIR,
OPT_INNOBASE_LOG_ARCH_DIR, OPT_INNOBASE_LOG_ARCHIVE, OPT_INNOBASE_LOG_ARCH_DIR, OPT_INNOBASE_LOG_ARCHIVE,
OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT, OPT_SAFE_SHOW_DB, OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT, OPT_SAFE_SHOW_DB,
OPT_GEMINI_SKIP, OPT_GEMINI_SKIP, OPT_INNOBASE_SKIP,
OPT_TEMP_POOL OPT_TEMP_POOL
}; };
...@@ -2516,15 +2516,9 @@ static struct option long_options[] = { ...@@ -2516,15 +2516,9 @@ static struct option long_options[] = {
{"socket", required_argument, 0, (int) OPT_SOCKET}, {"socket", required_argument, 0, (int) OPT_SOCKET},
{"server-id", required_argument, 0, (int) OPT_SERVER_ID}, {"server-id", required_argument, 0, (int) OPT_SERVER_ID},
{"set-variable", required_argument, 0, 'O'}, {"set-variable", required_argument, 0, 'O'},
#ifdef HAVE_BERKELEY_DB
{"skip-bdb", no_argument, 0, (int) OPT_BDB_SKIP}, {"skip-bdb", no_argument, 0, (int) OPT_BDB_SKIP},
#endif
#ifdef HAVE_INNOBASE_DB
{"skip-innobase", no_argument, 0, (int) OPT_INNOBASE_SKIP}, {"skip-innobase", no_argument, 0, (int) OPT_INNOBASE_SKIP},
#endif
#ifdef HAVE_GEMINI_DB
{"skip-gemini", no_argument, 0, (int) OPT_GEMINI_SKIP}, {"skip-gemini", no_argument, 0, (int) OPT_GEMINI_SKIP},
#endif
{"skip-concurrent-insert", no_argument, 0, (int) OPT_SKIP_CONCURRENT_INSERT}, {"skip-concurrent-insert", no_argument, 0, (int) OPT_SKIP_CONCURRENT_INSERT},
{"skip-delay-key-write", no_argument, 0, (int) OPT_SKIP_DELAY_KEY_WRITE}, {"skip-delay-key-write", no_argument, 0, (int) OPT_SKIP_DELAY_KEY_WRITE},
{"skip-grant-tables", no_argument, 0, (int) OPT_SKIP_GRANT}, {"skip-grant-tables", no_argument, 0, (int) OPT_SKIP_GRANT},
...@@ -3459,22 +3453,26 @@ static void get_options(int argc,char **argv) ...@@ -3459,22 +3453,26 @@ static void get_options(int argc,char **argv)
berkeley_init_flags&= ~(DB_PRIVATE); berkeley_init_flags&= ~(DB_PRIVATE);
berkeley_shared_data=1; berkeley_shared_data=1;
break; break;
#endif /* HAVE_BERKELEY_DB */
case OPT_BDB_SKIP: case OPT_BDB_SKIP:
#ifdef HAVE_BERKELEY_DB
berkeley_skip=1; berkeley_skip=1;
have_berkeley_db=SHOW_OPTION_DISABLED; have_berkeley_db=SHOW_OPTION_DISABLED;
break;
#endif #endif
#ifdef HAVE_GEMINI_DB break;
case OPT_GEMINI_SKIP: case OPT_GEMINI_SKIP:
#ifdef HAVE_GEMINI_DB
gemini_skip=1; gemini_skip=1;
have_gemini_db=SHOW_OPTION_DISABLED; have_gemini_db=SHOW_OPTION_DISABLED;
break;
#endif #endif
#ifdef HAVE_INNOBASE_DB break;
case OPT_INNOBASE_SKIP: case OPT_INNOBASE_SKIP:
#ifdef HAVE_INNOBASE_DB
innobase_skip=1; innobase_skip=1;
have_innobase_db=SHOW_HAVE_DISABLED; have_innobase_db=SHOW_HAVE_DISABLED;
#endif
break; break;
#ifdef HAVE_INNOBASE_DB
case OPT_INNOBASE_DATA_HOME_DIR: case OPT_INNOBASE_DATA_HOME_DIR:
innobase_data_home_dir=optarg; innobase_data_home_dir=optarg;
break; break;
...@@ -3493,7 +3491,7 @@ static void get_options(int argc,char **argv) ...@@ -3493,7 +3491,7 @@ static void get_options(int argc,char **argv)
case OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT: case OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT:
innobase_flush_log_at_trx_commit= optarg ? test(atoi(optarg)) : 1; innobase_flush_log_at_trx_commit= optarg ? test(atoi(optarg)) : 1;
break; break;
#endif #endif /* HAVE_INNOBASE_DB */
case OPT_MYISAM_RECOVER: case OPT_MYISAM_RECOVER:
{ {
if (!optarg || !optarg[0]) if (!optarg || !optarg[0])
......
...@@ -1250,8 +1250,10 @@ reconnecting to retry, log '%s' position %ld", RPL_LOG_NAME, ...@@ -1250,8 +1250,10 @@ reconnecting to retry, log '%s' position %ld", RPL_LOG_NAME,
thd->proc_info = "processing master log event"; thd->proc_info = "processing master log event";
if(exec_event(thd, &mysql->net, &glob_mi, event_len)) if(exec_event(thd, &mysql->net, &glob_mi, event_len))
{ {
sql_print_error("Error running query, slave aborted. Fix the problem, and re-start\ sql_print_error("\
the slave thread with mysqladmin start-slave - log '%s' position %ld", Error running query, slave aborted. Fix the problem, and re-start \
the slave thread with \"mysqladmin start-slave\". We stopped at log \
'%s' position %ld",
RPL_LOG_NAME, glob_mi.pos); RPL_LOG_NAME, glob_mi.pos);
goto err; goto err;
// there was an error running the query // there was an error running the query
......
...@@ -1784,7 +1784,7 @@ static key_map get_key_map_from_key_list(THD *thd, TABLE *table, ...@@ -1784,7 +1784,7 @@ static key_map get_key_map_from_key_list(THD *thd, TABLE *table,
uint pos; uint pos;
while ((name=it++)) while ((name=it++))
{ {
if ((pos=find_type(name->c_ptr(), &table->keynames, 1)) <= 0) if ((pos=find_type(name->c_ptr(), &table->keynames, 1+2)) <= 0)
{ {
my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), name->c_ptr(), my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), name->c_ptr(),
table->real_name); table->real_name);
......
...@@ -187,7 +187,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *org_path, ...@@ -187,7 +187,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *org_path,
} }
continue; continue;
} }
if (find_type(fn_ext(file->name),&deletable_extentions,1) <= 0) if (find_type(fn_ext(file->name),&deletable_extentions,1+2) <= 0)
{ {
found_other_files++; found_other_files++;
continue; continue;
......
...@@ -32,7 +32,8 @@ set-variable = table_cache=512 ...@@ -32,7 +32,8 @@ set-variable = table_cache=512
set-variable = sort_buffer=2M set-variable = sort_buffer=2M
set-variable = record_buffer=2M set-variable = record_buffer=2M
set-variable = thread_cache=8 set-variable = thread_cache=8
set-variable = thread_concurrency=8 # Try number of CPU's*2 # Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=8
set-variable = myisam_sort_buffer_size=64M set-variable = myisam_sort_buffer_size=64M
log-bin log-bin
server-id = 1 server-id = 1
...@@ -51,7 +52,8 @@ set-variable = max_allowed_packet=16M ...@@ -51,7 +52,8 @@ set-variable = max_allowed_packet=16M
[mysql] [mysql]
no-auto-rehash no-auto-rehash
#safe-updates # Remove the comment character if you are not familiar with SQL # Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk] [isamchk]
set-variable = key_buffer=256M set-variable = key_buffer=256M
......
...@@ -33,7 +33,8 @@ set-variable = sort_buffer=1M ...@@ -33,7 +33,8 @@ set-variable = sort_buffer=1M
set-variable = record_buffer=1M set-variable = record_buffer=1M
set-variable = myisam_sort_buffer_size=64M set-variable = myisam_sort_buffer_size=64M
set-variable = thread_cache=8 set-variable = thread_cache=8
set-variable = thread_concurrency=8 # Try number of CPU's*2 # Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=8
log-bin log-bin
server-id = 1 server-id = 1
...@@ -51,7 +52,8 @@ set-variable = max_allowed_packet=16M ...@@ -51,7 +52,8 @@ set-variable = max_allowed_packet=16M
[mysql] [mysql]
no-auto-rehash no-auto-rehash
#safe-updates # Remove the comment character if you are not familiar with SQL # Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk] [isamchk]
set-variable = key_buffer=128M set-variable = key_buffer=128M
......
...@@ -50,7 +50,8 @@ set-variable = max_allowed_packet=16M ...@@ -50,7 +50,8 @@ set-variable = max_allowed_packet=16M
[mysql] [mysql]
no-auto-rehash no-auto-rehash
#safe-updates # Remove the comment character if you are not familiar with SQL # Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk] [isamchk]
set-variable = key_buffer=20M set-variable = key_buffer=20M
......
...@@ -47,7 +47,8 @@ set-variable = max_allowed_packet=16M ...@@ -47,7 +47,8 @@ set-variable = max_allowed_packet=16M
[mysql] [mysql]
no-auto-rehash no-auto-rehash
#safe-updates # Remove the comment character if you are not familiar with SQL # Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk] [isamchk]
set-variable = key_buffer=8M set-variable = key_buffer=8M
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment