Skip to content

Commit 1d26537

Browse files
Query cache.
Remove some warnings
1 parent 8a86170 commit 1d26537

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3363
-292
lines changed

Docs/manual.texi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8528,6 +8528,14 @@ libc internal error: _rmutex_unlock: rmutex not held
85288528

85298529
Add @code{-mt} to @code{CFLAGS} and @code{CXXFLAGS} and try again.
85308530

8531+
If you are using the SFW version of gcc (which comes with Solaris 8),
8532+
you must add @file{/opt/sfw/lib} to the environment variable
8533+
@code{LD_LIBRARY_PATH} before running configure.
8534+
8535+
If you are using the gcc available from @code{sunfreeware.com}, you may
8536+
have many problems. You should recompile gcc and GNU binutils on the
8537+
machine you will be running them from to avoid any problems.
8538+
85318539
If you get the following error when compiling MySQL with @code{gcc},
85328540
it means that your @code{gcc} is not configured for your version of Solaris:
85338541

include/ft_global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern const char *ft_precompiled_stopwords[];
4949
extern ulong ft_min_word_len;
5050
extern ulong ft_max_word_len;
5151
extern ulong ft_max_word_len_for_sort;
52-
extern char *ft_boolean_syntax;
52+
extern const char *ft_boolean_syntax;
5353

5454
int ft_init_stopwords(const char **);
5555
void ft_free_stopwords(void);

include/myisam.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ typedef struct st_columndef /* column information */
191191
#endif
192192
} MI_COLUMNDEF;
193193

194+
/* invalidator function reference for Query Cache */
195+
typedef void (* invalidator_by_filename) (char * filename);
194196

195197
extern my_string myisam_log_filename; /* Name of logfile */
196198
extern uint myisam_block_size;

include/myisammrg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ extern int myrg_lock_database(MYRG_INFO *file,int lock_type);
9595
extern int myrg_create(const char *name, const char **table_names,
9696
uint insert_method, my_bool fix_names);
9797
extern int myrg_extra(MYRG_INFO *file,enum ha_extra_function function);
98+
extern void myrg_extrafunc(MYRG_INFO *info,invalidator_by_filename inv);
9899
extern ha_rows myrg_records_in_range(MYRG_INFO *info,int inx,
99100
const byte *start_key,uint start_key_len,
100101
enum ha_rkey_function start_search_flag,

include/mysql_com.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
7878
#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
7979
#define REFRESH_FAST 32768 /* Intern flag */
8080

81+
#define REFRESH_QUERY_CACHE 65536 /* flush query cache */
82+
#define REFRESH_QUERY_CACHE_FREE 0x10000L /* pack query cache */
83+
8184
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
8285
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
8386
#define CLIENT_LONG_FLAG 4 /* Get all column flags */
@@ -126,6 +129,7 @@ typedef struct st_net {
126129
unsigned char reading_or_writing;
127130
char save_char;
128131
my_bool no_send_ok;
132+
gptr query_cache_query;
129133
} NET;
130134

131135
#define packet_error (~(unsigned long) 0)

libmysqld/lib_sql.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
460460
umask(((~my_umask) & 0666));
461461
table_cache_init();
462462
hostname_cache_init();
463-
sql_cache_init();
463+
/*sql_cache_init();*/
464464
randominit(&sql_rand,(ulong) start_time,(ulong) start_time/2);
465465
reset_floating_point_exceptions();
466466
init_thr_lock();

myisam/ft_boolean_search.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ typedef struct st_ft_info {
8686
MEM_ROOT mem_root;
8787
} FTB;
8888

89-
int FTB_WORD_cmp(void *v, byte *a, byte *b)
89+
int FTB_WORD_cmp(void *v __attribute__((unused)), byte *a, byte *b)
9090
{
9191
/* ORDER BY docid, ndepth DESC */
9292
int i=CMP_NUM(((FTB_WORD *)a)->docid, ((FTB_WORD *)b)->docid);
@@ -109,7 +109,7 @@ void _ftb_parse_query(FTB *ftb, byte **start, byte *end,
109109
return;
110110

111111
param.prev=' ';
112-
while (res=ft_get_word(start,end,&w,&param))
112+
while ((res=ft_get_word(start,end,&w,&param)))
113113
{
114114
byte r=param.plusminus;
115115
float weight=(param.pmsign ? nwghts : wghts)[(r>5)?5:((r<-5)?-5:r)];
@@ -280,7 +280,7 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc)
280280

281281
int ft_boolean_read_next(FT_INFO *ftb, char *record)
282282
{
283-
FTB_EXPR *ftbe, *up;
283+
FTB_EXPR *ftbe;
284284
FTB_WORD *ftbw;
285285
MI_INFO *info=ftb->info;
286286
MI_KEYDEF *keyinfo=info->s->keyinfo+ftb->keynr;

myisam/ft_dump.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,14 @@ static void get_options(int argc, char *argv[])
184184

185185
static void usage(char *argv[])
186186
{
187-
printf("
188-
Use: %s [-%s] <table_name> <index_no>
189-
190-
-d dump index (incl. data offsets and word weights)
191-
-s report global stats
192-
-c calculate per-word stats (counts and global weights)
193-
-v be verbose
194-
-h this text\n
187+
printf("\n\
188+
Use: %s [-%s] <table_name> <index_no>\n\
189+
\n\
190+
-d dump index (incl. data offsets and word weights)\n\
191+
-s report global stats\n\
192+
-c calculate per-word stats (counts and global weights)\n\
193+
-v be verbose\n\
194+
-h this text\n\
195195
", *argv, options);
196196
exit(1);
197197
}

myisam/ft_parser.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ typedef struct st_ft_docstat {
3838
static int FT_WORD_cmp(void* cmp_arg, FT_WORD *w1, FT_WORD *w2)
3939
{
4040
return _mi_compare_text(default_charset_info,
41-
(uchar*) w1->pos,w1->len,
42-
(uchar*) w2->pos, w2->len,(my_bool)cmp_arg);
41+
(uchar*) w1->pos, w1->len,
42+
(uchar*) w2->pos, w2->len,
43+
(my_bool) (cmp_arg != 0));
4344
}
4445

4546
static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)

myisam/ft_static.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
ulong ft_min_word_len=4;
2222
ulong ft_max_word_len=HA_FT_MAXLEN;
2323
ulong ft_max_word_len_for_sort=20;
24-
char *ft_boolean_syntax="+ -><()~*";
24+
const char *ft_boolean_syntax="+ -><()~*";
2525

2626
const MI_KEYSEG ft_keysegs[FT_SEGS]={
2727
{

0 commit comments

Comments
 (0)