Formatted the canonical query test.

The file is now formatted according to the style guide.
This commit is contained in:
Markus Makela
2016-01-08 10:40:09 +02:00
parent 9c9e30fa08
commit c067bbe34a

View File

@ -42,6 +42,12 @@ int main(int argc, char** argv)
return 1;
}
if (!utils_init())
{
printf("Utils library init failed.\n");
return 1;
}
if (mysql_library_init(num_elements, server_options, server_groups))
{
printf("Embedded server init failed.\n");
@ -59,12 +65,13 @@ int main(int argc, char** argv)
while (!feof(infile) && fgets(readbuff, 4092, infile))
{
fgets(readbuff,4092,infile);
char* nl = strchr(readbuff, '\n');
if (nl)
{
*nl = '\0';
}
if (strlen(readbuff) > 0)
{
psize = strlen(readbuff);
qbuff = gwbuf_alloc(psize + 7);
*(qbuff->sbuf->data + 0) = (unsigned char) psize;
@ -77,6 +84,7 @@ int main(int argc, char** argv)
free(tok);
gwbuf_free(qbuff);
}
}
fclose(infile);
fclose(outfile);
mysql_library_end();