Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-icc
This commit is contained in:
commit
43b544a968
@ -553,7 +553,7 @@ static void close_cons()
|
|||||||
static void close_files()
|
static void close_files()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("close_files");
|
DBUG_ENTER("close_files");
|
||||||
for (; cur_file != (file_stack-1) ; cur_file--)
|
for (; cur_file >= file_stack; cur_file--)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("file_name: %s", cur_file->file_name));
|
DBUG_PRINT("info", ("file_name: %s", cur_file->file_name));
|
||||||
if (cur_file->file && cur_file->file != stdin)
|
if (cur_file->file && cur_file->file != stdin)
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#if defined (HAVE_SYS_FILE_H)
|
#if defined (HAVE_SYS_FILE_H)
|
||||||
# include <sys/file.h>
|
# include <sys/file.h>
|
||||||
#endif
|
#endif
|
||||||
@ -1149,7 +1150,8 @@ compute_lcd_of_matches (match_list, matches, text)
|
|||||||
rl_completion_found_quote &&
|
rl_completion_found_quote &&
|
||||||
rl_filename_quoting_desired)
|
rl_filename_quoting_desired)
|
||||||
{
|
{
|
||||||
dtext = (*rl_filename_dequoting_function) (text, rl_completion_quote_character);
|
dtext = (*rl_filename_dequoting_function)
|
||||||
|
((char*) text, rl_completion_quote_character);
|
||||||
text = dtext;
|
text = dtext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <my_global.h> /* This includes dbug.h */
|
#include <my_global.h> /* This includes dbug.h */
|
||||||
|
#include <my_pthread.h>
|
||||||
|
|
||||||
int main (argc, argv)
|
int main (argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
|
@ -238,7 +238,7 @@ C_MODE_END
|
|||||||
|
|
||||||
|
|
||||||
/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
|
/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
|
||||||
#if SIZEOF_LONG == 4 && defined(__LONG_MAX__)
|
#if SIZEOF_LONG == 4 && defined(__LONG_MAX__) && (__GNUC__ == 2 && __GNUC_MINOR__ == 8)
|
||||||
#undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */
|
#undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */
|
||||||
#define __LONG_MAX__ 2147483647
|
#define __LONG_MAX__ 2147483647
|
||||||
#endif
|
#endif
|
||||||
|
@ -280,7 +280,7 @@ enum loglevel {
|
|||||||
|
|
||||||
enum cache_type
|
enum cache_type
|
||||||
{
|
{
|
||||||
READ_CACHE,WRITE_CACHE,
|
TYPE_NOT_SET= 0, READ_CACHE, WRITE_CACHE,
|
||||||
SEQ_READ_APPEND /* sequential read or append */,
|
SEQ_READ_APPEND /* sequential read or append */,
|
||||||
READ_FIFO, READ_NET,WRITE_NET};
|
READ_FIFO, READ_NET,WRITE_NET};
|
||||||
|
|
||||||
|
@ -473,7 +473,8 @@ static int _ftb_check_phrase(const byte *s0, const byte *e0,
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
n_word= (FT_WORD *)phrase_element->data;
|
n_word= (FT_WORD *)phrase_element->data;
|
||||||
if (my_strnncoll(cs, h_word.pos, h_word.len, n_word->pos, n_word->len))
|
if (my_strnncoll(cs, (const uchar *) h_word.pos, h_word.len,
|
||||||
|
(const uchar *) n_word->pos, n_word->len))
|
||||||
break;
|
break;
|
||||||
if (! (phrase_element= phrase_element->next))
|
if (! (phrase_element= phrase_element->next))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
|
@ -358,7 +358,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
|
|||||||
byte *blob_ptr;
|
byte *blob_ptr;
|
||||||
DBUG_ENTER("_mi_put_key_in_record");
|
DBUG_ENTER("_mi_put_key_in_record");
|
||||||
|
|
||||||
blob_ptr= info->lastkey2; /* Place to put blob parts */
|
blob_ptr= (byte*) info->lastkey2; /* Place to put blob parts */
|
||||||
key=(byte*) info->lastkey; /* KEy that was read */
|
key=(byte*) info->lastkey; /* KEy that was read */
|
||||||
key_end=key+info->lastkey_length;
|
key_end=key+info->lastkey_length;
|
||||||
for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++)
|
for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++)
|
||||||
|
@ -199,7 +199,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
|
|||||||
DBUG_PRINT("warning",("saved_base_info_length: %d base_info_length: %d",
|
DBUG_PRINT("warning",("saved_base_info_length: %d base_info_length: %d",
|
||||||
len,MI_BASE_INFO_SIZE))
|
len,MI_BASE_INFO_SIZE))
|
||||||
}
|
}
|
||||||
disk_pos=my_n_base_info_read((uchar*) disk_cache + base_pos, &share->base);
|
disk_pos= (char*)
|
||||||
|
my_n_base_info_read((uchar*) disk_cache + base_pos, &share->base);
|
||||||
share->state.state_length=base_pos;
|
share->state.state_length=base_pos;
|
||||||
|
|
||||||
if (!(open_flags & HA_OPEN_FOR_REPAIR) &&
|
if (!(open_flags & HA_OPEN_FOR_REPAIR) &&
|
||||||
@ -863,7 +864,7 @@ uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state)
|
uchar *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state)
|
||||||
{
|
{
|
||||||
uint i,keys,key_parts,key_blocks;
|
uint i,keys,key_parts,key_blocks;
|
||||||
memcpy_fixed(&state->header,ptr, sizeof(state->header));
|
memcpy_fixed(&state->header,ptr, sizeof(state->header));
|
||||||
@ -974,7 +975,7 @@ uint mi_base_info_write(File file, MI_BASE_INFO *base)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base)
|
uchar *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base)
|
||||||
{
|
{
|
||||||
base->keystart = mi_sizekorr(ptr); ptr +=8;
|
base->keystart = mi_sizekorr(ptr); ptr +=8;
|
||||||
base->max_data_file_length = mi_sizekorr(ptr); ptr +=8;
|
base->max_data_file_length = mi_sizekorr(ptr); ptr +=8;
|
||||||
|
@ -237,7 +237,7 @@ static int run_test(const char *filename)
|
|||||||
pos=HA_OFFSET_ERROR;
|
pos=HA_OFFSET_ERROR;
|
||||||
}
|
}
|
||||||
if (found != row_count)
|
if (found != row_count)
|
||||||
printf("Found %ld of %ld rows\n", found,row_count);
|
printf("Found %ld of %ld rows\n", (ulong) found, (ulong) row_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
@ -303,7 +303,8 @@ static int run_test(const char *filename)
|
|||||||
if ((error=mi_rrnd(file,read_record,i == 1 ? 0L : HA_OFFSET_ERROR)) == -1)
|
if ((error=mi_rrnd(file,read_record,i == 1 ? 0L : HA_OFFSET_ERROR)) == -1)
|
||||||
{
|
{
|
||||||
if (found != row_count-deleted)
|
if (found != row_count-deleted)
|
||||||
printf("Found only %ld of %ld rows\n",found,row_count-deleted);
|
printf("Found only %ld of %ld rows\n", (ulong) found,
|
||||||
|
(ulong) (row_count - deleted));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!error)
|
if (!error)
|
||||||
|
@ -705,7 +705,7 @@ get_one_option(int optid,
|
|||||||
fprintf(stderr, "Invalid value of stats_method: %s.\n", argument);
|
fprintf(stderr, "Invalid value of stats_method: %s.\n", argument);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
check_param.stats_method= method-1;
|
check_param.stats_method= (enum_mi_stats_method) (method-1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG /* Only useful if debugging */
|
#ifdef DEBUG /* Only useful if debugging */
|
||||||
|
@ -680,10 +680,10 @@ extern uint read_pack_length(uint version, const uchar *buf, ulong *length);
|
|||||||
extern uint calc_pack_length(uint version, ulong length);
|
extern uint calc_pack_length(uint version, ulong length);
|
||||||
|
|
||||||
uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite);
|
uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite);
|
||||||
char *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state);
|
uchar *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state);
|
||||||
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead);
|
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead);
|
||||||
uint mi_base_info_write(File file, MI_BASE_INFO *base);
|
uint mi_base_info_write(File file, MI_BASE_INFO *base);
|
||||||
char *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base);
|
uchar *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base);
|
||||||
int mi_keyseg_write(File file, const HA_KEYSEG *keyseg);
|
int mi_keyseg_write(File file, const HA_KEYSEG *keyseg);
|
||||||
char *mi_keyseg_read(char *ptr, HA_KEYSEG *keyseg);
|
char *mi_keyseg_read(char *ptr, HA_KEYSEG *keyseg);
|
||||||
uint mi_keydef_write(File file, MI_KEYDEF *keydef);
|
uint mi_keydef_write(File file, MI_KEYDEF *keydef);
|
||||||
|
@ -2008,7 +2008,7 @@ static char *hexdigits(ulonglong value)
|
|||||||
static int write_header(PACK_MRG_INFO *mrg,uint head_length,uint trees,
|
static int write_header(PACK_MRG_INFO *mrg,uint head_length,uint trees,
|
||||||
my_off_t tot_elements,my_off_t filelength)
|
my_off_t tot_elements,my_off_t filelength)
|
||||||
{
|
{
|
||||||
byte *buff=file_buffer.pos;
|
byte *buff= (byte*) file_buffer.pos;
|
||||||
|
|
||||||
bzero(buff,HEAD_LENGTH);
|
bzero(buff,HEAD_LENGTH);
|
||||||
memcpy_fixed(buff,myisam_pack_file_magic,4);
|
memcpy_fixed(buff,myisam_pack_file_magic,4);
|
||||||
@ -2024,7 +2024,7 @@ static int write_header(PACK_MRG_INFO *mrg,uint head_length,uint trees,
|
|||||||
if (test_only)
|
if (test_only)
|
||||||
return 0;
|
return 0;
|
||||||
VOID(my_seek(file_buffer.file,0L,MY_SEEK_SET,MYF(0)));
|
VOID(my_seek(file_buffer.file,0L,MY_SEEK_SET,MYF(0)));
|
||||||
return my_write(file_buffer.file,file_buffer.pos,HEAD_LENGTH,
|
return my_write(file_buffer.file,(const byte *) file_buffer.pos,HEAD_LENGTH,
|
||||||
MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)) != 0;
|
MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2472,7 +2472,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
|
|||||||
{
|
{
|
||||||
if (flush_buffer((ulong) max_calc_length + (ulong) max_pack_length))
|
if (flush_buffer((ulong) max_calc_length + (ulong) max_pack_length))
|
||||||
break;
|
break;
|
||||||
record_pos=file_buffer.pos;
|
record_pos= (byte*) file_buffer.pos;
|
||||||
file_buffer.pos+=max_pack_length;
|
file_buffer.pos+=max_pack_length;
|
||||||
for (start_pos=record, count= huff_counts; count < end_count ; count++)
|
for (start_pos=record, count= huff_counts; count < end_count ; count++)
|
||||||
{
|
{
|
||||||
@ -2795,7 +2795,8 @@ static char *make_old_name(char *new_name, char *old_name)
|
|||||||
static void init_file_buffer(File file, pbool read_buffer)
|
static void init_file_buffer(File file, pbool read_buffer)
|
||||||
{
|
{
|
||||||
file_buffer.file=file;
|
file_buffer.file=file;
|
||||||
file_buffer.buffer=my_malloc(ALIGN_SIZE(RECORD_CACHE_SIZE),MYF(MY_WME));
|
file_buffer.buffer= (uchar*) my_malloc(ALIGN_SIZE(RECORD_CACHE_SIZE),
|
||||||
|
MYF(MY_WME));
|
||||||
file_buffer.end=file_buffer.buffer+ALIGN_SIZE(RECORD_CACHE_SIZE)-8;
|
file_buffer.end=file_buffer.buffer+ALIGN_SIZE(RECORD_CACHE_SIZE)-8;
|
||||||
file_buffer.pos_in_file=0;
|
file_buffer.pos_in_file=0;
|
||||||
error_on_write=0;
|
error_on_write=0;
|
||||||
@ -2837,7 +2838,8 @@ static int flush_buffer(ulong neaded_length)
|
|||||||
file_buffer.pos_in_file+=length;
|
file_buffer.pos_in_file+=length;
|
||||||
if (test_only)
|
if (test_only)
|
||||||
return 0;
|
return 0;
|
||||||
if (error_on_write|| my_write(file_buffer.file,file_buffer.buffer,
|
if (error_on_write|| my_write(file_buffer.file,
|
||||||
|
(const byte*) file_buffer.buffer,
|
||||||
length,
|
length,
|
||||||
MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)))
|
MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)))
|
||||||
{
|
{
|
||||||
@ -2850,13 +2852,13 @@ static int flush_buffer(ulong neaded_length)
|
|||||||
{
|
{
|
||||||
char *tmp;
|
char *tmp;
|
||||||
neaded_length+=256; /* some margin */
|
neaded_length+=256; /* some margin */
|
||||||
tmp=my_realloc(file_buffer.buffer, neaded_length,MYF(MY_WME));
|
tmp= my_realloc((char*) file_buffer.buffer, neaded_length,MYF(MY_WME));
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
return 1;
|
return 1;
|
||||||
file_buffer.pos= ((uchar*) tmp +
|
file_buffer.pos= ((uchar*) tmp +
|
||||||
(ulong) (file_buffer.pos - file_buffer.buffer));
|
(ulong) (file_buffer.pos - file_buffer.buffer));
|
||||||
file_buffer.buffer=tmp;
|
file_buffer.buffer= (uchar*) tmp;
|
||||||
file_buffer.end=tmp+neaded_length-8;
|
file_buffer.end= (uchar*) (tmp+neaded_length-8);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
|
|||||||
{
|
{
|
||||||
if ((*wkb) > end - 8)
|
if ((*wkb) > end - 8)
|
||||||
return -1;
|
return -1;
|
||||||
get_double(&ord, *wkb);
|
get_double(&ord, (const byte*) *wkb);
|
||||||
(*wkb)+= 8;
|
(*wkb)+= 8;
|
||||||
if (ord < *mbr)
|
if (ord < *mbr)
|
||||||
float8store((char*) mbr, ord);
|
float8store((char*) mbr, ord);
|
||||||
|
@ -165,7 +165,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
|
|||||||
(ulong) info, (int) type, (ulong) seek_offset));
|
(ulong) info, (int) type, (ulong) seek_offset));
|
||||||
|
|
||||||
info->file= file;
|
info->file= file;
|
||||||
info->type= 0; /* Don't set it until mutex are created */
|
info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */
|
||||||
info->pos_in_file= seek_offset;
|
info->pos_in_file= seek_offset;
|
||||||
info->pre_close = info->pre_read = info->post_read = 0;
|
info->pre_close = info->pre_read = info->post_read = 0;
|
||||||
info->arg = 0;
|
info->arg = 0;
|
||||||
@ -1246,7 +1246,7 @@ int end_io_cache(IO_CACHE *info)
|
|||||||
if (info->type == SEQ_READ_APPEND)
|
if (info->type == SEQ_READ_APPEND)
|
||||||
{
|
{
|
||||||
/* Destroy allocated mutex */
|
/* Destroy allocated mutex */
|
||||||
info->type=0;
|
info->type= TYPE_NOT_SET;
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
pthread_mutex_destroy(&info->append_buffer_lock);
|
pthread_mutex_destroy(&info->append_buffer_lock);
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
#include <my_list.h>
|
#include <my_list.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include "instance_options.h"
|
#include "instance_options.h"
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
#include <hash.h>
|
#include <hash.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ int Instance_options::add_option(const char* option)
|
|||||||
case SAVE_WHOLE:
|
case SAVE_WHOLE:
|
||||||
*(selected_options->value)= tmp;
|
*(selected_options->value)= tmp;
|
||||||
return 0;
|
return 0;
|
||||||
defaut:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "portability.h"
|
#include "portability.h"
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -107,7 +107,6 @@ int parse_output_and_get_value(const char *command, const char *word,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pclose:
|
|
||||||
/* we are not interested in the termination status */
|
/* we are not interested in the termination status */
|
||||||
pclose(output);
|
pclose(output);
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ int net_send_error(struct st_net *net, uint sql_errno)
|
|||||||
MYSQL_ERRMSG_SIZE]; // message
|
MYSQL_ERRMSG_SIZE]; // message
|
||||||
char *pos= buff;
|
char *pos= buff;
|
||||||
|
|
||||||
enum { ERROR_PACKET_CODE= 255 };
|
const int ERROR_PACKET_CODE= 255;
|
||||||
*pos++= ERROR_PACKET_CODE;
|
*pos++= ERROR_PACKET_CODE;
|
||||||
int2store(pos, sql_errno);
|
int2store(pos, sql_errno);
|
||||||
pos+= 2;
|
pos+= 2;
|
||||||
@ -95,7 +95,7 @@ int net_send_error_323(struct st_net *net, uint sql_errno)
|
|||||||
MYSQL_ERRMSG_SIZE]; // message
|
MYSQL_ERRMSG_SIZE]; // message
|
||||||
char *pos= buff;
|
char *pos= buff;
|
||||||
|
|
||||||
enum { ERROR_PACKET_CODE= 255 };
|
const int ERROR_PACKET_CODE= 255;
|
||||||
*pos++= ERROR_PACKET_CODE;
|
*pos++= ERROR_PACKET_CODE;
|
||||||
int2store(pos, sql_errno);
|
int2store(pos, sql_errno);
|
||||||
pos+= 2;
|
pos+= 2;
|
||||||
@ -148,14 +148,14 @@ int store_to_protocol_packet(Buffer *buf, const char *string, uint *position)
|
|||||||
|
|
||||||
int send_eof(struct st_net *net)
|
int send_eof(struct st_net *net)
|
||||||
{
|
{
|
||||||
char buff[1 + /* eof packet code */
|
uchar buff[1 + /* eof packet code */
|
||||||
2 + /* warning count */
|
2 + /* warning count */
|
||||||
2]; /* server status */
|
2]; /* server status */
|
||||||
|
|
||||||
buff[0]=254;
|
buff[0]=254;
|
||||||
int2store(buff+1, 0);
|
int2store(buff+1, 0);
|
||||||
int2store(buff+3, 0);
|
int2store(buff+3, 0);
|
||||||
return my_net_write(net, buff, sizeof buff);
|
return my_net_write(net, (char*) buff, sizeof buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
int send_fields(struct st_net *net, LIST *fields)
|
int send_fields(struct st_net *net, LIST *fields)
|
||||||
@ -195,7 +195,7 @@ int send_fields(struct st_net *net, LIST *fields)
|
|||||||
int2store(send_buff.buffer + position, 1); /* charsetnr */
|
int2store(send_buff.buffer + position, 1); /* charsetnr */
|
||||||
int4store(send_buff.buffer + position + 2,
|
int4store(send_buff.buffer + position + 2,
|
||||||
field->length); /* field length */
|
field->length); /* field length */
|
||||||
send_buff.buffer[position+6]= FIELD_TYPE_STRING; /* type */
|
send_buff.buffer[position+6]= (uint) FIELD_TYPE_STRING; /* type */
|
||||||
int2store(send_buff.buffer + position + 7, 0); /* flags */
|
int2store(send_buff.buffer + position + 7, 0); /* flags */
|
||||||
send_buff.buffer[position + 9]= (char) 0; /* decimals */
|
send_buff.buffer[position + 9]= (char) 0; /* decimals */
|
||||||
send_buff.buffer[position + 10]= 0;
|
send_buff.buffer[position + 10]= 0;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
in manner, similar to ``quit'' signals.
|
in manner, similar to ``quit'' signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_IMPLEMENTATION)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3438,7 +3438,7 @@ int Field_long::store(longlong nr, bool unsigned_val)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (nr < 0 && unsigned_val)
|
if (nr < 0 && unsigned_val)
|
||||||
nr= INT_MAX32+1; // Generate overflow
|
nr= ((longlong) INT_MAX32) + 1; // Generate overflow
|
||||||
if (nr < (longlong) INT_MIN32)
|
if (nr < (longlong) INT_MIN32)
|
||||||
{
|
{
|
||||||
res=(int32) INT_MIN32;
|
res=(int32) INT_MIN32;
|
||||||
|
@ -164,6 +164,7 @@ struct Hybrid_type_traits
|
|||||||
virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const;
|
virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const;
|
||||||
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
|
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
|
||||||
static const Hybrid_type_traits *instance();
|
static const Hybrid_type_traits *instance();
|
||||||
|
Hybrid_type_traits() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -185,6 +186,7 @@ struct Hybrid_type_traits_decimal: public Hybrid_type_traits
|
|||||||
{ return &val->dec_buf[val->used_dec_buf_no]; }
|
{ return &val->dec_buf[val->used_dec_buf_no]; }
|
||||||
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
|
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
|
||||||
static const Hybrid_type_traits_decimal *instance();
|
static const Hybrid_type_traits_decimal *instance();
|
||||||
|
Hybrid_type_traits_decimal() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -215,6 +217,7 @@ struct Hybrid_type_traits_integer: public Hybrid_type_traits
|
|||||||
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const
|
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const
|
||||||
{ buf->set(val->integer, &my_charset_bin); return buf;}
|
{ buf->set(val->integer, &my_charset_bin); return buf;}
|
||||||
static const Hybrid_type_traits_integer *instance();
|
static const Hybrid_type_traits_integer *instance();
|
||||||
|
Hybrid_type_traits_integer() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -545,6 +545,7 @@ struct Hybrid_type_traits_fast_decimal: public
|
|||||||
val->traits->div(val, u);
|
val->traits->div(val, u);
|
||||||
}
|
}
|
||||||
static const Hybrid_type_traits_fast_decimal *instance();
|
static const Hybrid_type_traits_fast_decimal *instance();
|
||||||
|
Hybrid_type_traits_fast_decimal() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
static const Hybrid_type_traits_fast_decimal fast_decimal_traits_instance;
|
static const Hybrid_type_traits_fast_decimal fast_decimal_traits_instance;
|
||||||
|
@ -284,7 +284,7 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
|
|||||||
/* Flag set if setup_tables already done */
|
/* Flag set if setup_tables already done */
|
||||||
#define OPTION_SETUP_TABLES_DONE (1L << 30) // intern
|
#define OPTION_SETUP_TABLES_DONE (1L << 30) // intern
|
||||||
/* If not set then the thread will ignore all warnings with level notes. */
|
/* If not set then the thread will ignore all warnings with level notes. */
|
||||||
#define OPTION_SQL_NOTES (1L << 31) // THD, user
|
#define OPTION_SQL_NOTES (1UL << 31) // THD, user
|
||||||
/*
|
/*
|
||||||
Force the used temporary table to be a MyISAM table (because we will use
|
Force the used temporary table to be a MyISAM table (because we will use
|
||||||
fulltext functions when reading from it.
|
fulltext functions when reading from it.
|
||||||
|
@ -4787,9 +4787,6 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
|
|||||||
}
|
}
|
||||||
DBUG_RETURN(test(thd->net.report_error));
|
DBUG_RETURN(test(thd->net.report_error));
|
||||||
|
|
||||||
err:
|
|
||||||
if (arena)
|
|
||||||
thd->restore_active_arena(arena, &backup);
|
|
||||||
err_no_arena:
|
err_no_arena:
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
@ -5644,8 +5644,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
|
|||||||
and so on, the display width is ignored.
|
and so on, the display width is ignored.
|
||||||
*/
|
*/
|
||||||
char buf[32];
|
char buf[32];
|
||||||
my_snprintf(buf, sizeof(buf),
|
my_snprintf(buf, sizeof(buf), "TIMESTAMP(%s)", length);
|
||||||
"TIMESTAMP(%s)", length, system_charset_info);
|
|
||||||
push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_WARN_DEPRECATED_SYNTAX,
|
ER_WARN_DEPRECATED_SYNTAX,
|
||||||
ER(ER_WARN_DEPRECATED_SYNTAX),
|
ER(ER_WARN_DEPRECATED_SYNTAX),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user