Closed dotancohen closed 10 years ago
Another, this time from Panther:
Showing table dist_queue_config
-------------------------------
Describe table
--------------
+-------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+----------------+
| name | varchar(30) | NO | | None | |
| value | varchar(50) | YES | | None | |
| id | int(11) | NO | PRI | None | auto_increment |
| explanation | text | YES | | None | |
| display | tinyint(4) | NO | | 1 | |
+-------------+-------------+------+-----+---------+----------------+
Time: 0.0008
Some random records
-------------------
+------+-------+----+-------------+---------+
| name | value | id | explanation | display |
+------+-------+----+-------------+---------+
+------+-------+----+-------------+---------+
Time: 0.0003
Last record
-----------
Traceback (most recent call last):
File "./squeal.py", line 338, in <module>
main()
File "./squeal.py", line 121, in main
show_table_details(conn, cursor, prompt, menu_tables[operation-1])
File "./squeal.py", line 284, in show_table_details
output_table_from_sql(conn, cursor, sql, vertical_format=True)
File "./squeal.py", line 304, in output_table_from_sql
print("%s:\n %s\n" % (cursor.description[i][0], results[0][i],))
IndexError: tuple index out of range
Note that the table in question is empty:
mysql> select count(*) from dist_queue_config;
+----------+
| count(*) |
+----------+
| 0 |
+----------+