Merge branch 'develop' into firewall
This commit is contained in:
@ -1049,15 +1049,16 @@ char** skygw_get_table_names(GWBUF* querybuf,int* tblsize, bool fullnames)
|
||||
TABLE_LIST* tbl;
|
||||
int i = 0,
|
||||
currtblsz = 0;
|
||||
char **tables,
|
||||
**tmp;
|
||||
char **tables = NULL,
|
||||
**tmp = NULL;
|
||||
|
||||
if((lex = get_lex(querybuf)) == NULL)
|
||||
{
|
||||
if( (lex = get_lex(querybuf)) == NULL ||
|
||||
lex->current_select == NULL )
|
||||
{
|
||||
goto retblock;
|
||||
}
|
||||
|
||||
lex->current_select = lex->all_selects_list;
|
||||
lex->current_select = lex->all_selects_list;
|
||||
|
||||
while(lex->current_select){
|
||||
|
||||
|
@ -62,7 +62,7 @@ int main(int argc, char** argv)
|
||||
*(qbuff->sbuf->data + 1) = (unsigned char)(psize>>8);
|
||||
*(qbuff->sbuf->data + 2) = (unsigned char)(psize>>16);
|
||||
*(qbuff->sbuf->data + 4) = 0x03;
|
||||
strcpy((char*)(qbuff->start + 5),readbuff);
|
||||
memcpy(qbuff->start + 5,readbuff,psize + 1);
|
||||
parse_query(qbuff);
|
||||
tok = skygw_get_canonical(qbuff);
|
||||
fprintf(outfile,"%s\n",tok);
|
||||
|
@ -45,8 +45,8 @@ int main(int argc, char** argv)
|
||||
|
||||
input = fopen(argv[1],"rb");
|
||||
expected = fopen(argv[2],"rb");
|
||||
|
||||
while((rd = fread(buffer,sizeof(char),buffsz,input))){
|
||||
memset(buffer,0,buffsz);
|
||||
while((rd = fread(buffer,sizeof(char),buffsz - 1,input))){
|
||||
|
||||
/**Fill the read buffer*/
|
||||
if(strsz + rd >= buffsz){
|
||||
@ -167,7 +167,7 @@ int main(int argc, char** argv)
|
||||
|
||||
gwbuf_free(buff);
|
||||
}
|
||||
|
||||
memset(buffer,0,buffsz);
|
||||
}
|
||||
fclose(input);
|
||||
fclose(expected);
|
||||
|
Reference in New Issue
Block a user