I have just install the source distrib. 3.23.30g of MySQL.

I have this (while I am testing ....) :

mysql> CREATE TABLE t1 ( datum DATE );
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-1" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-2" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-3" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-4" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-5" );
Query OK, 1 row affected (0.00 sec)

mysql> SELECT * FROM t1 WHERE datum BETWEEN "2000-1-2" AND "2000-1-4";
ERROR 2013: Lost connection to MySQL server during query
mysql> 010119 16:17:41  mysqld restarted


When I repalce DATE by DATETIME, I have OK:
mysql> drop table  t1;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t1 ( datum DATETIME );
ERROR 1050: Table 't1' already exists
mysql> INSERT INTO t1 VALUES ( "2000-1-1" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-2" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-3" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-4" );
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ( "2000-1-5" );
Query OK, 1 row affected (0.00 sec)

mysql> SELECT * FROM t1 WHERE datum BETWEEN "2000-1-2" AND "2000-1-4";
+---------------------+
| datum               |
+---------------------+
| 2000-01-02 00:00:00 |
| 2000-01-03 00:00:00 |
| 2000-01-04 00:00:00 |
| 2000-01-02 00:00:00 |
| 2000-01-03 00:00:00 |
| 2000-01-04 00:00:00 |
+---------------------+
6 rows in set (0.00 sec)

Can somebody tell me the reason ?


Michel  TIGNYEMB
FTeB
01 46 12 69 45

Reply via email to