This is a discussion on MySQL slave error when creating view within the MySQL General forum forums, part of the MySQL category; --> I ran the following DDL on our master today: CREATE OR REPLACE VIEW REF_TRANSFER_PREFERENCE ( IORG_UID, TDISTRICT_NAME, IORGDISPLAY, IORG ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| I have a question if you don't mind. The update statement will replace the existing information. What if I have Textarea instead and I want to add information to the field without erasing previous information. Basically append information --------------------------------- Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. |