~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-proposed

« back to all changes in this revision

Viewing changes to storage/example/ha_example.cc

  • Committer: Package Import Robot
  • Author(s): Dave Chiluk, Eduardo Damato
  • Date: 2014-01-09 09:44:14 UTC
  • mfrom: (18.1.5 precise-security)
  • Revision ID: package-import@ubuntu.com-20140109094414-ght3gi7yvzsyvhm5
Tags: 5.5.34-0ubuntu0.12.04.2
[ Eduardo Damato ]
Fix upstart script to account for datadir disk shortage (LP: #1121874) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1004
1004
 
1005
1005
static ulong srv_enum_var= 0;
1006
1006
static ulong srv_ulong_var= 0;
 
1007
static double srv_double_var= 0;
1007
1008
 
1008
1009
const char *enum_var_names[]=
1009
1010
{
1038
1039
  1000,
1039
1040
  0);
1040
1041
 
 
1042
static MYSQL_SYSVAR_DOUBLE(
 
1043
  double_var,
 
1044
  srv_double_var,
 
1045
  PLUGIN_VAR_RQCMDARG,
 
1046
  "0.500000..1000.500000",
 
1047
  NULL,
 
1048
  NULL,
 
1049
  8.5,
 
1050
  0.5,
 
1051
  1000.5,
 
1052
  0);                             // reserved always 0
 
1053
 
 
1054
static MYSQL_THDVAR_DOUBLE(
 
1055
  double_thdvar,
 
1056
  PLUGIN_VAR_RQCMDARG,
 
1057
  "0.500000..1000.500000",
 
1058
  NULL,
 
1059
  NULL,
 
1060
  8.5,
 
1061
  0.5,
 
1062
  1000.5,
 
1063
  0);
 
1064
 
1041
1065
static struct st_mysql_sys_var* example_system_variables[]= {
1042
1066
  MYSQL_SYSVAR(enum_var),
1043
1067
  MYSQL_SYSVAR(ulong_var),
 
1068
  MYSQL_SYSVAR(double_var),
 
1069
  MYSQL_SYSVAR(double_thdvar),
1044
1070
  NULL
1045
1071
};
1046
1072
 
1051
1077
  var->type= SHOW_CHAR;
1052
1078
  var->value= buf; // it's of SHOW_VAR_FUNC_BUFF_SIZE bytes
1053
1079
  my_snprintf(buf, SHOW_VAR_FUNC_BUFF_SIZE,
1054
 
              "enum_var is %lu, ulong_var is %lu, %.6b", // %b is MySQL extension
1055
 
              srv_enum_var, srv_ulong_var, "really");
 
1080
              "enum_var is %lu, ulong_var is %lu, "
 
1081
              "double_var is %f, %.6b", // %b is a MySQL extension
 
1082
              srv_enum_var, srv_ulong_var, srv_double_var, "really");
1056
1083
  return 0;
1057
1084
}
1058
1085