mysql--when a query encounters hidden characters

Source: Internet
Author: User

Tag: JPG causes condition to return VIM port data log input

Cause of event:

When you import some Excel-maintained data into MySQL during maintenance, you find that some data is missing, and when you check it, you see that the same SQL returns completely differently:

See in the SQLyog as:

Two SQL execution results are different, one of the SQL Wms_report1 is keyboard input, and the other SQL Wms_report1 is copied and pasted from the database.

Using Xshell to connect to MySQL, the same problem occurs when you copy SQL to Xshell, but there is no way to see the difference between the two sql:

Problem solving:

After colleagues remind, copy SQL to Vim to see, finally found clues:

By copying and pasting, the hidden characters are brought into the where condition, resulting in seemingly identical SQL having different results

##===========================================================================================##

Still the sister is affixed

mysql--when a query encounters hidden characters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.