Re: [Maria-developers] Help with running a transaction inside the server

2013-02-14 Thread Kristian Nielsen
Sergei Golubchik s...@askmonty.org writes: What file is it in? I didn't find it in sql_repl.cc Sorry, it is rpl_slave_state::record_gtid() in sql/log_event.cc: http://bazaar.launchpad.net/~maria-captains/maria/10.0-mdev26/view/head:/sql/log_event.cc#L6140 You could do all that in a

Re: [Maria-developers] Help with running a transaction inside the server

2013-02-14 Thread Kristian Nielsen
Sergei Golubchik s...@askmonty.org writes: Right. In fact, I think perhaps I am doing it in a single statement already: mysql_reset_thd_for_next_command(thd, 0); open_and_lock_tables(thd, tlist, FALSE, 0); table-file-ha_write_row(table-record[0]);

Re: [Maria-developers] Help with running a transaction inside the server

2013-02-14 Thread Michael Widenius
Hi! Kristian == Kristian Nielsen kniel...@knielsen-hq.org writes: Kristian Sergei Golubchik s...@askmonty.org writes: What file is it in? I didn't find it in sql_repl.cc Kristian Sorry, it is rpl_slave_state::record_gtid() in sql/log_event.cc: Kristian

Re: [Maria-developers] Help with running a transaction inside the server

2013-02-14 Thread Kristian Nielsen
Michael Widenius mo...@askmonty.org writes: Why doing an insert + delete instead of one update? This is described in more detail in my blog under On crash-safe slave: http://kristiannielsen.livejournal.com/17008.html The basic problem with just one UPDATE is that this causes row lock

Re: [Maria-developers] Help with running a transaction inside the server

2013-02-14 Thread Sergei Golubchik
Hi, Kristian! On Feb 14, Kristian Nielsen wrote: Sergei Golubchik s...@askmonty.org writes: Right. In fact, I think perhaps I am doing it in a single statement already: mysql_reset_thd_for_next_command(thd, 0); open_and_lock_tables(thd, tlist, FALSE, 0);

Re: [Maria-developers] Help with running a transaction inside the server

2013-02-13 Thread Sergei Golubchik
Hi, Kristian! On Feb 13, Kristian Nielsen wrote: Hi Serg, Can you give me a tip for doing the following (for MDEV-26, global transaction ID): I need to run a transaction inside the server. This is in the slave I/O thread, when it connects to the master it receives the current