New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong error row number #177

Closed
SailorMax opened this Issue Oct 13, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@SailorMax

SailorMax commented Oct 13, 2017

sample code:

SELECT 'выбор типа';
SELECT 1
#INSERT INTO tbl2 (name) VALUES (
	SELECT 1;
#);

(missed semicolon after second SELECT)

Currently parser return error:

test.sql (line 3, col 33): This type of clause was previously parsed. (near: SELECT)
#INSERT INTO tbl2 (name) VALUES (
                                ^

Expected: commented line can not has error pointer.

Hint: problem in UTF-8 russian string.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Oct 16, 2017

Member

I'm not able to reproduce this. What version do you use? Do you have installed mbstring PHP extension?

Member

nijel commented Oct 16, 2017

I'm not able to reproduce this. What version do you use? Do you have installed mbstring PHP extension?

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Oct 16, 2017

Member

Apparently you're using third party frontend which is causing this, I've filled the report there: cweiske/php-sqllint#14

Member

nijel commented Oct 16, 2017

Apparently you're using third party frontend which is causing this, I've filled the report there: cweiske/php-sqllint#14

@nijel nijel closed this Oct 16, 2017

@nijel nijel self-assigned this Oct 16, 2017

@nijel nijel added the question label Oct 16, 2017

@SailorMax

This comment has been minimized.

Show comment
Hide comment
@SailorMax

SailorMax Oct 16, 2017

Problem was in my function. Don't know anything about php-sqllint.
Sorry.

SailorMax commented Oct 16, 2017

Problem was in my function. Don't know anything about php-sqllint.
Sorry.

nijel added a commit that referenced this issue Oct 16, 2017

Document that position is counted in chars not bytes
Issue #177

Signed-off-by: Michal Čihař <michal@cihar.com>
@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Oct 16, 2017

Member

Well the php-sqllint has exactly same bug :-).

Anyway I've clarified the documentation for position attribute in c0d374a

Member

nijel commented Oct 16, 2017

Well the php-sqllint has exactly same bug :-).

Anyway I've clarified the documentation for position attribute in c0d374a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment