Re: [Maria-developers] Using C++ features in MariaDB

2013-02-18 Thread Sergei Golubchik
Hi, Christian! On Feb 18, Christian Convey wrote: > > The reason I'm asking is that, while I'm generally cautious about new > C++ features, there are some features in C++11 which I'm pretty happy > about. For example, class enumerations and nullptr ( > http://www.cprogramming.com/c++11/c++11-nul

Re: [Maria-developers] accelerating CREATE TABLE

2013-02-18 Thread Toshikuni Fukaya
Hi Kristian, (2013/02/08 23:52), Kristian Nielsen wrote: Toshikuni Fukaya writes: I made a patch to accelerate CREATE TABLE on the innodb plugin. To zero table spaces, I used fallocate instead of normal writes and sync. Thanks for your work. Today I took a closer look at the patch and the d

Re: [Maria-developers] Using C++ features in MariaDB

2013-02-18 Thread Christian Convey
Hi Sergei, The reason I'm asking is that, while I'm generally cautious about new C++ features, there are some features in C++11 which I'm pretty happy about. For example, class enumerations and nullptr ( http://www.cprogramming.com/c++11/c++11-nullptr-strongly-typed-enum-class.html ). I'm trying

Re: [Maria-developers] Using C++ features in MariaDB

2013-02-18 Thread Sergei Golubchik
Hi, Christian! On Feb 18, Christian Convey wrote: > While we're on the topic, how does MariaDB decide which language > features are mature enough to use in the software? > > For example, do you look at a list of supported operating systems, and > for those operating systems, look at whether or no

Re: [Maria-developers] Using C++ features in MariaDB

2013-02-18 Thread Christian Convey
While we're on the topic, how does MariaDB decide which language features are mature enough to use in the software? For example, do you look at a list of supported operating systems, and for those operating systems, look at whether or not the supplied version of g++ supports a given language featu

Re: [Maria-developers] Using C++ features in MariaDB

2013-02-18 Thread Sergei Golubchik
Hi, Christian! On Feb 18, Christian Convey wrote: > Thanks Sergei. So why is it used in some places, but not in the > server code? STL is pretty much ok starting from 10.0. Exceptions - they aren't used in the server yet, we'd need to make a decision that they're ok to use. And we haven't discu

Re: [Maria-developers] unexpected "Duplicate entry" error

2013-02-18 Thread Kazuhiko Shiozaki
Hi Kristian, On 18/02/2013 16:59, Kristian Nielsen wrote: >>> It's REPEATABLE-READ. >> >> And innodb_locks_unsafe_for_binlog is ON, could it be the reason ? > > Yes. (snip) > With --innodb-locks-unsafe-for-binlog=0, the DELETE from connection A waits > for a next-key lock set by the DELETE in B,

Re: [Maria-developers] unexpected "Duplicate entry" error

2013-02-18 Thread Kristian Nielsen
Kazuhiko Shiozaki writes: >> It's REPEATABLE-READ. > > And innodb_locks_unsafe_for_binlog is ON, could it be the reason ? Yes. A> SELECT @@global.innodb_locks_unsafe_for_binlog; @@global.innodb_locks_unsafe_for_binlog 1 A> SET SESSION TRANSACTION ISOLATION LEVEL REPEATA

Re: [Maria-developers] unexpected "Duplicate entry" error

2013-02-18 Thread Kazuhiko Shiozaki
On 18/02/2013 16:31, Kazuhiko Shiozaki wrote: > On 18/02/2013 15:36, Kristian Nielsen wrote: >>> We sometimes (not always, not often but sometimes) have unexpected >>> "Duplicate entry" error on the following table and with the following >>> query : >>> >>> BEGIN; >>> >>> (some queries for other ta

Re: [Maria-developers] Using C++ features in MariaDB

2013-02-18 Thread Christian Convey
Thanks Sergei. So why is it used in some places, but not in the server code? On Mon, Feb 18, 2013 at 3:00 AM, Sergei Golubchik wrote: > Hi, Christian! > > On Feb 17, Christian Convey wrote: >> I just read in Pachev's "MySQL Internals" book that C++ STL and >> exceptions aren't allowed in the MyS

Re: [Maria-developers] unexpected "Duplicate entry" error

2013-02-18 Thread Kazuhiko Shiozaki
Hi Krisian, On 18/02/2013 15:36, Kristian Nielsen wrote: >> We sometimes (not always, not often but sometimes) have unexpected >> "Duplicate entry" error on the following table and with the following >> query : >> >> BEGIN; >> >> (some queries for other tables) >> >> DELETE FROM category WHERE uid

Re: [Maria-developers] unexpected "Duplicate entry" error

2013-02-18 Thread Kristian Nielsen
Kazuhiko Shiozaki writes: > We sometimes (not always, not often but sometimes) have unexpected > "Duplicate entry" error on the following table and with the following > query : > > BEGIN; > > (some queries for other tables) > > DELETE FROM category WHERE uid=14026268; > > INSERT INTO category VAL

[Maria-developers] unexpected "Duplicate entry" error

2013-02-18 Thread Kazuhiko Shiozaki
Hello, We sometimes (not always, not often but sometimes) have unexpected "Duplicate entry" error on the following table and with the following query : * table CREATE TABLE `category` ( `uid` bigint(20) unsigned NOT NULL, `category_uid` bigint(20) unsigned NOT NULL DEFAULT '0', `base_categ

Re: [Maria-developers] [Commits] Rev 3497: MDEV-537 Make multi-column non-top level subqueries to be executed via index (index/unique subquery) in file:///home/tsk/mprog/src/10.0-md537-merge/

2013-02-18 Thread Sergei Petrunia
Hi Timour, With the below patch, conditions are unnecessarily wraped into two Item_func_trigcond objects. See EXPLAIN EXTENDED ouput in .result files below - one object is wrapping the other. Debugging shows that they are triggered by the same flag get_cond_guard(i). Two wrappings are just a fe

Re: [Maria-developers] Using C++ features in MariaDB

2013-02-18 Thread Sergei Golubchik
Hi, Christian! On Feb 17, Christian Convey wrote: > I just read in Pachev's "MySQL Internals" book that C++ STL and > exceptions aren't allowed in the MySQL code. > > Are those restrictions also in effect for MariaDB? If so, can anyone > explain the reason for them? The reason is historical. Wh