Inception 是在 Mysql 源码基础的修改的,先罗列所有的不同

# 列出 Inception 的修改

  1. 下载 Inception: git clone https://github.com/hanchuanchuan/inception.git

    然后 checkout 原项目的版本 git checkout 86b0963411f4a7ef20b4a54ccc829ab3a98c54ca

  2. 下载对应版本的 mysql 源码(5.6.10)

  3. 下载安装 WinMerge

    ::: tip WinMerge 小技巧

    1. 编辑 -> 选项 -> 比较 -> 常规 中,选中忽略空行、忽略换行符差异
    2. 视图 -> 选择字体 选择合适的字体解决错乱问题 :::
  4. 比较 incept 和 mysql-5.6.10 两个文件夹,共 827 处不同

# 主要修改

主要的修改是对 sql 文件夹下源码的修改

# binlog.cc

去掉所有 binlog 写入和从上次 crashed binglog 处恢复的代码

# derror.h/derror.c

定义了所有可能的错误信息

SERVER_SETMSG(ER_ERROR_FIRST, "HelloWorld");
SERVER_SETMSG(ER_NOT_SUPPORTED_YET, "Not supported statement type.");
SERVER_SETMSG(ER_SQL_NO_SOURCE, "The sql have no source information.");
SERVER_SETMSG(ER_SQL_NO_OP_TYPE, "The sql have no operation type.");
SERVER_SETMSG(ER_SQL_INVALID_OP_TYPE, "Invalid sql operation type.");
SERVER_SETMSG(ER_PARSE_ERROR, "%s near \'%-.80s\' at line %d");
SERVER_SETMSG(ER_SYNTAX_ERROR, "You have an error in your SQL syntax, ");
SERVER_SETMSG(ER_REMOTE_EXE_ERROR, "Execute in source server failed.");
SERVER_SETMSG(ER_SHUTDOWN_COMPLETE, "Shutdown complete.");
SERVER_SETMSG(ER_WITH_INSERT_FIELD, "Set the field list for insert statements.");
SERVER_SETMSG(ER_WITH_INSERT_VALUES, "Set the values list for insert statements.");
SERVER_SETMSG(ER_WRONG_VALUE_COUNT_ON_ROW, "Column count doesn\'t match value count at row %ld.");
SERVER_SETMSG(ER_BAD_FIELD_ERROR, "Unknown column \'%-.192s\' in \'%-.192s\'.");
SERVER_SETMSG(ER_FIELD_SPECIFIED_TWICE, "Column \'%-.192s\' specified twice in table \'%-.192s\'.");
SERVER_SETMSG(ER_BAD_NULL_ERROR, "Column \'%-.192s\' cannot be null in %d row.");
SERVER_SETMSG(ER_NO_WHERE_CONDITION, "set the where condition for select statement.");
SERVER_SETMSG(ER_NORMAL_SHUTDOWN, "%s: Normal shutdown\n");
SERVER_SETMSG(ER_FORCING_CLOSE, "%s: Forcing close of thread %ld  user: \'%-.48s\'\n");
SERVER_SETMSG(ER_CON_COUNT_ERROR, "Too many connections");
SERVER_SETMSG(ER_INVALID_COMMAND, "Invalid command.");
SERVER_SETMSG(ER_SQL_INVALID_SOURCE, "Invalid source infomation.");
SERVER_SETMSG(ER_WRONG_DB_NAME, "Incorrect database name \'%-.100s\'.");
SERVER_SETMSG(EXIT_UNKNOWN_VARIABLE, "Exist incorrect variable.");
SERVER_SETMSG(EXIT_UNKNOWN_OPTION, "Exist incorrect option.");
SERVER_SETMSG(ER_NO_DB_ERROR, "No database selected.");
SERVER_SETMSG(ER_WITH_LIMIT_CONDITION, "Limit is not allowed in update/delete statement.");
SERVER_SETMSG(ER_WITH_ORDERBY_CONDITION, "Order by is not allowed in update/delete statement.");
SERVER_SETMSG(ER_SELECT_ONLY_STAR, "Select only star is not allowed.");
SERVER_SETMSG(ER_ORDERY_BY_RAND, "Order by rand is not allowed in select statement.");
SERVER_SETMSG(ER_ID_IS_UPER, "Identifier is not allowed to been upper-case.");
SERVER_SETMSG(ER_UNKNOWN_COLLATION, "Unknown collation: \'%-.64s\'.");
SERVER_SETMSG(ER_INVALID_DATA_TYPE, "Not supported data type on field: \'%-.64s\'.");
SERVER_SETMSG(ER_NOT_ALLOWED_NULLABLE, "Column \'%-.64s\' in table \'%-.64s\' is not allowed to been nullable.");
SERVER_SETMSG(ER_DUP_FIELDNAME, "Duplicate column name \'%-.192s\'.");
SERVER_SETMSG(ER_WRONG_COLUMN_NAME, "Incorrect column name \'%-.100s\'.");
SERVER_SETMSG(ER_WRONG_AUTO_KEY, "Incorrect table definition; there can be only one auto column and it must be defined as a key.");
SERVER_SETMSG(ER_TABLE_CANT_HANDLE_AUTO_INCREMENT, "The used table type doesn\'t support AUTO_INCREMENT columns.");
SERVER_SETMSG(ER_FOREIGN_KEY, "Foreign key is not allowed in table \'%-.64s\'.");
SERVER_SETMSG(ER_TOO_MANY_KEY_PARTS, "Too many key parts in Key \'%-.64s\' in table \'%-.64s\' specified, max %d parts allowed.");
SERVER_SETMSG(ER_TOO_LONG_IDENT, "Identifier name \'%-.100s\' is too long.");
SERVER_SETMSG(ER_UDPATE_TOO_MUCH_ROWS, "Update rows more then %d.");
SERVER_SETMSG(ER_WRONG_NAME_FOR_INDEX, "Incorrect index name \'%-.100s\' in table \'%-.64s\'.");
SERVER_SETMSG(ER_TOO_MANY_KEYS, "Too many keys specified in table \'%-.64s\', max %d keys allowed.");
SERVER_SETMSG(ER_NOT_SUPPORTED_KEY_TYPE, "Not supported key type: \'%-.64s\'.");
SERVER_SETMSG(ER_WRONG_SUB_KEY, "Incorrect prefix key; the used key part isn\'t a string, the used length is longer than the key part, orthe storage engine doesn\'t support unique prefix keys");
SERVER_SETMSG(ER_WRONG_KEY_COLUMN, "The used storage engine can\'t index column \'%-.192s\'.");
SERVER_SETMSG(ER_TOO_LONG_KEY, "Specified key \'%-.64s\' was too long; max key length is %d bytes.");
SERVER_SETMSG(ER_MULTIPLE_PRI_KEY, "Multiple primary key defined.");
SERVER_SETMSG(ER_DUP_KEYNAME, "Duplicate key name \'%-.192s\'.");
SERVER_SETMSG(ER_TOO_LONG_INDEX_COMMENT, "Comment for index \'%-.64s\' is too long (max = %lu).");
SERVER_SETMSG(ER_DUP_INDEX, "Duplicate index \'%-.64s\' defined on the table \'%-.64s.%-.64s\'.");
SERVER_SETMSG(ER_TEMP_TABLE_TMP_PREFIX, "Set \'tmp\' prefix for temporary table.");
SERVER_SETMSG(ER_TABLE_MUST_INNODB, "Set engine to innodb for table \'%-.64s\'.");
SERVER_SETMSG(ER_TABLE_CHARSET_MUST_UTF8, "Set charset to one of \'%-.192s\' for table \'%-.64s\'.");
SERVER_SETMSG(ER_NAMES_MUST_UTF8, "Set charset to one of \'%-.192s\'.");
SERVER_SETMSG(ER_TABLE_MUST_HAVE_COMMENT, "Set comments for table \'%-.192s\'.");
SERVER_SETMSG(ER_COLUMN_HAVE_NO_COMMENT, "Column \'%-.64s\' in table \'%-.64s\' have no comments.");
SERVER_SETMSG(ER_TABLE_MUST_HAVE_PK, "Set a primary key for table \'%-.64s\'.");
SERVER_SETMSG(ER_PARTITION_NOT_ALLOWED, "Partition is not allowed in table.");
SERVER_SETMSG(ER_USE_ENUM, "Type enum is used in column.");
SERVER_SETMSG(ER_USE_TEXT_OR_BLOB, "Type blob/text is used in column \'%-.192s\'.");
SERVER_SETMSG(ER_COLUMN_EXISTED, "Column \'%-.64s\' have existed.");
SERVER_SETMSG(ER_COLUMN_NOT_EXISTED, "Column \'%-.64s\' not existed.");
SERVER_SETMSG(ER_CANT_DROP_FIELD_OR_KEY, "Can\'t DROP \'%-.192s\'; check that column/key exists.");
SERVER_SETMSG(ER_INVALID_DEFAULT, "Invalid default value for column \'%-.192s\'.");
SERVER_SETMSG(ER_USERNAME, "user name");
SERVER_SETMSG(ER_HOSTNAME, "host name");
SERVER_SETMSG(ER_NOT_VALID_PASSWORD, "Your password does not satisfy the current policy requirements.");
SERVER_SETMSG(ER_WRONG_STRING_LENGTH, "String \'%-.70s\' is too long for %s (should be no longer than %d).");
SERVER_SETMSG(ER_BLOB_USED_AS_KEY, "BLOB column \'%-.192s\' can\'t be used in key specification with the used table type.");
SERVER_SETMSG(ER_TOO_LONG_BAKDB_NAME, "The backup dbname \'%-s-%d-%s\' is too long.");
SERVER_SETMSG(ER_INVALID_BACKUP_HOST_INFO, "Invalid remote backup information.");
SERVER_SETMSG(ER_BINLOG_CORRUPTED, "Binlog is corrupted.");
SERVER_SETMSG(ER_NET_READ_ERROR, "Got an error reading communication packets.");
SERVER_SETMSG(ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE, "Replication event checksum verification failed while reading from network.");
SERVER_SETMSG(ER_SLAVE_RELAY_LOG_WRITE_FAILURE, "Relay log write failure: %s.");
SERVER_SETMSG(ER_INCORRECT_GLOBAL_LOCAL_VAR, "Variable \'%-.192s\' is a %s variable.");
SERVER_SETMSG(ER_START_AS_BEGIN, "Must start as begin statement.");
SERVER_SETMSG(ER_OUTOFMEMORY, "Out of memory; restart server and try again (needed %d bytes).");
SERVER_SETMSG(ER_HAVE_BEGIN, "Have you begin twice? Or you didn't commit last time, if so, you can execute commit explicitly.");
SERVER_SETMSG(ER_NET_READ_INTERRUPTED, "Got timeout reading communication packets.");
SERVER_SETMSG(ER_BINLOG_FORMAT_STATEMENT, "The binlog_format is statement, backup is disabled.");
SERVER_SETMSG(EXIT_NO_ARGUMENT_ALLOWED, "Not allow set argument.");
SERVER_SETMSG(EXIT_ARGUMENT_REQUIRED, "Require argument.");
SERVER_SETMSG(EXIT_AMBIGUOUS_OPTION, "Ambiguous argument.");
SERVER_SETMSG(ER_ERROR_EXIST_BEFORE, "Exist error at before statement.");
SERVER_SETMSG(ER_UNKNOWN_SYSTEM_VARIABLE, "Unknown system variable \'%-.64s\'.");
SERVER_SETMSG(ER_UNKNOWN_CHARACTER_SET, "Unknown character set: \'%-.64s\'.");
SERVER_SETMSG(ER_END_WITH_COMMIT, "Must end with commit.");
SERVER_SETMSG(ER_DB_NOT_EXISTED_ERROR, "Selected Database \'%-.64s\' not existed.");
SERVER_SETMSG(ER_TABLE_EXISTS_ERROR, "Table \'%-.192s\' already exists.");
SERVER_SETMSG(ER_INDEX_NAME_IDX_PREFIX, "Index \'%-.192s\' in table \'%-.64s\' need \'idx_\' prefix.");
SERVER_SETMSG(ER_INDEX_NAME_UNIQ_PREFIX, "Index \'%-.192s\' in table \'%-.64s\' need \'uniq_\' prefix.");
SERVER_SETMSG(ER_AUTOINC_UNSIGNED, "Set unsigned attribute on auto increment column in table \'%-.64s\'.");
SERVER_SETMSG(ER_VARCHAR_TO_TEXT_LEN, "Set column \'%-.192s\' to TEXT type.");
SERVER_SETMSG(ER_CHAR_TO_VARCHAR_LEN, "Set column \'%-.192s\' to VARCHAR type.");
SERVER_SETMSG(ER_KEY_COLUMN_DOES_NOT_EXITS, "Key column \'%-.192s\' doesn\'t exist in table.");
SERVER_SETMSG(ER_INC_INIT_ERR, "Set auto-increment initialize value to 1.");
SERVER_SETMSG(ER_WRONG_ARGUMENTS, "Incorrect arguments to %s.");
SERVER_SETMSG(ER_SET_DATA_TYPE_INT_BIGINT, "Set auto-increment data type to int or bigint.");
SERVER_SETMSG(ER_TIMESTAMP_DEFAULT, "Set default value for timestamp column \'%-.64s\'.");
SERVER_SETMSG(ER_CHARSET_ON_COLUMN, "Cannot set charset on column \'%-.64s\' in table \'%-.64s\'.");
SERVER_SETMSG(ER_AUTO_INCR_ID_WARNING, "Auto increment column \'%-.64s\' is meaningful? it's dangerous!");
SERVER_SETMSG(ER_ALTER_TABLE_ONCE, "Merge the alter statement for table \'%-.64s\' to ONE.");
SERVER_SETMSG(ER_BLOB_CANT_HAVE_DEFAULT, "BLOB/TEXT column \'%-.192s\' can\'t have a default value.");
SERVER_SETMSG(ER_END_WITH_SEMICOLON, "Add \';\' after the last sql statement.");
SERVER_SETMSG(ER_NON_UNIQ_ERROR, "Column \'%-.192s\' in %-.192s is ambiguous.");
SERVER_SETMSG(ER_TABLE_NOT_EXISTED_ERROR, "Table \'%-.192s\' doesn't exist.");
SERVER_SETMSG(ER_UNKNOWN_TABLE, "Unknown table \'%-.192s\' in %-.32s.");
SERVER_SETMSG(ER_INVALID_GROUP_FUNC_USE, "Invalid use of group function.");
SERVER_SETMSG(ER_INDEX_USE_ALTER_TABLE, "Use Alter table statement to create index instead.");
SERVER_SETMSG(ER_WITH_DEFAULT_ADD_COLUMN, "Set Default value for column \'%-.192s\' in table \'%-.192s\'");
SERVER_SETMSG(ER_TRUNCATED_WRONG_VALUE, "Truncated incorrect %-.32s value: \'%-.128s\'");
SERVER_SETMSG(ER_TEXT_NOT_NULLABLE_ERROR, "TEXT/BLOB Column \'%-.64s\' in table \'%-.64s\' can't  been not null.");
SERVER_SETMSG(ER_WRONG_VALUE_FOR_VAR, "Variable \'%-.64s\' can\'t be set to the value of \'%-.200s\'");
SERVER_SETMSG(ER_TOO_MUCH_AUTO_TIMESTAMP_COLS, "Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMPin DEFAULT or ON UPDATE clause");
SERVER_SETMSG(ER_INVALID_ON_UPDATE, "Invalid ON UPDATE clause for \'%-.192s\' column");
SERVER_SETMSG(ER_DDL_DML_COEXIST, "DDL can not coexist with the DML for table \'%-.192s\'.");
SERVER_SETMSG(ER_SLAVE_CORRUPT_EVENT, "Corrupted replication event was detected.");
SERVER_SETMSG(ER_COLLATION_CHARSET_MISMATCH, "COLLATION \'%s\' is not valid for CHARACTER SET \'%s\'");
SERVER_SETMSG(ER_NOT_SUPPORTED_ALTER_OPTION, "Not supported statement of alter option");
SERVER_SETMSG(ER_CONFLICTING_DECLARATIONS, "Conflicting declarations: \'%s%s\' and \'%s%s\'");
SERVER_SETMSG(ER_IDENT_USE_KEYWORD, "Identifier \'%s\' is keyword in MySQL.");
SERVER_SETMSG(ER_VIEW_SELECT_CLAUSE, "View\'s SELECT contains a \'%s\' clause");
SERVER_SETMSG(ER_OSC_KILL_FAILED, "Can not find OSC executing task");
SERVER_SETMSG(ER_NET_PACKETS_OUT_OF_ORDER, "Got packets out of order");
SERVER_SETMSG(ER_NOT_SUPPORTED_ITEM_TYPE, "Not supported expression type \'%s\'.");
SERVER_SETMSG(ER_INVALID_IDENT, "Identifier \'%s\' is invalid, valid options: [a-z|A-Z|0-9|_].");
SERVER_SETMSG(ER_INCEPTION_EMPTY_QUERY, "Inception error, Query was empty.");
SERVER_SETMSG(ER_PK_COLS_NOT_INT, "Primary key column \'%s\' is not int or bigint type in table \'%s\'.\'%s\'.");
SERVER_SETMSG(ER_PK_TOO_MANY_PARTS, "Too many primary key part in table \'%s\'.\'%s\', max parts: %d");
SERVER_SETMSG(ER_REMOVED_SPACES, "Leading spaces are removed from name \'%s\'");
SERVER_SETMSG(ER_ERROR_LAST, "TheLastError,ByeBye");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

