Re: [Maria-discuss] warning 1292

2013-12-11 Thread Federico Razzoli
Just a note. With Justin's example, the SELECT *does* issue a warning in MariaDB 10. The same SELECT on an empty table returns a warning only on MySQL 5.6, not on MariaDB 10. IMO, the user should be aware that his program is buggy, no matter if the table is empty or not. Federico__

Re: [Maria-discuss] warning 1292

2013-12-11 Thread Justin Swanhart
Hi, How interesting. This behavior yields some strange results: Database changed mysql> CREATE TABLE t (c TIMESTAMP) ENGINE=InnoDB; Query OK, 0 rows affected (0.06 sec) mysql> insert into t values (1); Query OK, 1 row affected, 1 warning (0.03 sec) mysql> show warnings; +-+--+

Re: [Maria-discuss] warning 1292

2013-12-11 Thread Sergei Golubchik
Hi, Justin! On Dec 11, Justin Swanhart wrote: > I disagree about as vehemently as possible. You should get a warning on > comparisons between incompatible types that cause float conversions. You > get unexpected wrong results otherwise. The MySQL warning is therefor > critical. That would be t

Re: [Maria-discuss] warning 1292

2013-12-11 Thread Justin Swanhart
I disagree about as vehemently as possible. You should get a warning on comparisons between incompatible types that cause float conversions. You get unexpected wrong results otherwise. The MySQL warning is therefor critical. Not warning for this is just as stupid as not having ONLY_FULL_GROUP_B

Re: [Maria-discuss] warning 1292

2013-12-11 Thread Sergei Golubchik
Hi, Federico! On Dec 11, Federico Razzoli wrote: > Hi! MySQL 5.6 returns a warning for wrong datatypes, with any SQL_MODE: > > mysql> CREATE TABLE t (c TIMESTAMP) ENGINE=InnoDB; > Query OK, 0 rows affected (0,31 sec) > > mysql> SELECT c FROM t WHERE c = 1; > Empty set, 1 warning (0,00 sec) > Wa

[Maria-discuss] warning 1292

2013-12-11 Thread Federico Razzoli
Hi! MySQL 5.6 returns a warning for wrong datatypes, with any SQL_MODE: mysql> CREATE TABLE t (c TIMESTAMP) ENGINE=InnoDB; Query OK, 0 rows affected (0,31 sec) mysql> SELECT c FROM t WHERE c = 1; Empty set, 1 warning (0,00 sec) Warning (Code 1292): Incorrect datetime value: '1' for column 'c' a