Commit Graph

69 Commits

Author SHA1 Message Date
f6351df013 util/types: address comment. 2015-10-22 14:13:09 +08:00
13ffc0b026 Merge branch 'master' into qiuyesuifeng/unify-cast-convert 2015-10-22 12:03:29 +08:00
ccf38d7491 util/types: tiny cleanup. 2015-10-22 11:55:19 +08:00
64bec698fe *: refactor cast by using convert function. 2015-10-22 11:51:08 +08:00
1b8649d036 types: Add unit tests 2015-10-21 14:44:40 +08:00
ff328a1c60 *: Address comments 2015-10-21 14:22:32 +08:00
de767ac317 *: Fix failed cases in sqllogictest-expr 2015-10-21 13:15:17 +08:00
3442b777ca Merge remote-tracking branch 'origin/master' into shenli/wrap-data 2015-10-19 19:17:01 +08:00
29369dba8f *: Rename mysqldef to mysql 2015-10-19 16:26:43 +08:00
365e957538 Merge remote-tracking branch 'origin/master' into shenli/wrap-data 2015-10-19 15:34:18 +08:00
9acfcd2b14 *: Address comment 2015-10-14 13:49:50 +08:00
641aeabd42 *: Address comment 2015-10-14 13:23:12 +08:00
25b571bf59 *: Set/Enum element with single-quote should be replaced to two single-quotes
Address comment and add testcase
2015-10-14 11:58:48 +08:00
c1f168673f *: Address comment 2015-10-14 11:30:36 +08:00
d01821579e *: Address comment 2015-10-14 11:06:09 +08:00
3a7e3ed2d0 *: Address comment 2015-10-14 10:38:18 +08:00
d50b6c5fcc *: Fix hibernate bug about col.Flen/Decimal 2015-10-13 18:11:11 +08:00
d7c5e24f9d types: Improve compare for DataItem 2015-10-10 17:48:08 +08:00
1509618ffd *: Pass all the test 2015-10-09 22:11:00 +08:00
67cb0f178a *: backup 2015-10-09 18:37:05 +08:00
c1851d3fa6 *: Use DataItem for cast function result
We can not infer result field type from nil.
2015-10-09 17:33:41 +08:00
70b9104122 Merge pull request #309 from pingcap/siddontang/fix-float-precision
fix float precision
2015-10-07 14:29:48 +08:00
bd93fb3f98 *: only truncate float when length and decimal are set 2015-10-07 10:44:48 +08:00
c4bf073996 util: do some cleanup. 2015-10-02 20:25:23 +08:00
340509f0d7 *: use mysql.Bit type instead of old uint64 2015-09-30 08:04:47 +08:00
75d3bafa85 *: lowercase type description
MySQL show columns or show create create table both return lowercase
type description, like int, char, etc…
2015-09-28 21:40:31 +08:00
198099d378 *: Create privilege tables in bootstrap stage
Prepare for grant statement.
2015-09-27 17:46:36 +08:00
e6a586d6f2 types: support set type 2015-09-25 16:24:48 +08:00
d8c2c96c8e types: support enum type 2015-09-24 10:56:07 +08:00
f4b997ccbe types: add Elems field to support enum/set 2015-09-24 09:25:45 +08:00
5988e567fb types: check overflow for bit type 2015-09-21 12:30:15 +08:00
919de86dd5 types: support hex and bit type convert 2015-09-19 16:11:01 +08:00
78434002be types: support bit type 2015-09-19 15:00:02 +08:00
8f4c552cf3 types: fix test on ARM 2015-09-16 19:50:52 +08:00
e068e9f2a6 types: fix convert test error on ARM 2015-09-16 18:10:18 +08:00
5451c13b47 Merge pull request #160 from pingcap/siddontang/cleanup-code
types: remove unnecessary code
2015-09-15 15:47:24 +08:00
ada1344860 types: remove unnecessary code 2015-09-15 15:34:51 +08:00
aae3a62ae8 types: support hex in convert, compare 2015-09-15 15:09:10 +08:00
343c2d3ef4 types: Address comment to make virgo happy 2015-09-15 14:43:23 +08:00
79abe14b9c types: Cleanup IsOrderedType
Remove useless return values.
2015-09-15 14:38:57 +08:00
a7897b4215 types: Allow []byte as orderby type
Orderby []byte is already supported by types.Compare.
With this pr we can run most of functions in phpMyAdmin.
2015-09-15 14:00:40 +08:00
88902c0746 types: Address comment 2015-09-14 17:10:36 +08:00
5844708988 types: Address comment. 2015-09-14 17:03:01 +08:00
01108075eb types: support divide overflow check 2015-09-14 16:55:28 +08:00
8cc9d7d81c types: support overflow check for integer arithmetic operation 2015-09-14 13:39:51 +08:00
043816587a types: Fix convert TypeBit error
Pass goxorm test
2015-09-13 13:19:37 +08:00
7c12300baa utl/types: cast bound to float to compare with float, address comments 2015-09-10 22:54:11 +08:00
80d574bfc4 util/types: unexport method overflow and invConv 2015-09-10 22:29:28 +08:00
8c3e5a28e6 util/types: clean up for golint 2015-09-10 20:14:51 +08:00
a80d131c06 util/types, column, expressions: use types.Convert to replace Col.CastValue
The two methods has similar functionality and has complex logic, after this change,
the code base would be easier to maintain.

For `CAST` function, the behaviour is different than the general purpose `types.Convert`,
so I implemented a dedicated function for it.
2015-09-10 20:11:40 +08:00