# event_data_objects.cc

去掉权限检查

# event_db_repository.cc

注释掉 close_acl_tables 的调用,因为会提交事务

# events.cc

  1. 去掉权限检查
  2. 去掉 binlog 写入
  3. 去掉 event 机制调用
  4. 去掉 db 分析后的赋值

# field.h

  1. db_low_byte_first 一律置为 false
  2. 加上了 table 和 field 的判空
  3. varchar 字段计数器 share.varchar_fields++ 被注释掉了

# field.cc

  1. 去掉了空间数据支持(HAVE_SPATIAL)
  2. 忽略 MODE_PAD_CHAR_TO_FULL_LENGTH 带来的影响
  3. 忽略副本,相关宏为 HAVE_REPLICATION
  4. 注释掉 blob 计数器 share.blob_fields++
  5. 枚举类型的值由字符串替换为了对应的整型 id
  6. 忽略了是否是 TM_BIT_LEN_EXACT_F,这意思是实际 bit 是用 byte 实现的吗?
  7. 继续忽略 charset
  8. 去掉默认值的判断及响应的警告
  9. 更改 calc_pack_length 的计算,对于 MYSQL_TYPE_SET,MYSQL_TYPE_ENUM,MYSQL_TYPE_NEWDECIMAL 类型计算长度,不再 abort
  10. 强制类型转换为 MEM_ROOT

# filesort.cc

  1. 移除 check_if_pq_applicable,禁止检查优先队列应用
  2. 移除 trace_filesort_information,禁止文件排序
  3. 禁用所有 trace 功能
  4. 注释掉了 select->cleanup();,原因不明

# gen_lex_hash.cc

  1. get_hash_symbol 被改为非 static 的了,原因不晓得

# handler.cc

  1. 注释掉用于动态加载插件的 RUN_HOOK
  2. 去掉空间数据存储
  3. 去掉事务提交回滚
  4. 去掉索索 ha、xa 等相关代码
  5. 禁止自增列自增
  6. 去掉 cache 操作
  7. 去掉所有 binlog 操作
  8. 去掉所有写锁相关内容
  9. 去掉所有 event 机制相关操作

# hostname.cc

  1. 不打印 IP 的 hostname 解析失败的错误

# item.h

  1. 添加 field 不为 NULL 的判断

# item.cc

  1. 去掉锁的初始化
  2. table 和 field 判空
  3. 取消长数据的处理
  4. 修改 fix_fields 解决 table 中的 column 定位
  5. 去掉子表的权限检查

# item_cmpfunc.cc

  1. fix_length_and_dec 函数被截断了,直接返回
  2. field 判空
  3. 去掉常量检查时所有都是常量时的优化行为

