June 20, 2013

Post: MySQL Query Patterns, Optimized - Webinar questions followup

… in this way, for example when using replication, a temporary table could vanish if the …column, and reinitializing the sequence after making certain insert/update/delete operations.  If you have a …last episode of each TV show. Couldn’t you have used a SUBQUERY to fetch and compare MAX(episode_id

Post: Is Synchronous Replication right for your app?

… metadata: BEGIN; INSERT INTO users_groups (user_id, group_id) VALUES (100, 1); UPDATE groups SET last_joined=NOW(), last_user_id=100 WHERE id=1; COMMIT… so often? INSERT INTO users_groups (user_id, group_id, joined) VALUES (100, 1, NOW()); Conclusion Choosing a system to replicate your data to…

Post: Statement based replication with Stored Functions, Triggers and Events

… our infrastructure. Is possible to define different Triggers in your replication servers if you need different actions for the same statements… id 1 end_log_pos 1245 Intvar SET LAST_INSERT_ID=2/*!*/; #111214 0:04:50 server id 1 end_log_pos 1273 Intvar SET INSERT_ID=3/*!*/; #111214 0:04:50 server id

Post: Ultimate MySQL variable and status reference list

last_insert_idblogpercona.commanual Lastreplicate_do_dbblogpercona.commanual replicate_do_tableblogpercona.commanual replicate_ignore_dbblogpercona.commanual replicate_ignore_tableblogpercona.commanual replicate_rewrite_dbblogpercona.commanual replicate_same_server_idblogpercona.commanual replicate

Post: Flexviews - part 3 - improving query performance using materialized views

…is sometimes called drift. This is conceptually similar to a replication slave that is behind. Until it catches up, the … ‘dashboard_customer_sales’, ‘INCREMENTAL’); SET @mvid := LAST_INSERT_ID(); CALL flexviews.add_expr(@mvid,’GROUP’,'customer_id‘,’customer_id‘); CALL flexviews.add_expr(@mvid,’GROUP…

Comment: Product to try: MySQL/MariaDB-Galera 0.8

… on one node (the master) – Client issues commit – Transaction is replicated to other nodes (the slaves) – Slaves perform some verification to… commit you could do something like last_transaction_id() (think like last_insert_id()), and you could then pass that id with your next select, telling…

Post: Can MySQL temporary tables be made safe for statement-based replication?

…000007 Pos: 207 Event_type: Query Server_id: 1 End_log_pos: 271 Info: BEGIN *************************** … Last_Errno: 1146 Last_Error: Error ‘Table ‘test.t’ doesn’t exist’ on query. Default database: ”. Query: ‘insert…there’s clearly an opportunity to break replication here. It looks like this doesn’…

Post: Debugging problems with row based replication

… information about changed rows, a replication slave which does not find….02 sec) Insert a single “seed” row into the table: INSERT INTO repl.t1 …340718 Slave_SQL_Running: No Last_Errno: 1032 Last_Error: Could not execute…340782 # at 340823 #100506 12:42:56 server id 1  end_log_pos 340678        Table_…

Post: Infinite Replication Loop

Last week I helped 2 different customers with infinite replication loops. I decided to write a blog post about these … from 0 to the time those looping statement were first inserted. Another way to see it is by monitoring your MySQL… to use IGNORE_SERVER_IDS from CHANGE MASTER[4] The last solution, my favorite one, is to stop the replication on the active…

Post: Why audit logging with triggers in MySQL is bad for replication

…=hostname.local,u=root,p=xxx –replicate=checksum.checksum –emptyrepltbl –chunksize=500000 –databases… Foo set Value=6 Where Field_ID = 3; Transaction 2 starts, updates and …last. Commit; Now when these statements get run on the slave they will be serialized, thus changing the order of the inserts