List:General Discussion« Previous MessageNext Message »
From:Tim Lucia Date:April 14 2007 2:52am
Subject:RE: MySQL slave error when creating view
View as plain text  
Nobody has any idea(s) on this?

> -----Original Message-----
> From: Tim Lucia [mailto:timlucia@stripped]
> Sent: Friday, April 06, 2007 7:11 PM
> To: replication@stripped
> Subject: MySQL slave error when creating view
> 
> 
> I ran the following DDL on our master today:
> 
> CREATE OR REPLACE VIEW REF_TRANSFER_PREFERENCE (
> 	IORG_UID, TDISTRICT_NAME, IORGDISPLAY, IORG ) AS
> SELECT
> 	0, TDISTRICT_NAME, IORG_UID, IORG_UID
> FROM REF_PREFERENCE
> ;
> 
> The master happily created the view.  The slave however dies with:
> 
> 070405 10:48:23 [ERROR] Slave: Error 'Duplicate column name 'IORG_UID'' on
> query. Default database: 'pildb'. Query: 'CREATE OR REPLACE
> ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW
> `REF_TRANSFER_PREFERENCE` AS SELECT 0, TDISTRICT_NAME, IORG_UID, IORG_UID
> FROM REF_PREFERENCE', Error_code: 1060
> 
> I can work around it by redefining the view DDL as:
> 
> CREATE OR REPLACE VIEW REF_TRANSFER_PREFERENCE (
> 	IORG_UID, TDISTRICT_NAME, IORGDISPLAY, IORG ) AS
> SELECT
> 	0 as IORG_UID, TDISTRICT_NAME, IORG_UID as IORGDISPLAY, IORG_UID as
> IORG
> FROM REF_PREFERENCE
> ;
> 
> And the slave is happy.  Is this a bug?  Anyone care to comment?
> 
> CONFIGURATION:
> storage_engine              MyISAM
> table_type                  MyISAM
> updatable_views_with_limit  YES
> version                     5.0.24-standard-log
> version_comment             MySQL Community Edition - Standard (GPL)
> version_compile_machine     x86_64
> version_compile_os          unknown-linux-gnu
> 
> Thanks,
> Tim
> 
> 
> 
> 
> 
> --
> MySQL Replication Mailing List
> For list archives: http://lists.mysql.com/replication
> To unsubscribe:
> http://lists.mysql.com/replication?unsub=1



Thread