MySQL源码中的BUG
来源:互联网 发布:棋牌游戏数据库设计 编辑:程序博客网 时间:2024/06/11 13:54
今天在深入学习MySQL查询优化器的过程中,发现一个低级的错误,应该是开发人员出于笔误导致的,当然这个错误不会出现问题,仅仅会在debug环境下,输出trace信息的时候会误导开发人员。
现公布如下:
本文基于mysql-5.5.20源代码进行调试开发。
本文基于mysql-5.5.20源代码进行调试开发。
sql_select.cc文件的5439行,代码如下:
点击(此处)折叠或打开
- DBUG_EXECUTE("opt", print_plan(join, idx, read_time, record_count, idx,
- "SOFAR:"););
其中通过查看print_plan函数可以发现,输入参数:read_time和record_count的顺序是错误的。print_plan函数在sql_test.cc的266行定义如下:
点击(此处)折叠或打开
- /*
- print_plan()
- join pointer to the structure providing all context info for
- the query
- read_time the cost of the best partial plan
- record_count estimate for the number of records returned by the best
- partial plan
- idx length of the partial QEP in 'join->positions';
- also an index in the array 'join->best_ref';
- info comment string to appear above the printout
- */
- void
- print_plan(JOIN* join, uint idx, double record_count, double read_time,
- double current_read_time, const char *info)
点击(此处)折叠或打开
- DBUG_EXECUTE("opt", print_plan(join, idx, record_count, read_time, idx,
- "SOFAR:"););
- MySQL源码中的BUG
- MySQL源码bug#65995
- MySql Workbench中的BUG
- MySql Workbench中的BUG
- Delphi 6 SOAP 源码中的BUG修正
- Android2.1源码中的一个bug
- cocos2d-x源码中的一个BUG
- mysql中的自增功能bug!!
- 那些年我阅读的著名源码中的BUG
- Mysql 正则表达式在中文支持中的BUG
- JSP中的分页技术源码(MYSQL数据库)
- Android源码bug集合
- MySQL源码分析(2):Mysql中的内存分配相关
- MySQL源码分析(2):Mysql中的内存分配相关
- dbus_get_version was not declared in this scope 移植dbus,Qt4.8.1源码中的bug:---- 续上
- 发现mysql系统bug
- mysql JDBC bug
- mysql的bug
- Oracle中NVARCHAR2与VARCHAR2的区别
- 微软2012暑期实习笔试题(附答案)
- hibernate Annotation(注解映射)测试一
- <s:property>的用法
- 通讯地址
- MySQL源码中的BUG
- usaco 4.2 Job Processing(贪心)
- ubuntu12.04 简易架设nfs服务器
- 3、Android音频系统分析--音频策略分析
- Java学习札记7:线程池与工作队列
- typedef的四个用途和两个陷阱
- nutz执行插入操作后,返回插入后的Id
- ucenter导入用户的sql语句
- (转)HBase Installation