From: Joseph Lukas Date: July 20 2009 5:10pm Subject: Re: GSoC Week 11 - July 13 - July 19 | per query variable settings List-Archive: http://lists.mysql.com/soc/417 Message-Id: <53a36cdd0907201010s694b6ba4t6abc6a84aa653511@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am sorry in my second posting I noted I may have found a way and on some of my errors. =A0I may have a way to accomplish it successfully if I am unable to do so I will be contacting you to solve the issue. =A0I will now later this week if it works at all. =A0I looked at the other methods on how to set up the set_var and should be ok in doing it for myself. =A0I am 70% confident I can do it and would like to try first. Plus I don't have 2 hours to explain all the details in typing due to some of the sizes and flipping between files for the examples I found that may help. Joe On Mon, Jul 20, 2009 at 12:59 PM, Sergei Golubchik wrote: > Hi, Joseph! > > 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. =A0I also >> removed the additional system_variables struct from the THD. =A0 Not muc= h >> actual code work as looking into more of the structures that make up >> set_var. =A0It looks like the main part is the public variable value ins= ide >> 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 t= ype >> String stored inside of str_value. =A0So far I assume this is where the = value >> is stored and is converted to the proper type later. =A0The idea is now = that > > Not really. > 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 > > =A0 =A0var->save_result.ulonglong_value=3D (ulonglong) var->value->val_in= t(); > > 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 =A0var->value->str_v= alue >> since so far I do not see where the value is stored elsewhere inside of >> set_var class. =A0If I am wrong please inform me where the value is stor= ed >> 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. =A0I 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 > ::check()/::update() ? > >> I may have found it but I am not too sure as printing values stored >> inside of the structures is a pain. =A0I 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. =A0This 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. =A0That is on hold since I need to get past my current iss= ue >> before looking at the other. > > ok, let's do "normal" server variables first. > > Regards / Mit vielen Gr=FC=DFen, > Sergei > > -- > =A0 __ =A0___ =A0 =A0 ___ ____ =A0__ > =A0/ =A0|/ =A0/_ __/ __/ __ \/ / =A0 Sergei Golubchik > =A0/ /|_/ / // /\ \/ /_/ / /__ =A0Principal Software Engineer/Server Arch= itect > /_/ =A0/_/\_, /___/\___\_\___/ =A0Sun Microsystems GmbH, HRB M=FCnchen 16= 1028 > =A0 =A0 =A0 <___/ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Sonnenallee 1, 85551= Kirchheim-Heimstetten > Gesch=E4ftsf=FChrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel > Vorsitzender des Aufsichtsrates: Martin H=E4ring >