You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
SQL> create user u01; ------------------------------------------------- [ 1 ]
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Unexpected end of command - line 1, column 13
SQL> create or alter user u01; --------------------------------------- [ 2 ]
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER USER U01 failed
-ALTER USER requires at least one clause to be specified
SQL> create or alter user u01 firstname 'john'; ---------------------- [ 3 ]
Statement failed, SQLSTATE = 23000
add record error
-validation error for column "PLG$USERS"."PLG$PASSWD", value "*** null ***"
SQL> create or alter user u01 revoke admin role; ------------------------ [ 5 ]
Statement failed, SQLSTATE = 23000
add record error
-validation error for column "PLG$USERS"."PLG$PASSWD", value "*** null ***" // same for 'grant admin role;'
All five messages appear due to missing 'password' clause. Messages in [3] and [5] looks more informative than other, but it would be nice if text will be more appropriate for end-user, like: 'missing password clause' or so.
The text was updated successfully, but these errors were encountered:
> All five messages appear due to missing 'password' clause.
That's not always correct. In case 2 provided error text is absolutely correct - problem is not due to missing password clause but due to missing _any_clause. When parsing create or alter statement we do not know what part of it (create or alter) will be executed, and at least _some_ clause is needed in any case.
What about cases 1 and 4 - look here:
SQL> create table (x int);
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 14
-(
SQL>
Error happened due to missing table name, but error text is 'Token unknown'.
I.e. it makes no sense fixing this for some particular operator, we should change all parser behaviour to have more meaningful diags.
Pavel not sure when was it fixed but currently in FB4 I get:
SQL> create or alter user u01 firstname 'john';
Statement failed, SQLSTATE = HY000
Password must be specified when creating user
SQL> create or alter user u01 revoke admin role;
Statement failed, SQLSTATE = HY000
Password must be specified when creating user
SQL>
I.e. places where changing diag made sense are already fixed.
Submitted by: @pavel-zotov
SQL> create user u01; ------------------------------------------------- [ 1 ]
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Unexpected end of command - line 1, column 13
SQL> create or alter user u01; --------------------------------------- [ 2 ]
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER USER U01 failed
-ALTER USER requires at least one clause to be specified
SQL> create or alter user u01 firstname 'john'; ---------------------- [ 3 ]
Statement failed, SQLSTATE = 23000
add record error
-validation error for column "PLG$USERS"."PLG$PASSWD", value "*** null ***"
SQL> create user u01 revoke admin role; ------------------------- [ 4 ]
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 17
-revoke
SQL> create or alter user u01 revoke admin role; ------------------------ [ 5 ]
Statement failed, SQLSTATE = 23000
add record error
-validation error for column "PLG$USERS"."PLG$PASSWD", value "*** null ***" // same for 'grant admin role;'
All five messages appear due to missing 'password' clause. Messages in [3] and [5] looks more informative than other, but it would be nice if text will be more appropriate for end-user, like: 'missing password clause' or so.
The text was updated successfully, but these errors were encountered: