Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14285

sqllline: `Bad history file syntax!'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.10
    • 2.10
    • None
    • None

    Description

      When starting the updated sqlline in 2.10, I can see the following error message:

      ~/Downloads/2.10/apache-ignite-slim-2.10.0-bin% bin/sqlline.sh
      мар 05, 2021 12:30:46 PM org.jline.utils.Log logr
      WARNING: Failed to load history
      java.lang.IllegalArgumentException: Bad history file syntax! The history file `/home/ikasnacheev/.sqlline/history` may be an older history: please remove it or use a different history file.
              at org.jline.reader.impl.history.DefaultHistory.addHistoryLine(DefaultHistory.java:185)
              at org.jline.reader.impl.history.DefaultHistory.addHistoryLine(DefaultHistory.java:169)
              at org.jline.reader.impl.history.DefaultHistory.lambda$load$0(DefaultHistory.java:86)
              at java.util.Iterator.forEachRemaining(Iterator.java:116)
              at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
              at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
              at org.jline.reader.impl.history.DefaultHistory.load(DefaultHistory.java:86)
              at org.jline.reader.impl.history.DefaultHistory.attach(DefaultHistory.java:69)
              at sqlline.SqlLine.getConsoleReader(SqlLine.java:618)
              at sqlline.SqlLine.begin(SqlLine.java:511)
              at sqlline.SqlLine.start(SqlLine.java:267)
              at sqlline.SqlLine.main(SqlLine.java:206)
      

      Moreover, if I remove the file, and run some command, then the old sqlline will use the history incorrectly:

      sqlline version 1.3.0
      sqlline> 1614936870022:select * from person;
      

      This is going to be a problem for all Ignite developers who use more than one version of Ignite on the same box, e.g. the entire development community.

      I recommend changing the default history file location to e.g. ~/.sqlline/apache-ignite.history.

      Attachments

        Issue Links

          Activity

            People

              mmuzaf Maxim Muzafarov
              ilyak Ilya Kasnacheev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m