Skip to content

Commit

Permalink
Merge branch 'tntsql-comment-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
kostja committed Aug 13, 2012
2 parents bae76a9 + 0efdb5d commit 5e629fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions connector/c/tntsql/tnt_lex.c
Expand Up @@ -231,6 +231,10 @@ tnt_lex(struct tnt_lex *l, struct tnt_tk **tk)
} else
if (ch == '#') {
while (1) {
if (l->pos == l->buf.size) {
*tk = tnt_lex_tk(l, TNT_TK_EOF, l->line, l->col);
return TNT_TK_EOF;
}
tnt_lex_step(l);
if (tnt_lex_chr(l) == '\n') {
if (((l->pos + 1) != l->buf.size))
Expand Down
2 changes: 1 addition & 1 deletion test/connector_c/tt.c
Expand Up @@ -797,7 +797,7 @@ static void tt_tnt_net_reply(struct tt_test *test) {

/* lex ws */
static void tt_tnt_lex_ws(struct tt_test *test) {
unsigned char sz[] = " # abcde fghjk ## hh\n # zzz\n";
unsigned char sz[] = " # abcde fghjk ## hh\n # zzz\n#NOCR";
struct tnt_lex l;
tnt_lex_init(&l, sz, sizeof(sz) - 1);
struct tnt_tk *tk;
Expand Down

0 comments on commit 5e629fd

Please sign in to comment.