Commit Graph

13 Commits

Author SHA1 Message Date
fc209cb1df *: rewrite hex and bit literals (#4415) 2017-09-07 16:28:24 +08:00
1dc7bbe28b *: use FieldType.Decimal to control the decimal length of double values to be shown in client (#4191) 2017-08-15 23:39:59 +08:00
1e4bf4775c document store: add JSON type and codec. (#3248)
Document store: add JSON type and codec.

The JSON binary representation is same with MySQL 5.7. we prefer
this not bson because 1) bson only supports JSON compound types
but not JSON primitive types, and 2) this representation is better
than bson on random access.

This PR now can support these  statements:
```
CREATE TABLE t (a json_field);
INSERT INTO t (a) values ('{"a": "b"}');
SELECT * FROM t;
```

JSON codec uses MySQL 5.7 compatible format, which doesn't support use JSON field as key or index. We will limit this in tidb later.
2017-05-17 12:00:34 +08:00
9f08180d7d information_schema: Fill information_schema.key_column_usage (#2721) 2017-05-12 20:27:43 +08:00
5aec72ce81 expression,plan: fix some issues of ROUND func (#2461) 2017-01-22 11:35:26 +08:00
a44d9c3891 *: add builtin function UNIX_TIMESTAMP (#2369) 2017-01-05 14:09:21 +08:00
d508b6d2da util/types: workaround for time roundFrac (#2289) 2016-12-21 19:45:27 +08:00
24f27a2622 *: types.TimeInternal GoTime method would return error (#2185) 2016-12-12 17:22:49 +08:00
296f4a6cf3 util/types: refact Time introduce a TimeInternal interface (#2098)
Go time representation is not compatible with mysql, this
commit is a prepare before the code refact.

timeInternal is a interface for time representation, and it
would make the refact more smooth.
2016-11-29 21:04:59 +08:00
b19cc75a94 mysql, types: move MyDecimal and Time from 'mysql' to 'types' package. (#2082)
So we don't need to handle sql mode in 'mysql' package, avoid potential dependency cycle.
2016-11-24 10:50:31 +08:00
e3597b6548 Add Datum.IsNull() fucntion (#1298)
Add IsNull function for Datum to simplify null check.
2016-06-07 23:35:25 +08:00
7c7b1b59f5 *: Unify error (#1273)
* *: unify error format in table, server and xapi package

* terror: remove duplicated code
2016-05-31 15:06:11 +08:00
0ecb4da39d *: migrate to vendor (#1175) 2016-04-28 16:57:18 +08:00