# item_create.cc

  1. 去掉空间数据代码及其对应的函数
  2. 取消 udf 加载
  3. 压缩函数什么都不干
  4. 解压缩函数也什么都不干

# item_func.cc

  1. 在 field 在函数中位置定位中添加 ER_NOT_SUPPORTED_ITEM_TYPE 错误识别
  2. 去掉密码检查
  3. 添加无 table、field 信息时 result 类型的预测
  4. 去掉 udf
  5. 去掉副本操作
  6. 去掉锁的相关操作
  7. 去掉 binlog 操作
  8. 去掉子表权限检查

# item_strfunc.h/item_strfunc.cc

  1. calculate_password 改为非 static 方法
  2. 去掉密码检查
  3. 去掉加密
  4. 去掉安全文件路径检查

# item_subselect.h/item_subselect.cc

  1. 去掉 join 优化
  2. 去掉 union 优化
  3. change_result

# item_sum.cc

# lex.h

# lock.cc

# log.cc

# log_event.h/log_event.cc

# log_event_old.cc

# mf_iocache.cc

# my_default.cc

# my_getopt.cc

# mysqld.h/mysqld.cc

# net_serv.cc

# opt_range.h/opt_range.cc

# opt_trace.h

# opt_trace2server.cc

# partition_info.cc

