List:General Discussion« Previous MessageNext Message »
From:Baron Schwartz Date:April 14 2007 1:23pm
Subject:Re: MySQL slave error when creating view
View as plain text  
Sounds like a bug to me.  It's likely fixed in newer versions; a lot of 
view/function/sproc replication bugs have been fixed.  But if not, you should 
report it.

Tim Lucia wrote:
> 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