The "db=" viarable doesn't get updated immediately after creation of a new database

To replicate the issue, please:

  1. Create a virtual server, let's say test.com. Now if you open "/etc/webmin/virtual-server/domains/#-of-virtual-server" file then you will find "db=" variable equal to correct database name, in this case db=test.

  2. Now click "Edit Databases" and delete the database. Then create a new one. In our system the newly created database is called "test_new". Now staying at the same page "Create Database" open the same "/etc/webmin/virtual-server/domains/#-of-virtual-server" file again and you will see "db" is still equal to "test": db=test However, there is a new variable called "db_mysql", which is equal to "test_new": db_mysql=test_new

  3. However, if you click on any link, let's say "Return to database list" and then open the same file then you will see the new value finally got passed to "db": db=test_new

This is not so important and we wound't pay attention to this behavior unless if it didn't break our custom script which needs the new database name passed to "db" immediately after it is created.

Status: 
Closed (fixed)

Comments

The db variable is an old one that isn't really used anymore, and only kept around for compatability reasons. It is safer to use db_mysql all the time instead.

I see. In that case we will modify our script. Thanks!