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

Reports "warnings" that are not even actual warning with a stacktrace #387

Open
MonoAnji opened this issue Jul 20, 2020 · 1 comment
Open

Comments

@MonoAnji
Copy link

Even though I'm running sqlline with --showWarnings=false it dumps every message by Microsoft SQL Server as if it was a warning. The code seems to suggest it doesn't really honor that flag anyway in some places, so I'm getting things like this:

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
1/1
EXEC signStoredProcedure 'ish_grantDatabaseOwner', 'CertUser', '<password>';
Warning: ADD SIGNATURE TO OBJECT:: [ish_grantDatabaseOwner] BY CERTIFICATE [CertUserCert] [...] (state=S0001,code=0)
java.sql.SQLWarning: ADD SIGNATURE TO OBJECT:: [ish_grantDatabaseOwner] BY CERTIFICATE [CertUserCert] [...]
        at com.microsoft.sqlserver.jdbc.SQLServerStatement$1NextResult.onInfo(SQLServerStatement.java:1594)
        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:103)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1628)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:872)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:767)
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7225)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3053)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:247)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:222)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:743)
        at sqlline.Commands.executeSingleQuery(Commands.java:1054)
        at sqlline.Commands.execute(Commands.java:1003)
        at sqlline.Commands.sql(Commands.java:967)
        at sqlline.SqlLine.dispatch(SqlLine.java:734)
        at sqlline.SqlLine.runCommands(SqlLine.java:1736)
        at sqlline.Commands.run(Commands.java:1593)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)
        at sqlline.SqlLine.dispatch(SqlLine.java:730)
        at sqlline.SqlLine.initArgs(SqlLine.java:459)
        at sqlline.SqlLine.begin(SqlLine.java:515)
        at sqlline.SqlLine.start(SqlLine.java:267)
        at sqlline.SqlLine.main(SqlLine.java:206)
No rows affected (0.058 seconds)
sqlline version 1.9.0

Where No rows affected is hardly a warning and certainly not stacktrace-worthy.
When I see a stacktrace I think something's wrong, but it isn't, sqlline just handles messages by the server quite a bit weirdly. The documented option "brief" doesn't actually exist by the way.

@snuyanzin
Copy link
Collaborator

could you please check the latest master version?
I was not able to reproduce it (tried with postgres however it should not play a role here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants