Commit Graph

427 Commits

Author SHA1 Message Date
cbf024e8f7 *: clean code. (#1987) 2016-11-10 15:38:22 +08:00
e17644716d refactor show clause. (#1940) 2016-11-10 11:14:37 +08:00
5d3bb33afd util/types: fix decimal conversion. (#1979)
When datum converts to decimal, we should check the Flen and Decimal of
the given field type, return max value for overflow and round the value
for truncation.
2016-11-09 16:53:30 +08:00
9946941089 plan: add the missing filer conditions (#1977) 2016-11-09 10:12:37 +08:00
c12a53fd9e plan: fix a panic bug when involved join and order by. (#1963) 2016-11-08 16:11:10 +08:00
1056c56df1 ddl: support modify column (#1930)
* ddl: support modify column
2016-11-08 15:20:41 +08:00
b5cd34aea7 executor: fix show create table null timestamp. (#1968)
Without the extra 'NULL', the create table statement would fail to execute.
2016-11-07 21:17:59 +08:00
5044a8782f plan: recollect gby cols after retriving index. (#1966)
* plan: recollect gby cols after retrieving index.
2016-11-07 18:52:41 +08:00
88a66a57ea *: Improve test for push down. (#1927) 2016-11-07 11:42:05 +08:00
1c6c145f94 *: Set custom verbose flag to true (#1956)
* *: set custom verbose flag to true

* *: update .gitignore
2016-11-05 18:00:13 +08:00
40ad2ba4cb executor: Load data ignore default value is nil and add log (#1953)
* executor: load data ignore default value is nil and add log
2016-11-05 16:35:44 +08:00
1f1a60c02a *: improve log (#1944)
Add logging for set system variable.
Add connection ID in log.
Adjust some log level.
Improve readability.
2016-11-04 17:11:10 +08:00
85c0954dc2 support builtin function from_unixtime (#1929) 2016-11-04 13:15:55 +08:00
5d1a069ada executor: set scanConcurrency varialbe for distsql Executor on building. (#1943)
Prevent worker goroutines from reading session variable map, Fixes race.
2016-11-04 09:46:00 +08:00
bfc1ca679a tidb: load and apply common global variables for the session (#1942)
Fixes a bug some global variables like 'sql_mode' not applied to session.
2016-11-03 22:01:15 +08:00
035666f231 plan: add cast function for PatternInExpr. (#1932) 2016-11-03 15:40:58 +08:00
693eada753 plan: fix cost calculate bug. (#1933)
* plan: fix cost calculate bug.
2016-11-03 12:34:34 +08:00
c74c4f80fd *: Fix bug in show create table (#1924)
Fix https://github.com/pingcap/tidb/issues/1918
2016-11-02 15:25:12 +08:00
3bcb4bedd8 executor: let union_scan executor use its own schema. (#1925) 2016-11-02 13:26:11 +08:00
8500a629de plan: fix bug when outer join's condition is false (#1923) 2016-11-01 22:46:31 +08:00
76f420595b *:support aggregate function push cross outer join. (#1899) 2016-11-01 17:59:12 +08:00
154d7f0c87 plan: fix a panic bug. (#1914) 2016-11-01 14:38:14 +08:00
2e79d3f305 executor: Make show create database result the same with mysql (#1915) 2016-11-01 13:43:21 +08:00
5ee84a7a9a *: support show create db (#1911) 2016-11-01 13:11:18 +08:00
bf9de5ccee executor: avoid create new domain in test. (#1910)
A store should has only one domain, and it is already created when create a session.
we should not manually create domain.
2016-10-31 19:56:29 +08:00
a6144ad1e1 *: Support Show processlist (#1907) 2016-10-31 18:23:00 +08:00
04b3bc96d0 executor: show original identifier instead of lower case. (#1909)
Fixes issue https://github.com/pingcap/tidb/issues/1904
2016-10-31 17:57:22 +08:00
d3279072b7 *: support explain aggregation query. (#1901) 2016-10-31 15:33:59 +08:00
1550e76e6c executor: add comments in executor package. (#1876)
* executor: add comments in executor package.
2016-10-31 10:51:17 +08:00
82971c4779 plan: support aggregation push down. (#1886) 2016-10-31 01:17:21 +08:00
727f9e37d2 sessionctx/variable: fix default tx_read_only variable value. (#1892)
MySQL show this variable as "ON"/"OFF" in documentation, but the real value returned is  "1"/“0”.
2016-10-29 10:15:30 +08:00
3fc9ae6bf5 remove useless check 2016-10-28 19:02:23 +08:00
1481e85129 *: add a flag to restrict cartesian product. 2016-10-28 18:38:27 +08:00
3738794502 util/types, table: truncate string by rune count, remove UTF8 validation (#1877)
Column length defined in create table should limits the rune count rather than bytes.
And MySQL doesn't return error for inserting invalid UTF8 string, we should not do it.
2016-10-26 20:34:35 +08:00
ba4d6bae37 *: support drop user. (#1854) 2016-10-24 21:01:02 +08:00
9f615fc5dc table: change Column type to alias of ColumnInfo (#1855)
So we can use a ColumnInfo directly, without coping, reduce memory usage.
2016-10-20 21:48:08 +08:00
0d49936ef9 expression: fix a bug when checking whether two aggregation functions are same. (#1852) 2016-10-20 19:53:09 +08:00
406c5c4094 *: support common aggregation functions elimination. (#1843) 2016-10-20 15:58:34 +08:00
e0e5a5821b executor: support creating user with no password. (#1841) 2016-10-18 20:12:53 +08:00
2df4a4f29b types: returns data too long error (#1837)
* types: returns data too long error when inserting a string longer than field type length.
2016-10-18 14:12:06 +08:00
3d670c47b0 executor,table: remove LockKeys and Truncate method in Table interface. (#1833)
Those two method should not be defiend in Table, LockKeys should be implemented
In SelectLock executor, Truncate has changed to use DDL operation.
2016-10-18 00:35:45 +08:00
efc96a73a6 *: Support set dist sql concurrency by set system variable (#1795) 2016-10-17 15:12:17 +08:00
8935bf90ec executor: set time zone offset in tipb.SelectRequest. (#1816)
The time zone offset will be used by TiKV to compare timestamp type.
2016-10-11 17:13:45 +08:00
9b9c01100e plan: support topn push down in plan phase. (#1769) 2016-10-11 15:17:00 +08:00
a5c73c155d plan: fix a topn bug (#1806) 2016-10-10 21:58:04 +08:00
a33240d8a8 parser: set flag in parse function. (#1799)
Every `ast.Statement` needs to set flag before use, set the flag in parse function,
so we don't need to set it somewhere else and won't forget to do it.
2016-10-09 11:36:56 +08:00
93e6796d2b *: support history read with old schema (#1790)
When user set 'tidb_snapshot' variable, load and use the schema at the snapshot time.
2016-10-08 19:54:48 +08:00
f86a32d261 ddl: write DDL binlog. (#1752)
Pass query string in context, also disallows prepare DDL, so we can be sure that
DDL query do not contains parameter marker.

change binlog row encoding format.

including columnID in binlog row, so it can be adapted to different schema version.

prepend old row for update binlog when don't have PK.
2016-10-08 11:48:58 +08:00
b399060118 ddl: truncate table by DDL operation. (#1766)
Currently, truncate table deletes rows in table in one large transaction,
too large transaction is very likely to fail.
This commit use DDL to do the work, it returns instantly, old data will be
deleted by background worker.
2016-09-29 14:22:02 +08:00
b7e826e0e1 executor: remove aggregate and push down functions. (#1777)
The logic has been move to plan.
2016-09-28 22:29:19 +08:00