rbroberts
New member
I've written a perl script to modify some of the user and db information when a new database is created. In particular, the hosts public IP is being used and we want it to use the private IP, so the idea was to use this script to modify the record(s) after the rows are inserted into the database.
After testing by running the script outside DA manually after creating a database, I've confirmed it works fine. Logging is done via syslog and I've added some diagnostics which log the query about to be run and show how many rows match the where clause of the update. When run from outside DA using the same environment variables, it always works and shows that, as expected, only one row in user and db match. When run automatically from DA, it always shows zero rows match the where clause.
Because I'm also logging the environment variables, I'm certain my external test matches what the DA run was trying to do. And because every database statement looks like "do_something or die ..." and I have a $SIG{__DIE__} that traps those and logs via syslog, I'm pretty confident I'm not losing some error during the DA runs (besides, when I had *real* errors, DA reports the script aborted on the database creation screen).
It sure looks to me like DA has not yet committed it's database updates at the time the database_create_post.sh script is being run. What am I missing?
roland
After testing by running the script outside DA manually after creating a database, I've confirmed it works fine. Logging is done via syslog and I've added some diagnostics which log the query about to be run and show how many rows match the where clause of the update. When run from outside DA using the same environment variables, it always works and shows that, as expected, only one row in user and db match. When run automatically from DA, it always shows zero rows match the where clause.
Because I'm also logging the environment variables, I'm certain my external test matches what the DA run was trying to do. And because every database statement looks like "do_something or die ..." and I have a $SIG{__DIE__} that traps those and logs via syslog, I'm pretty confident I'm not losing some error during the DA runs (besides, when I had *real* errors, DA reports the script aborted on the database creation screen).
It sure looks to me like DA has not yet committed it's database updates at the time the database_create_post.sh script is being run. What am I missing?
roland