List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:July 7 2009 9:32pm
Subject:Re: Not entering the loop - per query variables
View as plain text  
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<set_var_base> *var_list){
>
> 	  List_iterator_fast<set_var_base> 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 <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
Thread
Not entering the loop - per query variablesJoseph Lukas7 Jul
  • Re: Not entering the loop - per query variablesSergei Golubchik7 Jul
    • Re: Not entering the loop - per query variablesJoerg Bruehe8 Jul
      • Re: Not entering the loop - per query variablesTor Didriksen8 Jul