Fuco1 / sql-workbench

SQL client for Emacs
13 stars 2 forks source link

Odd autocomplete behavior with swb-show-data-in-table #18

Closed zck closed 6 years ago

zck commented 6 years ago

I normally use Helm for selection, but I've also reproduced this from emacs -Q.

For this test, I'm using a database with a single table in it. The database is called zck; the table is called book.

After connecting, I run C-c C-d (#'swb-show-data-in-table). I then want to see what the options are, so I press tab. The list of tables is:

Tables_in_zck
book

The same thing happens when I'm using Helm; there are the same two selection options.

Tables_in_zck is not a table.

I think what's happening is that sql-workbench.el isn't parsing the result properly. When I log into the database on the command line and show tables;, I get this output:

mysql> show tables;
+---------------+
| Tables_in_zck |
+---------------+
| book          |
+---------------+
1 row in set (0.00 sec)

I'm using this mysql:

zck@zck-laptop:~/code/site-generator$ mysql --version
mysql  Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using  EditLine wrapper