Commit 450d98e3 authored by monty@donna.mysql.com's avatar monty@donna.mysql.com

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
parent 7de40020
This diff is collapsed.
......@@ -28,7 +28,7 @@
#include <my_pthread.h> /* because of signal() */
#endif
#define ADMIN_VERSION "8.15"
#define ADMIN_VERSION "8.16"
#define MAX_MYSQL_VAR 64
#define MAX_TIME_TO_WAIT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3
......@@ -853,6 +853,8 @@ static void usage(void)
refresh Flush all tables and close and open logfiles\n\
shutdown Take server down\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\
version Get version info from server");
}
......
......@@ -157,7 +157,7 @@ struct st_query
const char *command_names[] = {
"connection", "query","connect","sleep","inc","dec","source","disconnect",
"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),"",
......@@ -723,22 +723,22 @@ static void get_replace(struct st_query *q)
{
uint i;
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;
POINTER_ARRAY to_array,from_array;
DBUG_ENTER("get_replace");
bzero((char*) &to_array,sizeof(to_array));
bzero((char*) &from_array,sizeof(from_array));
if (!*from)
die("Missing argument in %s\n", q->query);
start=buff=my_malloc(strlen(from)+1,MYF(MY_WME | MY_FAE));
while (*from)
{
char *to=buff;
get_string(&buff, &from, q);
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);
to=buff;
get_string(&buff, &from, q);
......@@ -747,6 +747,7 @@ static void get_replace(struct st_query *q)
for (i=1,pos=word_end_chars ; i < 256 ; i++)
if (isspace(i))
*pos++=i;
*pos=0; /* End pointer */
if (!(glob_replace=init_replace((char**) from_array.typelib.type_names,
(char**) to_array.typelib.type_names,
(uint) from_array.typelib.count,
......@@ -755,13 +756,16 @@ static void get_replace(struct st_query *q)
die("Can't initialize replace from %s\n", q->query);
free_pointer_array(&from_array);
free_pointer_array(&to_array);
my_free(buff, MYF(0));
my_free(start, MYF(0));
}
void free_replace()
{
DBUG_ENTER("free_replace");
my_free((char*) glob_replace,MYF(0));
glob_replace=0;
free_replace_buffer();
DBUG_VOID_RETURN;
}
......@@ -1270,7 +1274,7 @@ int parse_args(int argc, char **argv)
{
switch(c) {
case '#':
DBUG_PUSH(optarg ? optarg : "d:t:o,/tmp/mysqltest.trace");
DBUG_PUSH(optarg ? optarg : "d:t:O,/tmp/mysqltest.trace");
break;
case 'v':
verbose = 1;
......@@ -1530,7 +1534,7 @@ void get_query_type(struct st_query* q)
save=q->query[q->first_word_len];
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;
if (type > 0)
q->type=type; /* Found command */
......@@ -1541,7 +1545,7 @@ int main(int argc, char** argv)
{
int error = 0;
struct st_query* q;
my_bool require_file=0;
my_bool require_file=0,q_send_flag=0;
char save_file[FN_REFLEN];
MY_INIT(argv[0]);
......@@ -1579,7 +1583,7 @@ int main(int argc, char** argv)
0))
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;
if (q->type == Q_UNKNOWN || q->type == Q_COMMENT_WITH_COMMAND)
......@@ -1604,9 +1608,13 @@ int main(int argc, char** argv)
case Q_REAP:
{
int flags = QUERY_REAP;
if(q->type == Q_QUERY)
if (q->type == Q_QUERY)
flags |= QUERY_SEND;
if (q_send_flag)
{
flags=QUERY_SEND;
q_send_flag=0;
}
if (save_file[0])
{
strmov(q->record_file,save_file);
......@@ -1617,8 +1625,7 @@ int main(int argc, char** argv)
break;
}
case Q_SEND:
q->query += q->first_word_len;
error |= run_query(&cur_con->mysql, q, QUERY_SEND);
q_send_flag=1;
break;
case Q_RESULT:
get_file_name(save_file,q);
......@@ -1673,8 +1680,8 @@ int main(int argc, char** argv)
}
free_used_memory();
exit(error);
return error;
exit(error ? 1 : 0);
return error ? 1 : 0; /* Keep compiler happy */
}
......@@ -1789,7 +1796,6 @@ void free_pointer_array(POINTER_ARRAY *pa)
pa->typelib.type_names=0;
my_free((gptr) pa->str,MYF(0));
}
return;
} /* free_pointer_array */
......
......@@ -162,7 +162,7 @@ void __CDECL hfree(void *ptr);
#else
extern int errno; /* declare errno */
#endif
extern const char ** NEAR errmsg[];
extern const char ** NEAR my_errmsg[];
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */
extern char *my_progname; /* program-name (printed in errors) */
......
......@@ -78,5 +78,5 @@ const char *client_errors[]=
void init_client_errs(void)
{
errmsg[CLIENT_ERRMAP] = &client_errors[0];
my_errmsg[CLIENT_ERRMAP] = &client_errors[0];
}
......@@ -18,8 +18,6 @@
/* Used instead of my_b_read() to allow for no-cacheed seeks */
#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 */
/* 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,
if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos))
read_length=(uint) (info->pos_in_file-pos);
info->seek_not_done=1;
VOID(my_seek(info->file,pos,MY_SEEK_SET,MYF(0)));
if (my_read(info->file,buff,read_length,MYF(MY_NABP)))
if (my_pread(info->file,buff,read_length,pos,MYF(MY_NABP)))
DBUG_RETURN(1);
if (!(length-=read_length))
DBUG_RETURN(0);
......@@ -85,8 +82,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
DBUG_RETURN(0);
}
info->seek_not_done=1;
VOID(my_seek(info->file,pos,MY_SEEK_SET,MYF(0)));
if ((read_length=my_read(info->file,buff,length,MYF(0))) == length)
if ((read_length=my_pread(info->file,buff,length,pos,MYF(0))) == length)
DBUG_RETURN(0);
if (!(flag & READING_HEADER) || (int) read_length == -1 ||
read_length+in_buff_length < 3)
......
......@@ -746,11 +746,13 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
{
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,
(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;
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;
}
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)
got_error=1; break;
}
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;
to+=block_info.data_len;
link_used+= block_info.filepos-start_block;
......@@ -895,7 +898,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
break;
case COMPRESSED_RECORD:
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;
start_recpos=pos;
splits++;
......@@ -910,7 +913,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
break;
}
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;
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)
{
pos=MY_ALIGN(pos,MI_DYN_ALIGN_SIZE);
param->retry_without_quick=1;
sort_info->start_recpos=pos;
}
do
{
......@@ -2131,7 +2135,8 @@ static int sort_get_next_record(SORT_INFO *sort_info)
llstr(sort_info->start_recpos,llbuff2));
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,pos,
MI_BLOCK_INFO_HEADER_LENGTH,
test(! found_record) | 2))
(! found_record ? READING_NEXT : 0) |
READING_HEADER))
{
if (found_record)
{
......@@ -2172,6 +2177,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
block_info.header[i] <= MI_MAX_DYN_HEADER_BYTE)
break;
pos+=(ulong) i;
sort_info->start_recpos=pos;
continue;
}
if (b_type & BLOCK_DELETED)
......@@ -2206,7 +2212,8 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (found_record)
goto try_next;
searching=1;
pos++;
pos+= MI_DYN_ALIGN_SIZE;
sort_info->start_recpos=pos;
block_info.second_read=0;
continue;
}
......@@ -2226,7 +2233,8 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (found_record)
goto try_next;
searching=1;
pos++;
pos+= MI_DYN_ALIGN_SIZE;
sort_info->start_recpos=pos;
block_info.second_read=0;
continue;
}
......@@ -2242,7 +2250,10 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (found_record)
goto try_next;
if (searching)
pos++;
{
pos+=MI_DYN_ALIGN_SIZE;
sort_info->start_recpos=pos;
}
else
pos=block_info.filepos+block_info.block_len;
block_info.second_read=0;
......@@ -2286,9 +2297,11 @@ static int sort_get_next_record(SORT_INFO *sort_info)
goto try_next;
}
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);
goto try_next;
}
......@@ -2335,8 +2348,9 @@ static int sort_get_next_record(SORT_INFO *sort_info)
case COMPRESSED_RECORD:
for (searching=0 ;; searching=1, sort_info->pos++)
{
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,sort_info->pos,
share->pack.ref_length,1))
if (_mi_read_cache(&param->read_cache,(byte*) block_info.header,
sort_info->pos,
share->pack.ref_length,READING_NEXT))
DBUG_RETURN(-1);
if (searching && ! sort_info->fix_datafile)
{
......@@ -2361,10 +2375,11 @@ static int sort_get_next_record(SORT_INFO *sort_info)
continue;
}
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)
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));
continue;
}
......
......@@ -1295,7 +1295,8 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf,
{
if (_mi_read_cache(&info->rec_cache,(byte*) block_info.header,filepos,
sizeof(block_info.header),
test(!flag && skipp_deleted_blocks) | 2))
(!flag && skipp_deleted_blocks ? READING_NEXT : 0) |
READING_HEADER))
goto panic;
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,
{
if (_mi_read_cache(&info->rec_cache,(byte*) to,filepos,
block_info.data_len,
test(!flag && skipp_deleted_blocks)))
(!flag && skipp_deleted_blocks) ? READING_NEXT :0))
goto panic;
}
else
......
......@@ -201,7 +201,7 @@ static struct option long_options[] =
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);
}
......@@ -952,7 +952,8 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name)
share->base.raid_chunksize);
}
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)
printf("Keys are only flushed at close\n");
......
......@@ -290,6 +290,10 @@ struct st_myisam_info {
#define STATE_NOT_OPTIMIZED_KEYS 16
#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_putint(x,y,nod) { uint16 boh=(nod ? (uint16) 32768 : 0) + (uint16) (y);\
......
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
Table Op Msg_type Msg_text
test.t1 backup status OK
......
......@@ -477,3 +477,7 @@ Table Op Msg_type Msg_text
test.t1 optimize status OK
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
i j
1 2
i j
1 2
......@@ -17,6 +17,6 @@ Table Create Table
t2 CREATE TABLE `t2` (
`ticket` int(11) default NULL,
`inhalt` text,
KEY `tig`(`ticket`),
FULLTEXT KEY `tix`(`inhalt`)
KEY `tig` (`ticket`),
FULLTEXT KEY `tix` (`inhalt`)
) TYPE=MyISAM
......@@ -4,7 +4,7 @@ connection con1;
set SQL_LOG_BIN=0;
drop table if exists t1;
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 '../tmp';
drop table t1;
......@@ -29,9 +29,11 @@ select k from t3;
drop table t1,t2,t3;
restore table t1 from '../tmp';
connection con2;
send lock tables t1 write;
--send
lock tables t1 write;
connection con1;
send backup table t1 to '../tmp';
--send
backup table t1 to '../tmp';
connection con2;
reap;
unlock tables;
......
......@@ -419,3 +419,13 @@ select * from t1 order by b desc;
optimize table t1;
show keys from 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;
unlock tables;
lock tables t1 read;
connection con1;
send update t1 set n = 3;
--send
update t1 set n = 3;
connection con2;
sleep 0.5;
unlock tables;
......
......@@ -50,14 +50,14 @@ const char * NEAR globerrs[GLOBERRS]=
void init_glob_errs(void)
{
errmsg[GLOB] = & globerrs[0];
my_errmsg[GLOB] = & globerrs[0];
} /* init_glob_errs */
#else
void init_glob_errs()
{
errmsg[GLOB] = & globerrs[0];
my_errmsg[GLOB] = & globerrs[0];
EE(EE_FILENOTFOUND) = "File '%s' not found (Errcode: %d)";
EE(EE_CANTCREATEFILE) = "Can't create/write to file '%s' (Errcode: %d)";
......
......@@ -23,7 +23,7 @@
/* 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];
/* Error message to user */
......@@ -42,10 +42,10 @@ int my_error(int nr,myf MyFlags, ...)
va_start(ap,MyFlags);
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();
olen=(uint) strlen(tpos=errmsg[nr / ERRMOD][nr % ERRMOD]);
olen=(uint) strlen(tpos=my_errmsg[nr / ERRMOD][nr % ERRMOD]);
endpos=ebuff;
while (*tpos)
......
......@@ -56,7 +56,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
if (! *i)
DBUG_RETURN(pos+1);
}
if (! *i)
if (! *i && (!*j || !(full_name & 1)))
{
find++;
findpos=pos;
......
......@@ -30,8 +30,8 @@ void init_errmessage(void)
{
DBUG_ENTER("init_errmessage");
read_texts(ERRMSG_FILE,&errmsg[ERRMAPP],ER_ERROR_MESSAGES);
errmesg=errmsg[ERRMAPP]; /* Init global variabel */
read_texts(ERRMSG_FILE,&my_errmsg[ERRMAPP],ER_ERROR_MESSAGES);
errmesg=my_errmsg[ERRMAPP]; /* Init global variabel */
init_myfunc_errs(); /* Init myfunc messages */
DBUG_VOID_RETURN;
}
......
......@@ -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++)
{
uint offset=0;
if (key_part->null_bit)
{
if (!(*buff++ = (*key_ptr == 0))) // Store 0 if NULL
......@@ -788,9 +789,9 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff,
key->flags|=DB_DBT_DUPOK;
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_ptr+=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):
void Query_log_event::print(FILE* file, bool short_form)
{
char buff[40],*end; // Enough for SET TIMESTAMP
if (!short_form)
{
print_header(file);
......@@ -449,8 +450,12 @@ void Query_log_event::print(FILE* file, bool short_form)
(ulong) thread_id, (ulong) exec_time, error_code);
}
if(db && db[0])
if (db && db[0])
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));
fprintf(file, ";\n");
}
......
......@@ -106,7 +106,7 @@ static void die(const char* fmt, ...)
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)
die("Bad magic number; The file is probably not a MySQL binary log");
}
while(1)
for (;;)
{
char llbuff[21];
my_off_t old_off = my_b_tell(file);
......
......@@ -642,7 +642,7 @@ void clean_up(void)
#ifdef USE_RAID
end_raid();
#endif
x_free((gptr) errmsg[ERRMAPP]); /* Free messages */
x_free((gptr) my_errmsg[ERRMAPP]); /* Free messages */
free_defaults(defaults_argv);
my_free(mysql_tmpdir,MYF(0));
x_free(opt_bin_logname);
......@@ -1677,7 +1677,7 @@ int main(int argc, char **argv)
case 1:
sql_print_error("\
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;
#endif
case 2:
......@@ -2409,7 +2409,7 @@ enum options {
OPT_INNOBASE_LOG_GROUP_HOME_DIR,
OPT_INNOBASE_LOG_ARCH_DIR, OPT_INNOBASE_LOG_ARCHIVE,
OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT, OPT_SAFE_SHOW_DB,
OPT_GEMINI_SKIP,
OPT_GEMINI_SKIP, OPT_INNOBASE_SKIP,
OPT_TEMP_POOL
};
......@@ -2516,15 +2516,9 @@ static struct option long_options[] = {
{"socket", required_argument, 0, (int) OPT_SOCKET},
{"server-id", required_argument, 0, (int) OPT_SERVER_ID},
{"set-variable", required_argument, 0, 'O'},
#ifdef HAVE_BERKELEY_DB
{"skip-bdb", no_argument, 0, (int) OPT_BDB_SKIP},
#endif
#ifdef HAVE_INNOBASE_DB
{"skip-innobase", no_argument, 0, (int) OPT_INNOBASE_SKIP},
#endif
#ifdef HAVE_GEMINI_DB
{"skip-gemini", no_argument, 0, (int) OPT_GEMINI_SKIP},
#endif
{"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-grant-tables", no_argument, 0, (int) OPT_SKIP_GRANT},
......@@ -3459,22 +3453,26 @@ static void get_options(int argc,char **argv)
berkeley_init_flags&= ~(DB_PRIVATE);
berkeley_shared_data=1;
break;
#endif /* HAVE_BERKELEY_DB */
case OPT_BDB_SKIP:
#ifdef HAVE_BERKELEY_DB
berkeley_skip=1;
have_berkeley_db=SHOW_OPTION_DISABLED;
break;
#endif
#ifdef HAVE_GEMINI_DB
break;
case OPT_GEMINI_SKIP:
#ifdef HAVE_GEMINI_DB
gemini_skip=1;
have_gemini_db=SHOW_OPTION_DISABLED;
break;
#endif
#ifdef HAVE_INNOBASE_DB
break;
case OPT_INNOBASE_SKIP:
#ifdef HAVE_INNOBASE_DB
innobase_skip=1;
have_innobase_db=SHOW_HAVE_DISABLED;
#endif
break;
#ifdef HAVE_INNOBASE_DB
case OPT_INNOBASE_DATA_HOME_DIR:
innobase_data_home_dir=optarg;
break;
......@@ -3493,7 +3491,7 @@ static void get_options(int argc,char **argv)
case OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT:
innobase_flush_log_at_trx_commit= optarg ? test(atoi(optarg)) : 1;
break;
#endif
#endif /* HAVE_INNOBASE_DB */
case OPT_MYISAM_RECOVER:
{
if (!optarg || !optarg[0])
......
......@@ -1250,8 +1250,10 @@ reconnecting to retry, log '%s' position %ld", RPL_LOG_NAME,
thd->proc_info = "processing master log event";
if(exec_event(thd, &mysql->net, &glob_mi, event_len))
{
sql_print_error("Error running query, slave aborted. Fix the problem, and re-start\
the slave thread with mysqladmin start-slave - log '%s' position %ld",
sql_print_error("\
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);
goto err;
// there was an error running the query
......
......@@ -1784,7 +1784,7 @@ static key_map get_key_map_from_key_list(THD *thd, TABLE *table,
uint pos;
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(),
table->real_name);
......
......@@ -187,7 +187,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *org_path,
}
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++;
continue;
......
......@@ -32,7 +32,8 @@ set-variable = table_cache=512
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
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
log-bin
server-id = 1
......@@ -51,7 +52,8 @@ set-variable = max_allowed_packet=16M
[mysql]
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]
set-variable = key_buffer=256M
......
......@@ -33,7 +33,8 @@ set-variable = sort_buffer=1M
set-variable = record_buffer=1M
set-variable = myisam_sort_buffer_size=64M
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
server-id = 1
......@@ -51,7 +52,8 @@ set-variable = max_allowed_packet=16M
[mysql]
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]
set-variable = key_buffer=128M
......
......@@ -50,7 +50,8 @@ set-variable = max_allowed_packet=16M
[mysql]
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]
set-variable = key_buffer=20M
......
......@@ -47,7 +47,8 @@ set-variable = max_allowed_packet=16M
[mysql]
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]
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