Bug #7835 Pasting large query causes access violation
Submitted: 12 Jan 2005 14:10 Modified: 7 Feb 2005 8:23
Reporter: Adam Lewis Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.5 OS:Windows (Windows XP Home (SP2))
Assigned to: Mike Lischke CPU Architecture:Any

[12 Jan 2005 14:10] Adam Lewis
Description:
When pasting a large query into the the query box, the query text box begins to resize and then the application crashes before fully redrawing and displays an access violation in the status bar:

Access violation at address 00568F76 in module 'MySQLQueryBrowser.exe'. Read of address 0000002C

How to repeat:
Paste this query into the query text box...seems to occur with any many line query:

(SELECT 'DBIT' AS transType, accountDebit_id AS transaction_id,
-amount AS amount, deliverDate AS transDate, notes,
debitType AS dbtField1, reference_id AS dbtField2,
0 AS crdField1, SPACE(100) AS crdField2, SPACE(100) AS crdField3, SPACE(100) AS crdField4
FROM accountDebit
LEFT JOIN invoice ON invoice_id = reference_id
WHERE account_id=379 AND debitType='PAY-INVOICE'
UNION
(SELECT 'CRDT' AS transType, accountCredit_id AS transaction_id,
amount, transDate, notes,
'' AS dbtField1, 0 AS dbtField2,
paymentType_id AS crdField1, name1 AS crdField2, num1 AS crdField3, num2 AS crdField4
FROM accountCredit
WHERE account_id=379
ORDER BY transDate

current workaroud:
paste the query one line at a time
[3 Feb 2005 10:00] C. van Breugel
I have encountered exactly the same bug 
on Windows XP Sp1.
[7 Feb 2005 8:23] Mike Lischke
I'm sorry, but I cannot reproduce any access violation. I pasted 20 times as much text into the query area and still get no error. Maybe the problem has been fixed already in the internal sources. Please wait for the next release and test again. Reopen this bug if you still find the problem unsolved.
[9 Feb 2005 17:24] Kyle Wickliffe
Here's a different workaround:
Hit enter until the query box expands to its fullest, then paste.  Apparently the problem only occurs when the paste and redraw happen at the same time (or something).
[11 Feb 2005 10:49] Phil
Im also having a problem pasting into the query box.

After pasting a query from textpad the text is there but invisible, if you type on a line that that line and those above become visable.

Text also becomes visible if I click 'execute' then 'explain'
[11 Feb 2005 12:21] Adam Lewis
Phil: I had the same sort of problem/solution...after the access violation, the program doesn't die.  I can also confirm that it is the expansion of the query box on paste that causes the problem...pre-growing the box one line at a time with CRs avoids the problem.