Allow mysqlcc to support MySQL 5.0

Source: Internet
Author: User

The company went to MySQL 5.0, and what followed was not how easy it was to use, but how easy it was to use mysqlcc... the error message "[192.168.22.72] Error 1146: Table 'rimkpi. 1 'doesn' t exist. You cannot directly modify the selected data in the table. What's wrong with mysqlcc?
 
After observation, we found that the explain statement results on MySQL 5.0 are different from those in MySQL 4.1. The first field in the returned results before 4.1 is tablename, And the ID number (usually 1) is returned after 4.1 and 5.0, and the third field is tablename. It seems that there is a problem here, but how can it be on 4.1, but 5.0 is not working? So I went to the official MySQL website to drag the source of mysqlcc, followed by source-Navigator, and found that it was originally in cquerywindow. an idiot code in the execquery method (line 447) of CPP:

Default_table = explain_query-> row (MySQL ()-> Version (). Major> = 4 &&
MySQL ()-> Version (). Minor> = 1? 2: 0 );

 

If the version number is 5.0, the result is 0. If it is 4.1 or 5.1, it is 1. The correct code should at least be

Default_table = explain_query-> row (
(MySQL ()-> Version (). major = 4 & MySQL ()-> Version (). minor> = 1) |
(MySQL ()-> Version (). Major> = 5 )? 2: 0 );

 
This is probably because of the open source. Mysqlcc is no longer maintained now. It seems that you can only find the MySQL Development Kit to re-compile a self-use version of mysqlcc. Haha

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.