lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

passing unquoted string as password proceeds internal exception #106

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)
1. Execute "CREATE USER any-user-name PASSWORD pass-without-quotes"

What is the expected output? What do you see instead?
Expected output is error message. But instead i see exception report like this:
Error code 50000, SQL state HY000: General error:
java.lang.NullPointerException; SQL statement:
create user NEW_USER_NAME PASSWORD mytest [50000-116]
Line 1, column 1

Execution finished after 0 s, 1 error(s) occurred.

What version of the product are you using? On what operating system, file
system, and virtual machine?
System: Linux version 2.6.29.6-desktop-1mnb running on amd64; UTF-8; ru_RU (nb)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02

Original issue reported on code.google.com by cy6erGn0m on 3 Aug 2009 at 3:31

GoogleCodeExporter commented 9 years ago
The exception message is wrong, it should be:
"Column MYTEST not found; SQL statement: create user NEW_USER_NAME PASSWORD 
mytest
[42122-116]"

The password needs to be quoted, for example
CREATE USER GUEST PASSWORD 'abc'

I will fix that for the next release. See also
http://www.h2database.com/html/grammar.html#create_user

Original comment by thomas.t...@gmail.com on 5 Aug 2009 at 6:24

GoogleCodeExporter commented 9 years ago
Fixed in version 1.1.117

Original comment by thomas.t...@gmail.com on 10 Aug 2009 at 3:40