debugsqlMinor
Cannot create Federated View
Viewed 0 times
cannotfederatedviewcreate
Problem
For the first time ever could not find a solution on internet!
The problem is when I'm trying to (on local server):
I'm getting an error:
#1939 - Engine FEDERATED failed to discover table
Obviously you can see that VIEW is very simple for testing purposes (executed on remote server):
The user in
Am I missing something?
The problem is when I'm trying to (on local server):
CREATE TABLE `DB_1`.`testView`
ENGINE=FEDERATED CONNECTION='remote_server';I'm getting an error:
#1939 - Engine FEDERATED failed to discover table
DB_1.testView with 'CREATE ALGORITHM=UNDEFINED DEFINER=root@localhost SQL SECURITY DEFINER VIEW testView AS select 'test_line' AS test_line CONNECTION='remote_server''Obviously you can see that VIEW is very simple for testing purposes (executed on remote server):
CREATE VIEW `DB_1`.`testView` AS SELECT "test_line"The user in
remote_server has all privileges. View was tested with different options and content. Federated tables work fine. Server version on both machines: 10.0.29-MariaDB-0+deb8u1Am I missing something?
Solution
You are using FederatedX engine and since you are not specifying column definitions explicitly, it is trying to perform assisted discovery to retrieve the structure of the table. It cannot do it with the underlying "table" being a view, so you are getting the error.
Instead, try to specify the columns:
Instead, try to specify the columns:
-- remote
CREATE VIEW `DB_1`.`testView` AS SELECT "test_line"
-- local
CREATE TABLE `DB_1`.`testView` (test_line varchar(16))
ENGINE=FEDERATED CONNECTION='remote_server';Code Snippets
-- remote
CREATE VIEW `DB_1`.`testView` AS SELECT "test_line"
-- local
CREATE TABLE `DB_1`.`testView` (test_line varchar(16))
ENGINE=FEDERATED CONNECTION='remote_server';Context
StackExchange Database Administrators Q#162616, answer score: 2
Revisions (0)
No revisions yet.