Skip to content
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

Token recognition error for generated keys query with whitespace in (quoted) table name [JDBC481] #520

Closed
firebird-issue-importer opened this issue Feb 27, 2017 · 6 comments

Comments

@firebird-issue-importer

Submitted by: @mrotteveel

A generated keys query with a insert statement with a space in the (quoted) table name results in a token recognition error

PreparedStatement pstmt = con.prepareStatement("INSERT INTO \"IDENTITY TABLE\" (theValue) VALUES (?)", Statement.RETURN_GENERATED_KEYS)

line 1:12 token recognition error at: '"IDENTITY '
line 1:27 token recognition error at: '" '

Note that the insert statement works, but it will not output generated keys.

Commits: 4b12d44 c490cf2

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 27, 2017

Modified by: @mrotteveel

description: A generated keys query with a insert statement with a space in the (quoted) table name results in a token recognition error

PreparedStatement pstmt = con.prepareStatement("INSERT INTO \"IDENTITY TABLE\" (theValue) VALUES (?)", Statement.RETURN_GENERATED_KEYS)

line 1:12 token recognition error at: '"IDENTITY '
line 1:27 token recognition error at: '" '

Note that the query would work, but just not output generated keys.

=>

A generated keys query with a insert statement with a space in the (quoted) table name results in a token recognition error

PreparedStatement pstmt = con.prepareStatement("INSERT INTO \"IDENTITY TABLE\" (theValue) VALUES (?)", Statement.RETURN_GENERATED_KEYS)

line 1:12 token recognition error at: '"IDENTITY '
line 1:27 token recognition error at: '" '

Note that the insert statement would work, but just not output generated keys.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 27, 2017

Modified by: @mrotteveel

description: A generated keys query with a insert statement with a space in the (quoted) table name results in a token recognition error

PreparedStatement pstmt = con.prepareStatement("INSERT INTO \"IDENTITY TABLE\" (theValue) VALUES (?)", Statement.RETURN_GENERATED_KEYS)

line 1:12 token recognition error at: '"IDENTITY '
line 1:27 token recognition error at: '" '

Note that the insert statement would work, but just not output generated keys.

=>

A generated keys query with a insert statement with a space in the (quoted) table name results in a token recognition error

PreparedStatement pstmt = con.prepareStatement("INSERT INTO \"IDENTITY TABLE\" (theValue) VALUES (?)", Statement.RETURN_GENERATED_KEYS)

line 1:12 token recognition error at: '"IDENTITY '
line 1:27 token recognition error at: '" '

Note that the insert statement works, but it will not output generated keys.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 27, 2017

Modified by: @mrotteveel

Version: Jaybird 2.2.12 [ 10781 ]

Version: Jaybird 2.2.11 [ 10751 ]

Version: Jaybird 2.2.10 [ 10723 ]

Version: Jaybird 2.2.9 [ 10691 ]

Fix Version: Jaybird 3.0.0-beta-3 [ 10806 ]

Fix Version: Jaybird 3.0.0 [ 10440 ]

Fix Version: Jaybird 2.2.13 [ 10805 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 27, 2017

Commented by: @mrotteveel

Added additional tests and committed fix to Jaybird 2.2 and 3.0

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 27, 2017

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 5, 2017

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

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