On Jul 19, Joseph Lukas wrote:
> KEY ACCOMPLISHMENTS LAST WEEK
> Looking further into the set_var class structure as this will be key to
> triggering all the proper reset functions for the variables. I also
> removed the additional system_variables struct from the THD. Not much
> actual code work as looking into more of the structures that make up
> set_var. It looks like the main part is the public variable value inside
> set_var this is of type Item * which contains the values to be set.
> Currently though it appears that the value inside the Item class is of type
> String stored inside of str_value. So far I assume this is where the value
> is stored and is converted to the proper type later. The idea is now that
Check, for example, sys_max_prepared_stmt_count - it's
sys_var_long_ptr_global, sys_var_long_ptr_global::check() calls
get_unsigned(), which executes
var->save_result.ulonglong_value= (ulonglong) var->value->val_int();
this calculates the value of the 'Item *value' directly as an integer,
it's not stored as a string.
> I find the associated current value before the change takes place I have to
> convert it to a string and insert it into set_var's var->value->str_value
> since so far I do not see where the value is stored elsewhere inside of
> set_var class. If I am wrong please inform me where the value is stored
> inside set_var class.
No, you are not wrong. String values - for variables that store
strings - are currently taken from var->value->str_value
(incidentally, it's a bug, but let's assume this is how it should work :)
Numeric values are obtained by calling var->value->val_int()
(or ->val_real(), or val->decimal(), whatever appropriate).
> KEY TASKS THAT STALLED LAST WEEK
> Properly getting and resetting the variables to perform after update
> functions. I need to find where in set_var the value is stored.
Why do you need to find it ? Can you just call ::value_ptr() and
> I may have found it but I am not too sure as printing values stored
> inside of the structures is a pain. I am not used to performing print
> operations on structures not using the C++ standard library and it is
> frustrating. Many of the variable names I assume store what I think
> but they are not very descriptive always in the code so I am only
> making guesses.
Want to chat on irc ?
You could quickly get answers to your questions this way.
You can find me on freenet, #mysql-dev channel.
> KEY GOOD VIBRATIONS
> None so far as I am back in the hole of getting the current setting
> before changing it and putting it in the set_var structure to use the
> update functions at the end to reset the variables to previous
> settings. This is my biggest roadblock and it has not gone well for
> the past few weeks.
let's try to solve it together on irc
> KEY CONCERNS
> I did not even know of the future plugin settings that are going to have to
> be looked at. That is on hold since I need to get past my current issue
> before looking at the other.
ok, let's do "normal" server variables first.
Regards / Mit vielen Grüßen,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring