From: Sergei Golubchik Date: July 7 2009 9:32pm Subject: Re: Not entering the loop - per query variables List-Archive: http://lists.mysql.com/internals/37109 Message-Id: <20090707213204.GA24983@janus.mylan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, Joseph! On Jul 07, Joseph Lukas wrote: > I am having an issues getting through my loop for the List. > > int sql_statement_set(THD *thd, List *var_list){ > > List_iterator_fast it(*var_list); > DBUG_ENTER("sql_set_variables"); > int count = 0; > set_var_base *var; > while ((var=it++)) > { > count++; > printf("I looped"); > } > printf("The number of objects is: %d \n",count); > return 0; if you use DBUG_ENTER() you need to use DBUG_RETURN (or DBUG_VOID_RETURN) - these always should be paired. > } > > Is my current structure of my function. The main issue seems to be that I > am not even entering the loop at all it seems. I just get "The number of > objects is: 0" I used as a template the suggested function > sql_set_variables(). Still I do not see on my test launch why I will not > enter the loop. The parser debug output shows it went successfully > through the parse and yet nothing. Hm. Can I see the code ? Can you send me a patch against your lp:~jlukas79/+junk/mysql-server ? Or you can push it there and I'll pull, as you like. Regards / Mit vielen Grüßen, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik / /|_/ / // /\ \/ /_/ / /__ 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