RE: YEAR and time types
2012/07/23 11:54 -0700, Rick James mysql SELECT YEAR(NOW()); +-+ | YEAR(NOW()) | +-+ |2012 | +-+ mysql SELECT CONCAT('2012', '-01-01'); +--+ | CONCAT('2012', '-01-01') | +--+ | 2012-01-01 | +--+ To show that it acts like a DATE: mysql SELECT CONCAT('2012', '-01-01') - INTERVAL 1 day; +---+ | CONCAT('2012', '-01-01') - INTERVAL 1 day | +---+ | 2011-12-31| +---+ No: I mean variables of type YEAR -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
mysqlimport --use-threads / mysqladmin processlist
I'm in the middle of migrating an InnoDB database to an NDBCluster. I use mysqldump to first create two dumps, the first one contains only the database schema, the second one contains only tab delimited data (via mysqldump --tab). I edit my InnoDB schema here and there (ENGINE=InnoDB to ENGINE=NDB, etc.) import it and after this I import the InnoDB data *as is* using mysqlimport. I use it like this: mysqlimport --local --use-threads=4 db dir/*.txt (dir of course cotains the tab delimited data I dumped before.) The import starts, and I check its progress via mysqladmin, like this: mysqladmin --sleep=1 processlist this is what I see: http://pastebin.com/raw.php?i=M23fWVjc Only a single process seems to be loading my data. Is this what I *should* see, or, in my case using 4 threads, should I see four processes? I'm not asking which one will be faster, I'm just simply confused because I don't know what to expect. If I start four different mysqlimport processes, each one importing different files, then I can see four different process in the mysql processlist. If it's matters, here is my server version (I use the official binaries). Server version: 5.5.25a-ndb-7.2.7-gpl MySQL Cluster Community Server (GPL) Regards, Kohányi Róbert -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: YEAR and time types
2012/07/24 08:46 -0700, Hassan Schroeder On Mon, Jul 23, 2012 at 5:58 AM, h...@tbbs.net wrote: I thought I would try YEAR to record it--but, in spite of http://dev.mysql.com/doc/refman/5.5/en/year.html , simply assigning NOW() to such a type does not work. Not sure I understand the issue: mysql create table babble (sometime year(4)); Query OK, 0 rows affected (0.13 sec) mysql show create table babble; +++ | Table | Create Table | +++ | babble | CREATE TABLE `babble` ( `sometime` year(4) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 | +++ 1 row in set (0.00 sec) mysql insert into babble values ( NOW() ); Query OK, 1 row affected, 1 warning (0.01 sec) mysql select * from babble; +--+ | sometime | +--+ | 2012 | +--+ ?? Well, let me show this: version(): 5.5.8-log @@sql_mode: REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_DATE,ALLOW_INVALID_DATES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION What is yours? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql