linux-traipu team mailing list archive
-
linux-traipu team
-
Mailing list archive
-
Message #06153
[Bug 1008185] Re: TIME field magically morphs into a TIMESTAMP
It's happing in my build too. Just downloaded the 7.1.36, compiled in
Ubuntu 12.04 amd64 and same thing: TIME "morphs" to TIMESTAMP.
--
You received this bug notification because you are a member of UBUNTU -
AL - BR, which is subscribed to Drizzle.
https://bugs.launchpad.net/bugs/1008185
Title:
TIME field magically morphs into a TIMESTAMP
Status in A Lightweight SQL Database for Cloud Infrastructure and Web Applications:
New
Bug description:
Hi Drizzlers,
After creating an index on an INTEGER field in a table, the (other) TIME field suddenly becomes a TIMESTAMP field. Why? How?
Below is my experiment on debian wheezy's current drizzled.
drizzle> select version();
+---------------+
| version() |
+---------------+
| 7.1.33-stable |
+---------------+
1 row in set (0.000476 sec)
drizzle> create table `foobar` (`num` integer, `timething` time);
Query OK, 0 rows affected (0.037795 sec)
drizzle> desc foobar;
+-----------+---------+------+---------+-----------------+-----------+
| Field | Type | Null | Default | Default_is_NULL | On_Update |
+-----------+---------+------+---------+-----------------+-----------+
| num | INTEGER | YES | | YES | |
| timething | TIME | YES | | YES | |
+-----------+---------+------+---------+-----------------+-----------+
2 rows in set (0.001454 sec)
drizzle> insert into foobar (num, timething) values (234, '23:59:59');
Query OK, 1 row affected (0.040874 sec)
drizzle> select * from foobar;
+------+-----------+
| num | timething |
+------+-----------+
| 234 | 23:59:59 |
+------+-----------+
1 row in set (0.000703 sec)
drizzle> create index `numindex` on `foobar` (`num`);
Query OK, 1 row affected (0.0725 sec)
Records: 1 Duplicates: 0 Warnings: 0
drizzle> desc foobar;
+-----------+-----------+------+---------+-----------------+-----------+
| Field | Type | Null | Default | Default_is_NULL | On_Update |
+-----------+-----------+------+---------+-----------------+-----------+
| num | INTEGER | YES | | YES | |
| timething | TIMESTAMP | YES | | YES | |
+-----------+-----------+------+---------+-----------------+-----------+
2 rows in set (0.000971 sec)
drizzle> insert into foobar (num, timething) values (235, '23:59:59');
ERROR 1739 (HY000): Received an invalid timestamp value '23:59:59'.
drizzle> select * from foobar;
+------+---------------------+
| num | timething |
+------+---------------------+
| 234 | 0000-00-00 00:00:00 |
+------+---------------------+
1 row in set (0.000707 sec)
On a somewhat related note, here's what happened while trying to reproduce the error:
I discovered this problem on my local build of the drizzle-7.1.31-rc
tarball on MacOSX 10.6. Since that's not the latest version, I pull
the latest version from bzr: Configure runs fine, yet somewhere down
in make I get the notice that my version of bison is too old. Sure,
upgrade bison. Now the build crashes on drizzle/drizzled.cc line 417:
there is no O_CLOEXEC in sys/fcntl.h. Remove the O_CLOEXEC, heh. Now
the build crashes on `/plugin/innobase/include/ha_prototypes.h:145:
error: ‘uint’ has not been declared`. Abort the attempt to build on
MacOSX 10.6.
Over to my Debian box, do `aptitude install drizzle drizzle-client`.
No drizzle daemon. Aha, there's an error in the /etc/init.d/drizzle:
the start clause shouldn't quote the JS_OPTS variable.
To manage notifications about this bug go to:
https://bugs.launchpad.net/drizzle/+bug/1008185/+subscriptions
References