# protocol.cc

# ptosc.h/ptosc.cc

# rpl_gtid_execution.cc

# rpl_gtid_mutex_cond_array.cc

# rpl_gtid_state.cc

# rpl_info_factory.h/rpl_info_factory.cc

# rpl_injector.cc

# rpl_master.cc

# rpl_mi.h/rpl_mi.cc

# rpl_rli.h/rpl_rli.cc

# rpl_rli_pdb.cc

# rpl_slave.h/rpl_slave.cc

# rpl_utility.h/rpl_utility.cc

# set_var.h/set_var.cc

# signal_handler.cc

# sp.cc

# sp_head.cc

# sp_instr.cc

# sp_rcontext.cc

# sql_acl.h/sql_acl.cc

# sql_admin.cc

# sql_alter.h/sql_aler.cc

# sql_analyse.cc

# sql_audit.h

# sql_base.h/sql_base.cc

# sql_builtin.cc.in

# sql_cache.cc

# sql_class.h/sql_class.cc

# sql_cmd.h

# sql_connect.cc

# sql_const.h

# sql_cursor.cc

# sql_db.cc

# sql_delete.cc

# sql_derived.cc

# sql_do.cc

# sql_error.h

# sql_executor.cc

# sql_handler.cc

# sql_help.cc

# sql_insert.cc

