MySQL:如何编写daemon plugin(6)

来源:未知 责任编辑:责任编辑 发表时间:2013-12-22 14:56 点击:

 ((struct st_mysql_sys_var *)&(MYSQL_SYSVAR_NAME(name)))

 

那么MYSQL_SYSVAR(my_var)被转换为:

((struct st_mysql_sys_var *)mysql_sysvar_my_var

 

因此,在这之前,我们首先要先创建好结构体。针对不同的数据类型,提供了许多宏来创建,分为两种:一种以MYSQL_SYSVAR开头的全局变量(可以set global),另外一种是MYSQL_THDVAR开头的session变量

 

 

 

MYSQL_SYSVAR_BOOL(name, varname, opt, comment, check, update, def)

char

MYSQL_SYSVAR_STR(name, varname, opt, comment, check, update, def)

char*

MYSQL_SYSVAR_INT(name, varname, opt, comment, check, update, def, min, max, blk)

int

MYSQL_SYSVAR_UINT(name, varname, opt, comment, check, update, def, min, max, blk)

unsigned int

MYSQL_SYSVAR_LONG(name, varname, opt, comment, check, update, def, min, max, blk)

long

MYSQL_SYSVAR_ULONG(name, varname, opt, comment, check, update, def, min, max, blk)

unsigned long

MYSQL_SYSVAR_LONGLONG(name, varname, opt, comment, check, update, def, min, max, blk)

long long

MYSQL_SYSVAR_ULONGLONG(name, varname, opt, comment, check, update, def, min, max, blk)

unsigned long long

MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib)

unsigned long

MYSQL_SYSVAR_SET(name, varname, opt, comment, check, update, def, typelib)

unsigned long long

以下是session变量定义宏

MYSQL_THDVAR_BOOL(name, opt, comment, check, update, def)

char

MYSQL_THDVAR_STR(name, opt, comment, check, update, def)

char*

MYSQL_THDVAR_INT(name, opt, comment, check, update, def, min, max, blk)

int

MYSQL_THDVAR_UINT(name, opt, comment, check, update, def, min, max, blk)

unsigned int

MYSQL_THDVAR_LONG(name, opt, comment, check, update, def, min, max, blk)

long

MYSQL_THDVAR_ULONG(name, opt, comment, check, update, def, min, max, blk)

unsigned long

MYSQL_THDVAR_LONGLONG(name, opt, comment, check, update, def, min, max, blk)

long long

MYSQL_THDVAR_ULONGLONG(name, opt, comment, check, update, def, min, max, blk)

unsigned long long

MYSQL_THDVAR_ENUM(name, opt, comment, check, update, def, typelib)

unsigned long

MYSQL_THDVAR_SET(name, opt, comment, check, update, def, typelib)

unsigned long long

发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
用户名: 验证码:点击我更换图片
最新评论 更多>>

推荐热点

  • mysql-mmm
  • mysqldump命令——MySQL数据库备份还原
  • Oracle数据导入MySQL的快捷工具:MySQL Migration Toolkit
  • 简简单单储存过程——循环一个select结果集
  • MySQL数据库十大优化技巧
  • Mysql安装笔记
  • Mysql主主复制架构配置
  • Mysql的Procedure 参数为NULL问题分析
  • MySQL Stmt预处理提高效率问题的小研究
网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
Copyright © 2008-2015 计算机技术学习交流网. 版权所有

豫ICP备11007008号-1