Database tables have content search not content

Source: Internet
Author: User
Tags mysql in mysql command line

Yesterday recently in the storage data, found that MySQL in the same database has two tables, search content with the site, can only appear a table results (two tables have the same content, normal can search out) but the MySQL command line retrieval is normal.


The first thought is that the code, field names, indexes, exported files to remove the BOM header (signature) and other errors, with navicat view test, the results are excluded, strange!!!


Also suspect is not in storage when the text file header has "messy" data, in this library with TXT export, in the storage or not. Also export SQL script, in the storage or not. It's even weirder!!!


Baidu, group of inquiry without fruit, confused a day past.


Today, in the repeated testing, inadvertently found the export of txt import back problems, the export of SQL script, the SQL script statements are deleted, only leave the data and txt text, when the data is imported suddenly normal.


That's going to be a problem. Data and software are not found?

This is what I think with hex to see what is in the end, with Winhex open the file, sure enough to find the problem, Red Arrows.


After analysis, the data in the first storage time has been the BOM head warehousing, after you no matter how to export, always have that BOM header information, because it is in the data area, and the normal BOM in the head area, and text editing software such as "EmEditor" will only determine the head area has a BOM, but not to judge the data area , so the software did not find the problem when it was saved. Cause you will carry the BOM head, and the storage is treated as data storage, resulting in data retrieval problems.


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/86/C1/wKioL1fJRbKQyHfIAAF3dGOTzfc020.jpg "title=" Exported txt-sql.jpg "width=" "height=" 340 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:340px; "alt=" Wkiol1fjrbkqyhfiaaf3dgotzfc020.jpg "/>


So why does the exported SQL work?

Because he export time in the data area, and before and after the BOM header has normal SQL statements, in SQL to TXT, "inadvertently" in the BOM header to delete, so later import is normal.



This is the MySQL database file.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/86/C1/wKioL1fJRbPAxoteAAEurzwU1jY109.jpg "style=" width : 700px;height:320px; "title=" qq20160902171627.jpg "width=" height= "0" border= "0" hspace= "0" vspace= " Wkiol1fjrbpaxoteaaeurzwu1jy109.jpg "/>


This is the file to be put into storage, one is the problem of the table after storage, one is the storage after the table can be used normally.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/86/C1/wKiom1fJRbShRxXMAAE7PB4B2Ys657.jpg "style=" width : 700px;height:355px; "title=" qq20160902171805.jpg "width=" "height=" "355" border= "0" hspace= "0" vspace= "0" alt= " Wkiom1fjrbshrxxmaae7pb4b2ys657.jpg "/>


This article is from the "Enlightened Grocery store" blog, please be sure to keep this source http://wutou.blog.51cto.com/615096/1845686

Database tables have content search not content

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.