# sql_lex.h/sql_lex.cc

# sql_load.c

# sql_parser.h/sql_parser.cc

# sql_partition.cc

# sql_partition_admin.cc

# sql_planner.cc

# sql_plugin.cc

# sql_prepare.cc

# sql_profile.cc

# sql_reload.cc

# sql_rename.cc

# sql_resolver.cc

# sql_rewrite.cc

# sql_select.h/sql_select.cc

# sql_servers.h

# sql_show.h/sql_show.cc

# sql_string.h

# sql_table.cc

# sql_tmp_table.h/sql_tmp_table.cc

# sql_trigger.cc

# sql_truncate.cc

# sql_union.cc

# sql_update.cc

# sql_view.cc

# sql_yacc.yy

# sys_vars.h/sys_vars.cc

# table.h/table.cc

# table_cache.cc

# transcation.cc

# unireg.h/unireg.cc

# 其他修改

# client

  1. CMAKELists.txt
  2. mysql.cc
    • 注释掉所有共享内存相关的代码(宏 HAVE_SMEM)
    • embedded_server_groups 定义由 { "server", "embedded", "mysql_SERVER", 0 } 改为 { "inception", 0 },应该是命令行子命令的修改
    • 注释掉打印 connection 信息的代码
  3. mysqlbinlog.cc
    • 去掉所有涉及 GTID 的地方

