惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News | PayPal Newsroom
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
S
SegmentFault 最新的问题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Project Zero
Project Zero
P
Privacy & Cybersecurity Law Blog
V
Vulnerabilities – Threatpost
博客园 - 三生石上(FineUI控件)
Recorded Future
Recorded Future
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
宝玉的分享
宝玉的分享
aimingoo的专栏
aimingoo的专栏
T
Tor Project blog
T
The Exploit Database - CXSecurity.com
Schneier on Security
Schneier on Security
H
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
M
MIT News - Artificial intelligence
W
WeLiveSecurity
P
Proofpoint News Feed
A
About on SuperTechFans
S
Securelist
I
InfoQ
G
Google Developers Blog
博客园 - 司徒正美
博客园 - 叶小钗
Latest news
Latest news
F
Fortinet All Blogs
G
GRAHAM CLULEY
腾讯CDC
Jina AI
Jina AI
S
Schneier on Security
I
Intezer
V
Visual Studio Blog
美团技术团队
V2EX - 技术
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
罗磊的独立博客
Y
Y Combinator Blog

博客园 - 古月春秋(刘云涛)

打车抬表费用图 vi的一点小经验 Perl中不寻常的 ?: 运算符 - 古月春秋(刘云涛) Ubuntu 5.10 下 Apache2 SSL 的配置方法 一行shell命令求素数 Boot FreeBSD from Windows boot loader Turtles - So Happy Together 关于IoC、低耦合、配置文件及其本质意义的思考 Perl与数据库 Perl无废话入门指南 W3C XSL Transformations (XSLT) Version 2.0 翻译计划 新版 apache_2.0.54 php-5.0.4 mysql-4.1.12a 组合安装向导(原创) Solaris 下安装Perl的DBD-mysql模块失败的原因以及解决办法 Why MSN Messenger ask me to verify email address all the time? SharpDevelop的AddInTree View 插件 SharpDevelop源码分析 (三、插件系统) SharpDevelop源码分析 (二、主程序+隐藏的初始化) SharpDevelop代码分析 (一、序+基本概念) 亚洲3S节目表
修正mysqlcc在MySQL 5.0上常报的 Table 'xxx' doesn't exist 错误
古月春秋(刘云涛) · 2006-04-19 · via 博客园 - 古月春秋(刘云涛)

公司上了MySQL 5.0, 随之而来的不是用的有多爽的问题, 而是一直用的很顺手的mysqlcc...不行了, 其表现形式为经常会在状态栏中提示 "[192.168.22.72] ERROR 1146: Table 'rimkpi.1' doesn't exist" 之类的。 选出数据来也不能在表格中直接修改了,到底mysqlcc出了啥问题呢?
 
经过观察,发现在MySQL 5.0上 EXPLAIN 语句的结果和4.1一下的版本不同了。4.1以前的返回的结果第一个字段是tablename, 而4.1以后和5.0的返回的是id号(一般情况下就是1了),第三个字段才是tablename。看来是这里出了问题,不过怎么会在4.1上可以,5.0反而不行了呢? 很不爽,于是去MySQL的官方网站把mysqlcc的source拖了一份下来,用Source-Navigator跟了一把,发现原来是在CQueryWindow.cpp的execQuery的方法(line 447)中的一段白痴代码:

default_table = explain_query->row( mysql()->mysql()->version().major >= 4 && 
    mysql()
->mysql()->version().minor >= 1 ? 2 : 0);

如果版本号是4.1或者5.1的话,这个判断的结果是2;而如果版本号是5.0的话,结果就是0了。正确的代码至少也应该是

default_table = explain_query->row(
    ( mysql()
->mysql()->version().major == 4 && mysql()->mysql()->version().minor >= 1 ) || 
    ( mysql()
->mysql()->version().major >= 5 ) ? 2 : 0);


 
真是...大概开源就这点好处了。 mysqlcc现在已经不再继续维护了,看来只能自己找到mysql的开发包重新编译个自用版本的mysqlcc了,哈哈