Ah ha.

I think you are missing a function.  All updates and write go through this:

int send_update(char *command)

{

    sigset_t set;

 

    if (sigemptyset(&set)<0)

    perror("sigempyset");

    sigaddset(&set, SIGUSR1);

    sigaddset(&set, SIGIO);

    sigaddset(&set, SIGALRM);

    sigaddset(&set, SIGUSR2);

    sigaddset(&set, SIGINT);

    sigaddset(&set, SIGQUIT);

    sigaddset(&set, SIGHUP);

    sigaddset(&set, SIGTERM);

    sigaddset(&set, SIGABRT);

    my_assert(command);

   if(sigprocmask(SIG_BLOCK,&set,NULL)<0)

      perror("sigprocmask");

     if (mysql_query(mybbs, command)){

      /* deal with the error somehow */
      }

      if (sigprocmask(SIG_UNBLOCK,&set, NULL)<0)

      perror("sigprocmask");

      return(mysql_affected_rows(mybbs));

}                        

>-----Original Message-----
>From: Tom Whiting [mailto:[EMAIL PROTECTED]
>Sent: Monday, June 10, 2002 3:29 PM
>To: 'Chad Simmons'
>Cc: [email protected]
>Subject: RE: Advanced (kinda): Mysql & connection problems
>
>
>Would this be the same for update as well?
>What you're saying DOES make sense, and it would probably explain why
>the game is inserting the field, throwing it into crash_copyover.
>
>+----------------------------------------------------+
>+   TJW: Head Tech, designer: Dreamless Realms Mud   +
>+   Mud : http://drealms.kyndig.com                         +
>+   Telnet: drealms.kyndig.com port 9275                    +
>+   OLC Docs: http://olc.kyndig.com                       +
>+----------------------------------------------------+
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chad
>Simmons
>Sent: Monday, June 10, 2002 2:21 PM
>To: [EMAIL PROTECTED]
>Cc: [email protected]
>Subject: RE: Advanced (kinda): Mysql & connection problems
>
>
>--- Tom Whiting <[EMAIL PROTECTED]> wrote:
>> >Breakpoint 2, send_query (command=0xbfff81e0 "SELECT * from stats
>WHERE
>> >uname = 'Xantha' ")
>> ><<from here it's all downhill.. crash_copyover called as it should
>be,
>> >game rebooted>>
>> No, this is the beginning of the crash_copyover code, where it's
>saving
>> the sql player stats. It starts going downhill here:
>> 
>> 87             if (!(db->result=mysql_store_result(&my_connection)))
>> 89              error_db(command, 2 );
>
>What would you logically expect the result of an insert 
>statement to be?
>For a
>select the result is the list of records returned, but an 
>insert doesn't
>give
>anything like that. I would say that inserting to the database most
>likely
>would return NULL from a mysql_store_result call, which then 
>causes your
>program to erroniously error out. You might want to make a different
>function
>which is used for inserts, and which does not look for a 
>result from the
>statement.
>
>~Kender
>
>=====
>-----BEGIN GEEK CODE BLOCK-----
>Version 3.1
>GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ 
>P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O 
>M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ 
>b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
>------END GEEK CODE BLOCK------
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! - Official partner of 2002 FIFA World Cup
>http://fifaworldcup.yahoo.com
>
>-- 
>ROM mailing list
>[email protected]
>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>
>
>
>
>
>-- 
>ROM mailing list
>[email protected]
>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>

Reply via email to