# cmake

  1. mysql_version.cmake
  2. ssl.cmake

# dbug

  1. dbug.c
    • my_bool _dbug_on_= FALSE inception 中关闭了 debug

# extra

  1. inception 中基本清空了这个目录,不需要各种扩展

# include

  1. CMakeLists.txt
  2. inception
    • 实现了 my_default_priv.h,定义了宏 MY_DEFAULT_PRIV_INCLUDED
  3. myglobal.h
    • 取消了宏 HAVE_PSI_INTERFACE 的定义,PSI 是指 performance schema interface
  4. mylist.h
    • 定义了 LIST_BASE_NODE_T,一个结构体,包含数量、起止节点
    • 定义了 LIST_NODE_T,结构体,双向链表节点,但是没有值
    • 定义了 LIST_INIT,链表初始化
    • 定义了 LIST_ADD_FIRST,在链表开头添加节点
    • 定义了 LIST_ADD_LAST,在链表结尾添加节点
    • 定义了 LIST_DATA_APPEND,在链表结尾添加值
    • 定义了 LIST_DATA_FLAG_APPEND,在链表结尾添加值,有更多的属性
    • 定义了 LIST_DATA_ADD_FIRST,在链表开头添加值
    • 定义了 LIST_INSERT_BEFORE
    • 定义了 LIST_INSERT_AFTER
    • 定义了 LIST_REMOVE,移除节点
    • 定义了 LIST_GET_NEXT
    • 定义了 LIST_GET_PREV
    • 定义了 LIST_GET_LEN
    • 定义了 LIST_GET_FIRST
    • 定义了 LIST_GET_LAST
    • 定义了结构体 struct lst_node_struct,重命名为 lst_node_t
    • 定义了 my_lst_t 为 LIST_BASE_NODE_T(lst_node_t)
  5. mysql.h.pp
    • 添加了定义 lst_node_t,my_lst_t,重复定义了
  6. mysqld.ername.h
    • 这个文件是自动生成的,记录了错误码和错误提醒
  7. mysqld.error.h
    • define 定义的错误码
  8. mysys_err.h
    • 注释掉了部分退出状态码
  9. sql_state.h
    • 看着也是异常错误码

# libmysql

  1. CMakeLists.txt

# libmysqld

  1. CMakeLists.txt

# mysys

  1. CMakeLists.txt
  2. charset.c
    • get_charsets_dir 函数无效化,但是不知道为什么这么做
  3. my_compress.c
    • 去掉 my_compress 的实际功能
    • my_compress_alloc 注释掉
    • 去掉 my_uncompress 的实际功能

# mysys_ssl

  1. CMakeLists.txt
  2. my_getopt.cc 被删掉了,应该不用考虑

# scripts

  1. CMakeLists.txt
  2. fill_help_tables.sql 被删掉了,这应该是 mysql.help_* 表数据的初始化脚本,不知有什么影响

# sql-common

  1. client.c
    • 注释掉 shared_memory_base_name
    • 注释掉 slave_io_thread_detach_vio,防止启用 slave
    • 注释掉 HAVE_OPENSSL 宏定义时的代码
    • 在 mysql_select_db 中添加了 db == NULL 时的判断,强制终止
  2. client_plugin.c
    • 去掉 plugin 的加载代码

# unittest

  1. CMakeLists.txt

# vio

  1. vio.c
    • 注释掉 HAVE_OPENSSL 宏定义时的代码