Commit Graph

54 Commits

Author SHA1 Message Date
0267a7fbdf ddl: validate fsp for datetime/timestamp if they are used as defaultvalue of datetime/timestamp columns (#9327) 2019-03-04 11:19:11 +08:00
7ac4902b8f ddl: disallow generated column referring to auto_increment column (#9234) 2019-03-01 11:50:13 +08:00
4449eb062a ddl: add ddl job error count limit, exceed the limit should cancel the ddl job (#9295) 2019-02-27 15:03:04 +08:00
b845f2a4da executor, planner: support show create view (#9309) 2019-02-19 10:18:57 +08:00
d96ca96941 executor:adjust 'show create table' for mysql compatibility (#9113)
* executor: adjust 'show create table'

show create table should not print the charset of the column
if it is the same with table charset( same with MySQL)

* update:change the test

* update: add test to improve CodeCov

* style: update the variable

* fix test

* Wait for change parser

* just need to test

* change go.mod

* fix invalid pointer access

* Revert "update:change the test"

This reverts commit 64b381b2e95f151a9756d67ba52b60f694573cf9.

* Revert "fix test"

This reverts commit 98e00954064c9f5a6aa4ae1d4fb529e27cfabf4e.

* Revert "update: add test to improve CodeCov"

This reverts commit a32d6e992ca239e893f0615cea988838f3952dd7.

* passed test(need change test data)

*  add judge when show create table

*  fix logic wrong

*  add test

* change variable name

* revert something because complex

* update go.mod

*  update go.mod
2019-02-14 15:49:38 +08:00
bcecc91362 ddl: fix default value precision problem for time types (#9249) 2019-02-11 12:15:09 +08:00
59c7b69187 ddl: disallow alter table on view (#8890) 2019-01-17 00:57:21 +08:00
f522de2e8f ddl: support "or replace" option when create view (#8856) 2019-01-16 19:54:22 +08:00
365264cd21 ddl: add restore deleted table (#7937) 2019-01-16 15:37:33 +08:00
15b29dd71a executor: add column character sets when show create table (#8866) 2019-01-14 19:59:47 +08:00
00c4ff4fa9 *: refactor Executor.Next() to receive RecordBatch (#8994) 2019-01-14 15:04:36 +08:00
858b200e9a variable: remove tidb_ddl_reorg_worker_cnt and tidb_ddl_reorg_batch_size session level. (#8941) 2019-01-10 15:12:22 +08:00
106bc7efc6 executor: return error if autoid overflows shard bits. (#8936) 2019-01-08 12:19:35 +08:00
e646276f4b planner,executor: basic support for DROP_VIEW (#8758) 2019-01-04 10:53:02 +08:00
98b96cc769 executor: speedup unit tests by spliting them into separate suites (#8618) 2018-12-24 21:37:12 +08:00
4e8c424718 *: basic support for CREATE_VIEW (#8571) 2018-12-18 20:17:27 +08:00
93acd10f53 *: add context.Context to NewTxn(), tiny refactor (#8530) 2018-12-06 17:45:16 +08:00
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +08:00
e478be7914 ddl: add ddl_reorg_batch_size variable to control ddl worker batch size and enlarge default batch size. (#8365) 2018-12-04 19:07:12 +08:00
29f14d4178 *: change default charset and collation from 'utf8 utf8_bin' to 'utf8mb4 utf8mb4_bin' (#7965) 2018-11-09 16:32:21 +08:00
38274c39c3 *: fix the issue of executing DDL after executing SQL failure in txn (#8044)
* ddl, executor: fix the issue of executing DDL after executing SQL failure in txn
2018-10-25 15:52:13 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
e79bd946ed *: change package name from plan to planner (#7760) 2018-09-25 11:16:39 +08:00
55af7e1472 executor: forbid user to drop important system table (#7471) 2018-08-29 23:40:53 +08:00
6e7d75299d test: refine test (#7414) 2018-08-16 17:05:59 +08:00
437933d449 sessionctx, executor: Add correctness check when set system variables (#7117) 2018-07-24 18:49:15 +08:00
6851878b9b *: add session var 'tidb_ddl_reorg_worker_cnt' to control ddl reorg workers count (#6441)
* *: add session var 'tidb_ddl_reorg_worker_cnt' to control ddl reorg workers count
2018-06-27 22:36:18 +08:00
6f2ccfc7f6 ddl: check auto_increment column for shard_row_id_bits statements. (#6572) 2018-05-18 13:13:09 +08:00
8562ff4712 ddl: fix bug when add index meet math.MaxInt64 handle. (#6481) 2018-05-09 02:13:38 -05:00
ccf6da1a46 *: rename NextChunk to Next (#6214) 2018-04-03 20:00:30 +08:00
631141b22c *: remove Next function for RecordSet (#6040) 2018-03-13 21:05:10 +08:00
e1121814d2 *: don't import golang.org/x/net/context as goctx alias (#5895)
Now that there is no conflict with sessionctx.Context, this can be
import directly
2018-02-24 03:40:56 -06:00
04ef7d7992 *: shard implicit row ID (#5513) 2018-01-04 16:32:41 +08:00
cbceac701d *:fix the bug about auto-increment key after renaming a table from old DB to the another DB (#5248) 2017-11-29 15:31:16 +08:00
fb610e6429 *: change executor Next() interface to Next(goctx.Context) (#5223) 2017-11-26 21:17:33 -06:00
aba165718c ddl: limit the length of the index name (#5161) 2017-11-22 14:08:57 +08:00
f828016e9f *: move sessionctx/domainctx.go to domain package (#5168) 2017-11-22 13:41:58 +08:00
81652dbeef *: remove returned value isNull in Row methods. (#5131) 2017-11-17 11:12:41 +08:00
cf5a22b5fd *: replace *ast.Row with types.Row (#5124) 2017-11-16 18:36:28 +08:00
62433663e5 util/types: change types path (#5007)
* util/types: change types path
2017-11-04 10:37:14 -05:00
030b3628d5 *: Remove the check of initialized auto ID (#4971) 2017-11-02 12:24:19 +08:00
4550e91919 ddl: Fix rename table bug (#4862) 2017-10-26 12:41:47 +08:00
6f9457e373 executor: use tearDownTest instead of defer (#4499) 2017-09-12 01:02:41 -05:00
ea29a1c30d expression: Support more types when getting default flen and decimal (#4236) 2017-08-28 02:26:07 -05:00
44a7e900cd *: set default length for some types (#4200) 2017-08-16 15:56:34 +08:00
bc713303fc ddl: fix modify column behavior about primary / unique key (#3748) 2017-07-17 15:49:57 +08:00
4c3be8a9ad *: Support retrun the error of ErrNoDB (#3572) 2017-06-29 17:41:58 +08:00
b4f20e6f0b util/testkit: refine testkit (#3177) 2017-04-29 23:20:49 +08:00
bb71d83456 ddl: check unsupported charset. (#3086)
We only supports a few charset, when a charset is not supported, we should return error.
Also enforce charset to be lower case.
2017-04-19 20:34:49 +08:00
aa9a97a051 *: show create table output utf8_bin collate. (#3076)
*: show create table output utf8_bin collate.

We only support case sensitive utf8_bin collation right now, but show create table ignored the collation.
So the dumped DDL statement doesn't contains collation option.
When the DDL statement is executed on MySQL, the collation will be changed to utf8_general_ci.
If the string column is defined as unique key, there would be duplicated key error.

This PR enforce utf8 charset and utf8_bin collation when parse a column definition, and enfore table option
`DEFAULT CHARSET=utf8 COLLATE=utf8_bin` in SHOW CREATE TABLE statement.
2017-04-18 19:54:21 +08:00