Hi,
I am trying to create foreign keys between two tables of different users,
where each table gives privileges to a role in common for both users.
But when creating the foreign key I have the following error:
---- Error -------------------------------
Auto Commit: Off, SQL Mode: Internal, Isolation Level: Committed
Base table not found;-4004 POS(95) Unknown table name:SISTUSERS
My DB has the following structure:
CREATE USER "COM" PASSWORD "COM" RESOURCE NOT EXCLUSIVE
//
CREATE USER "BASE" PASSWORD "BASE" RESOURCE NOT EXCLUSIVE
//
CREATE ROLE ROLEBASIC
//
GRANT ROLEBASIC TO COM
//
GRANT ROLEBASIC TO BASE
//
ALTER USER COM DEFAULT ROLE ROLEBASIC
//
ALTER USER BASE DEFAULT ROLE ROLEBASIC
//
USE USER COM COM
//
CREATE TABLE COM.ORDER ....
//
USE USER BASE BASE
//
CREATE TABLE BASE.SISTUSERS ...
//
And each table do a GRANT to ROLEBASIC like that:
GRANT REFERENCES, SELECT, INSERT, UPDATE, DELETE ON COM.ORDER TO ROLEBASIC
//
GRANT REFERENCES, SELECT, INSERT, UPDATE, DELETE ON BASE.SISTUSERS TO ROLEBASIC
//
The following command returns the described error above.
ALTER TABLE COM.ORDER
ADD FOREIGN KEY FK_ORDER_USER (COD_USER)
REFERENCES BASE.SISTUSERS (COD_USER)
ON DELETE RESTRICT
//
If I create a foreign key between tables of one same user everything works
well. The GRANT command using a role seems correct, but what it can be wrong ?
Thanks.
Lucius Gallardo
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]