Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8736879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:23:37+00:00 2026-06-13T10:23:37+00:00

I paste a >2KB SQL file to mysql CLI and it randomly loses characters

  • 0

I paste a >2KB SQL file to mysql CLI and it randomly loses characters and then reports syntax error in my SQL.

For example:

(.....)
UPDATE ct_transform_target_summary
SET
ytd_margin_target = jul_margin_target + aug_margin_target + sep_margin_target + oct_margin_target + nov_margin_target + dec_margin_target +
                    jan_margin_target + feb_margin_target + mar_margin_target + apr_margin_target + may_margin_target + jun_margin_target,
ytd_adjustments = jul_margin_adj + aug_margin_adj + sep_margin_adj + oct_margin_adj + nov_margin_adj + dec_margin_adj +
                  jan_margin_adj + feb_margin_adj + mar_margin_adj + apt_margin_adj + may_margin_adj + jun_margin_adj,
ytd_margin = jul_margin + aug_margin + sep_margin + oct_margin + nov_margin + dec_margin +
             jan_margin + feb_margin + mar_margin + apr_margin + may_margin + jun_margin;
(....)

Becomes:

(....)
->   
->   
->   SET
->     ytd_margin_target = jul_margin_target + aug_margin_target + sep_margin_target + oct_margin_target + nov_margin_target + dec_margin_target +
->                    
->     ytd_adjustments = jul_margin_adj + aug_margin_adj + sep_margin_adj + oct_margin_adj + nov_margin_adj + dec_margin_adj +
->                       jan_margin_adj + feb_ma
->     ytd_margin = jul_margin + aug_margin + sep_margin + oct_margin + nov_margin + dec_margin +
->                  jan_margin + feb_margin + mar_margin + apr_margin + may_

This apparently never happens to short SQL code, but only happens to long code.
Could this be caused by my terminal (Fedora 17 Gnome terminal) or could it be an issue of mysql CLI?

Never had I experienced such problem in terminal before. It only happens in mysql cli.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:23:38+00:00Added an answer on June 13, 2026 at 10:23 am

    Pasting into the MySQL CLI client is tricky, because it uses Readline for interactive line editing. Readline interprets certain input as control sequences and does not pass them verbatim to the MySQL client. The character most likely to be causing problems in your case is tabulation, used often for indentation purposes in SQL, but used in Readline for tab completion. Inadvertent tab completion in the middle of your query might have very unexpected results and it is often hard to pinpoint the exact location where it has introduced interference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I paste the entire jquery function into a file (just as an example..
When I try to paste a large(5000 lines) sql file into PhpMyAdmin, I get
can somebody paste me deploy.rb file with configuration for LOCAL MACHINE ? Whenever i
Html FIle Disable drop paste in HTML input fields..
I won't copy/paste my whole xaml file. It will be too long to explain
When I copy-paste code from Websites (for example: http://www.west-wind.com/Weblog/posts/154812.aspx ) Visual Studio 2010 adds
I want to paste something I have cut from my desktop into a file
If I paste something like <asp:DropDownList ID=DropDownListExpirationDate runat=server /> onto an ASPX file that
Possible Duplicate: How to paste source code to vim without error format? In Vim,
When I copy/paste text from most sites and pdfs, the following characters are almost

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.