dynamobi/dynamobi — Issue #848: [FRG-22] char/varchar datatypes which aren't in time/timestamp format are incorrectly allowed to be inserted into time/timestamp datatype column
Author: dynamobi-build
Created: 2011-12-30 03:52:31+00:00
State: closed
Labels: FRG

[reporter="elin", created="Tue, 17 Jan 2006 18:04:28 -0500 (GMT-05:00)"]
Here's a few examples below.

create table t1(colname varchar(20),colchar char(17), colvchar varchar(100));

insert into t1 values('BADDATA', '34-12', '45-56:78');

create table t2(coltime time);

insert into t2 select colvchar from t1 where colname = 'BADDATA';

insert into t2 select colchar from t1 where colname = 'BADDATA';

select * from t2;

+-----------+

| COLTIME |

+-----------+

| 21:57:18 | <--- was 45-56:78

| 10:12:00 | <--- was 34-12

+-----------+

============================

create table t1(colchar char(17));

insert into t1 values ('2323-6-26');

create table t2(colts timestamp);

insert into t2 select colchar from t1;

select * from t2;

+------------------------+

| COLTS |

+------------------------+

| 2323-09-30 19:06:26.0 | <--- was 2323-6-26

+------------------------+