On Mon, 14 Jan 2008 15:07:11 +0100, Thomas
Mortagne wrote
2008/1/14, rssh <rssh(a)gradsoft.com.ua>ua>:
On Mon, 14 Jan 2008 14:30:30 +0100, Thomas
Mortagne wrote
> No as the goal of this code is not to chose the database/schema where
> to works, it set the schema name to use when generating the update
> script for database engines based on schemas. MySQL does not need it
> because MySQL is based on databases.
>
> The only place where database/schema is really changed is
> setDatabase() and only in non virtual mode as far as I know.
>
May be you mean 'only in virtual mode' ?
Yes sorry setDatabase works only in virtual mode.
Or, in such case we have:
scheme-based, non-virtual mode: patch do all work correctly. (ok)
scheme-based, virtual mode: patch do all work correctly. (ok)
database-based, non-virtual mode: path does not touch nothing (ok, I think)
database-based, virtual mode: see below: (problem)
path does not touch nothing for main database, but touch virtual databases,
except case, when we call setDatabase() for main database
I tested your patch (at last) with "xwiki.db=toto" and
"xwiki.virtual.db.prefix=prefix" and my results are :
- mysql
- virtual : change main wiki database name and correctly apply
prefix (could be usefull)
- non-virtual : do noting (useless)
- hsqldb :
- virtual : change main wiki database name and correctly apply
prefix (could be usefull)
- non-virtual : updateSchipt is done in toto and retrieve/save
document in PUBLIC (not ok)
- derby :
- virtual : change main wiki database name and correctly apply
prefix (could be usefull)
- non-virtual : updateSchipt is done in toto and retrieve/save
document in PUBLIC (not ok)