How to solve the problem of table name error with MD5 value in Mysql _ MySQL

Source: Internet
Author: User
How to solve the problem of table name error with MD5 value in Mysql This article summarizes notes about uncommon errors. Irregular updates

1. problem of table name error caused by MD5 value in Mysql and solution

When writing a crawler, you need to use MD5 as the table name, but some of them will report errors, but others will work well! For example, 978ea04f9bdadd36d1f919520f20ac47 can work normally while 8e6a968cdadefeeae6c25e050080e537 cannot! Why?

Because MD5 contains XeX characters, such as 1e or 2e2, the expressions similar to 1e + 1 are fuzzy. According to the context, it can be interpreted as the expression 1e + 1 or the number 1e + 1. Therefore, use MD5 to generate a table name, because it may generate an invalid table name, as described above.

Original article: click to open the link

Solution:

1. since the root cause of the problem lies in the character e, you can replace all the characters e with str. replace ("e", "new;

2. use the Mysql identifier "", the key on the right of keyboard 1.


This article by @ The_Third_Wave (Blog address: http://blog.csdn.net/zhanh1218) original. Update from time to time. if any error occurs, please correct it.

If you find that this Blog post is incomplete, it is the reason for me to prevent crawlers from releasing half of the posts first. please refer to the original author's Blog.

If this blog post is helpful to you, you are not recommended to repost it for a good network environment. we recommend that you add it to your favorites! If you must reprint the content, please include the suffix and the address of this article.

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.