in reply to Re: mysql, locked databases, Apache::DBI and mod_perl
in thread mysql, locked databases, Apache::DBI and mod_perl

Hmm, I'll try -X and see if it helps. As for the locked tables, that code was commented out and the system was restarted so the locks should no longer be affecting the situation, however while on the subject, if I have one database handle for my database in my program, if I try to create a new one under Apache::DBI to the same database, will I have two handles to the same connection, or two connections?



My code doesn't have bugs, it just develops random features.

Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)

  • Comment on Re: Re: mysql, locked databases, Apache::DBI and mod_perl

Replies are listed 'Best First'.
Re: Re: Re: mysql, locked databases, Apache::DBI and mod_perl
by perrin (Chancellor) on May 19, 2003 at 05:15 UTC
    Assuming the connection parameters are identical, you will just get the exact same handle back.
      Under mod_perl then, if I were to lock a table and have another process running at the same time, both using Apache::DBI and the same parameters, wouldn't it think of both processes as identical and thus complain when one tries to use tables that weren't locked by the other, and when one locks tables, wouldn't it undo the previous locks? I'm beginning to question the practicality of Apache::DBI in this context... perhaps I should do file locking on files named after the tables.



      My code doesn't have bugs, it just develops random features.

      Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)

        There's nothing with Apache::DBI in this context. You are now asking about multiple processes. Multiple processes will never have the same database handle or the same connection. Within a single process, any time you connect with the same parameters you will get the same connction.