Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-14 Thread Zardosht Kasheff
Also, can somebody please explain how handler_index_cond_check checks index conditions? The key function seems to be item->val_int. How does this get each value and check check conditions? On Thu, Feb 14, 2013 at 11:31 AM, Zardosht Kasheff wrote: > Hello Sergei, > > Thanks for the feedback. What

Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-14 Thread Zardosht Kasheff
Hello Sergei, Thanks for the feedback. What makes this feature a little difficult for me to grasp is the requirement that the engine is responsible for doing some of the condition checking, and that MySQL is doing none of the checking. Here are the handler cursor API functions: index_first index

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 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_wri

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

2013-02-14 Thread Kristian Nielsen
Michael Widenius 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 contention when we g

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

2013-02-14 Thread Michael Widenius
Hi! > "Kristian" == Kristian Nielsen writes: Kristian> Sergei Golubchik 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> http://bazaar.launchpad.net/~maria-captains/maria/10.0-mdev26/v

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

2013-02-14 Thread Kristian Nielsen
Sergei Golubchik 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]); >> table->file->ha_rnd_pos_by_record(ta

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 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

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

2013-02-14 Thread Kristian Nielsen
Sergei Golubchik 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 single statement, an