Hi Daniel, I am currently working on Json_server plugin. I already added few configuration variable which are dynamic. Recently I have added a variable "max_threads" (of integer type) and want to make it dynamic. So I tried the same way.
The problem I faced : context.registerVariable(new sys_var_uint32_t_ptr("max_thread",&max_threads,&updateMaxThreads)); context("max_thread", po::value<uint32_t>(&max_thread)->default_value(DEFAULT_MAX_THREADS), _("Maximum threads in use by json server")); The only match for this function is updateMaxThreads(Session *,* sql_var_t* ). bool updateMaxThreads(Session *, *set_var* var*) { if (not var->value->str_value.empty()) { *// Get new value given by user.* uint32_t new_max_threads= atoi(var->value->str_value.data()); * // creating the threads using the new value* if(server->createThreads(new_max_threads)) { max_threads=new_max_threads; return false; //success } errmsg_printf(error::ERROR, _("json_server_max_thread cannot be smaller than previous configured value")); return true;//error } errmsg_printf(error::ERROR, _("json_server_schema cannot be NULL")); return true; // error } How can I design same function with sql_var_t as argument.? I already chech sys_var.h , there is no function which can be use in this way. Thanks -- Mohit
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : drizzle-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp