forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › [Bug] Copy And Paste To Mysql Cli Broken
- This topic is empty.
-
AuthorPosts
-
-
May 27, 2011 at 7:35 pm #12345DAE51DMember
Let's say I want to take this query I've been using in SQLYog and paste it into the mySQL command line interface (CLI) because I want the results in NON-TABULAR format that the “G” does in the CLI…
Code:EXPLAIN EXTENDED
SELECT
s.scene_id AS index_id,
s.dvd_id
FROM
dvds AS d JOIN scenes_list AS s
ON s.dvd_id = d.dvd_id
AND d.status = 'ok'
AND d.date_release != '0000-00-00'
ORDER BY d.date_release DESC,
d.dvd_title ASC;,
s.type ASC,
s.id_place ASCGSo I highlight all that code, CTRL+V and then at the “mysql>” prompt, I CTRL+P
This always results in this sort of problem:
Code:mysql> EXPLAIN EXTENDED
-> SELECT
->
Display all 1414 possibilities? (y or n)
?
ABS
ACOS
ACTION
ADD
ADDDATE
…
OFFSET
OLD_PASSWORD
ON
ONE
-> e_id AS index_id,
-> s.dvd_id
-> FROM
-> dvds AS d JOIN scenes_list AS s
-> ON s.dvd_id = d.dvd_id
-> AND d.status = 'ok'
-> AND d.date_release != '0000-00-00'
-> ORDER BY d.date_release DESC,
-> d.dvd_title ASC,
-> s.type ASC,
-> s.id_place ASCG
ERROR 1054 (42S22): Unknown column 'e_id' in 'field list'What I actually have to do FIRST, is open up Notepad++ (or some other text editor), CTRL+P into that program, THEN copy from that program's editor window, and re-paste back into the mysql> prompt.
The point being, you are inserting some extra character on the end of each line that causes the query to half-ass execute. Please fix that so I can just copy from SQLYog directly to the mysql> prompt.
On a semi-related note, it would be great if you'd add a “G” mode, so that if I execute the above query in SQLYog, I should get output like this:
Code:mysql> EXPLAIN
-> SELECT
-> s.scene_id AS index_id,
-> s.dvd_id
-> FROM
-> dvds AS d JOIN scenes_list AS s
-> ON s.dvd_id = d.dvd_id
-> AND d.status = 'ok'
-> AND d.date_release != '0000-00-00'
-> ORDER BY d.date_release DESC,
-> d.dvd_title ASC,
-> s.type ASC,
-> s.id_place ASCG
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: d
type: ref
possible_keys: PRIMARY,date_release,status,status_release
key: status_release
key_len: 1
ref: const
rows: 1976
Extra: Using where; Using temporary; Using filesort
*************************** 2. row ***************************
id: 1
select_type: SIMPLE
table: s
type: ref
possible_keys: dvd_id_2,dvd_id
key: dvd_id
key_len: 4
ref: videoszcontent.d.dvd_id
rows: 6
Extra: Using where
2 rows in set (0.00 sec) -
May 27, 2011 at 7:42 pm #32312DAE51DMember
I just noticed you have a “(o) Form (o) Grid” radio buttons, which is partially what the G does.
I guess I'm asking that you recognized “G” just as you do the “;” so that it's parsed automatically and displays the results in form mode accordingly.
Also, CTRL+L does NOT give you a text version of the Form view as it does for Grid view, so I can copy/paste it into emails, etc.
-
May 28, 2011 at 7:45 am #32313peterlaursenParticipant
We will reply to this next week.
-
May 28, 2011 at 11:48 am #32314peterlaursenParticipant
.. but as you use the term 'broken' could you please tell it you find a problem with a recent version that did not exist with an older version?
-
May 29, 2011 at 6:57 pm #32315peterlaursenParticipant
Ctrl+P wil not work wind CLI on Windows (cmd.exe). Please expalin your environment: do you use SQlyog on Linux/Wine or is the CLI you are referring to a remote instance (using PuTTY for instance) ?
-
May 31, 2011 at 7:40 am #32316ashwinMember
Hi,
We tried your case at our end. Seems like in your query there are two tabs after SELECT and while pasting, MySQL CLI's auto-complete option gets in the way which interprets the tab as the auto-complete keyboard shortcut. Can you please verify this by turning off the auto-complete feature on start-up with -A (eg: mysql -A -h localhost -u root -P 3306 -p)?
Regards,
Ashwin
-
-
AuthorPosts
- You must be logged in to reply to this topic.