alter database prints "command failed" even when everything is ok
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java, specifically sqlcommand, and reproduce the ALTER DATABASE TIMEZONE command shown in the issue. Trace how the command handles results when output is suppressed. Done means a successful command prints a success message rather than "Command failed."
Written by the indexing model from the issue text.
Description
OrientDB Version: 3.1.0 and develop (b15f84f1400c26a7895999bf4194555c7fbcd039)
Java Version: 8
OS: debian testing
Expected behavior
$ ./bin/console.sh
orientdb> create database plocal:databases/test
orientdb {db=test}> alter database TIMEZONE "Europe/Paris"
Everything is OK
Actual behavior
It actually works, but it shows
"Command failed."
Investigation
Being new to orientdb, I spent several hours trying to understand what I did wrong. I eventually debugged the code to understand what I did wrong.
After the command successfully ends, the code in tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java/sqlcommand
Writes command failed because it is asked to avoid printing the results and the code looks like
if (iIncludeResult) |
message(iMessageSuccess, result, elapsedSeconds); |
else |
message(iMessageFailure, elapsedSeconds);
Therefore, everything is ok but the code still writes "command failed"...
- Dominant language
- Java
- Stars
- 5k
- Forks
- 868
- Avg merge
- 15h 6m
- Merged PRs (30d)
- 18
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from orientechnologies/orientdb
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
orientechnologies/orientdb#10865 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
orientechnologies/orientdb#10864 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
orientechnologies/orientdb#10856 · 7 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
orientechnologies/orientdb#10813 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
orientechnologies/orientdb#10800 ·
All issues in orientechnologies/orientdb
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100