Skip to content

parser: add gitignore#2

Merged
ngaut merged 2 commits into
pingcap:masterfrom
coocood:parser-gitignor
Sep 6, 2015
Merged

parser: add gitignore#2
ngaut merged 2 commits into
pingcap:masterfrom
coocood:parser-gitignor

Conversation

@coocood
Copy link
Copy Markdown
Member

@coocood coocood commented Sep 6, 2015

parser.go and scanner.go are generated code.

parser.go and scanner.go are generated code.
@xiang90
Copy link
Copy Markdown

xiang90 commented Sep 6, 2015

Why not have a per repo one?

@c4pt0r
Copy link
Copy Markdown
Member

c4pt0r commented Sep 6, 2015

@xiang90 I agree.

@c4pt0r
Copy link
Copy Markdown
Member

c4pt0r commented Sep 6, 2015

LGTM

1 similar comment
@ngaut
Copy link
Copy Markdown
Member

ngaut commented Sep 6, 2015

LGTM

ngaut added a commit that referenced this pull request Sep 6, 2015
@ngaut ngaut merged commit c1104ff into pingcap:master Sep 6, 2015
@coocood coocood deleted the parser-gitignor branch October 18, 2017 13:58
bb7133 referenced this pull request in bb7133/tidb Aug 29, 2018
This was referenced Sep 14, 2018
bb7133 referenced this pull request in bb7133/tidb Dec 2, 2018
bb7133 referenced this pull request in bb7133/tidb Dec 6, 2018
bb7133 referenced this pull request in bb7133/tidb Dec 24, 2018
bb7133 referenced this pull request in bb7133/tidb Jan 17, 2019
coocood added a commit to coocood/tidb that referenced this pull request Apr 14, 2019
zouhuan1215 referenced this pull request in IggieWang/tidb Aug 10, 2019
Reminiscent pushed a commit to Reminiscent/tidb that referenced this pull request Aug 11, 2019
add functions to solve the decimal expression
wph95 referenced this pull request in wph95/tidb Oct 6, 2019
crazycs520 referenced this pull request in crazycs520/tidb Jan 6, 2022
* topsql: make topsql enable only be controlled by pub/sub sink (pingcap#31209)

* ddl: support batch create table  (pingcap#28763)

* executor: fix data race in IndexMergeReaderExec (pingcap#31230)

close pingcap#31229

* server: filter the EOF error for normal closed at handshake  (pingcap#31081)

close pingcap#31063

* expression: change date add function return type (pingcap#28133)

close pingcap#27573

* support create interval partition

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* support create interval partition (support int/timestamp partition key)

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* parser: support alter table partitions move engine statement

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* support ddl operation

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* support interval partition manager

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* support interval partition manager handle job framwork

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* support auto create interval partition when insert meet no partition suitable error

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix bug

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix cancel job and load old job then continue to do

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* make partition readonly work(not allow to insert/update/delete)

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* add begin,end time in tables

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* tiny fix for auto create interval partition in concurrent case

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* init

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* init

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* todo: remove flag

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix dumpling

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* remove data in aws s3 when drop/truncate table/partition

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* make hello world work

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* remove debug info

Signed-off-by: crazycs520 <crazycs520@gmail.com>

Co-authored-by: xhe <xw897002528@gmail.com>
Co-authored-by: guo-shaoge <shaoge1994@163.com>
Co-authored-by: knull-cn <hu__haifeng@163.com>
Co-authored-by: Meng Xin <tregoldmeng@gmail.com>
JmPotato added a commit to JmPotato/tidb that referenced this pull request Jan 7, 2022
zhongzc pushed a commit to zhongzc/tidb that referenced this pull request Mar 11, 2022
cartersz pushed a commit to cartersz/tidb that referenced this pull request Sep 21, 2022
cartersz pushed a commit to cartersz/tidb that referenced this pull request Sep 21, 2022
rebelice pushed a commit to rebelice/tidb that referenced this pull request Nov 21, 2022
YangKeao pushed a commit to YangKeao/tidb that referenced this pull request Dec 27, 2022
ljun0712 pushed a commit to ljun0712/tidb that referenced this pull request Mar 1, 2023
rleungx pushed a commit to rleungx/tidb that referenced this pull request Feb 26, 2024
* init

* audit: init first version of audit log

* audit: support log global rotate

* audit: update log keys

* audit: more common notify implement

* audit: add record id

* audit: rename some names

* audit: default use normal log path

* audit: add server ip info

* audit: do some refine

* audit: Add some log keys

* audit: update some item format

* audit: add stmt demo

* audit: support redact

* audit: fix bug

* audit: update filter

* audit: update filter

* audit: check user

* audit: update

* update

* audit: update

* audit: fix bug

* aduit: update

* audit: update

* update

* update

* audit: add filter unit test

* fmt

* Add tests for `tidb_audit_enabled` and `tidb_audit_log`

* Add tests for `tidb_audit_log_max_size` and `tidb_audit_log_max_lifetime`

* Add tests for `tidb_audit_log_reserved_*`

* TODO: TestAuditLogRedact

* Fininsh `TestAuditLogRedact`

* Update (pingcap#1)

* fix typo (pingcap#2)

* Add `TRANSACTION`

* rename sysvar

* audit_log_create_filter, audit_log_remove_filter

* finish function call and table test

* test privilege

* finish test for sysvar

* TODO: TestConnectionEvenClass

* update

* audit: fix lint for audit log (pingcap#1)

* audit: fix UT failure caused by the change of redact log (pingcap#3)

* audit: use `t.TempDir()` to make test stable (pingcap#4)

* audit: fix test failed for 7.1

* Add `OWNERS` file (pingcap#35)

Co-authored-by: Chao Wang <cclcwangchao@hotmail.com>

* audit: fix panic when logging sometime (pingcap#26) (pingcap#31)

* test: fix unstable test TestAuditLogReservedDays (pingcap#8)

* Format sysvar_test.go

* audit: use `StatementContext` to generate redacted SQL (pingcap#9)

* audit: fix panic when logging sometime (pingcap#26)

* update

* add owner

* Update OWNERS

---------

Co-authored-by: CbcWestwolf <1004626265@qq.com>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>

* audit: fix panic sometimes when `create user` without password (pingcap#37) (pingcap#39)

* This is an automated cherry-pick of pingcap#37

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>

* fix conflict

---------

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Co-authored-by: 王超 <cclcwangchao@hotmail.com>

* extension/audit: introduce serverless audit log

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* update bazel config

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* support enable audit log when activate

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* add gwconnid to audit log

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* comment unstable test

* update bazel

* add log about activate request

* diff audit log enabled

* audit: fix memory leak for executeSQL (pingcap#44) (pingcap#45)

* This is an automated cherry-pick of pingcap#44

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>

* Update util.go

---------

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Co-authored-by: 王超 <cclcwangchao@hotmail.com>

* Update extension/serverless/OWNERS

---------

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>
Co-authored-by: Chao Wang <cclcwangchao@hotmail.com>
Co-authored-by: cbcwestwolf <1004626265@qq.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>
Co-authored-by: zzm <zhouzemin@pingcap.com>
Co-authored-by: Yuqing Bai <baiyuq@gmail.com>
guoshouyan pushed a commit to guoshouyan/tidb that referenced this pull request Mar 5, 2024
Cherry-picking lightning 6.5.4
crazycs520 added a commit that referenced this pull request Oct 13, 2025
…#2)

This PR is for synchronizing the upstream master of TiDB with the feature/tidbx-on-v8.5.1 branch.

Co-authored-by: crazycs520 <chenshuang@pingcap.cn>
Co-authored-by: lance6716 <tianyuan@pingcap.cn>
Co-authored-by: ZierZhao <zhaoyilin@pingcap.cn>
Co-authored-by: Brahmamantra <2033552517@qq.com>
Co-authored-by: VGalaxies <yuchen.ding@pingcap.cn>
Co-authored-by: Z Fan <2033552517@qq.com>
Co-authored-by: crazycs520 <crazycs520@gmail.com>
Reviewed-on: https://git.pingcap.net/pingkai/tidb/pulls/2
Reviewed-by: crazycs520 <chenshuang@pingcap.cn>
Co-authored-by: zhou fan <zhou.fan@pingcap.cn>
Co-committed-by: zhou fan <zhou.fan@pingcap.cn>
YuhaoZhang00 added a commit to YuhaoZhang00/tidb that referenced this pull request Apr 27, 2026
Move the per-RPC trace log line up to fire on the terminal (region
drained, range == nil) branch as well as the non-terminal paging path
that was already covered. Add a 'terminal' boolean so offline analysis
can distinguish the two:

  - terminal=false → non-terminal paging RPC (region not yet drained).
                     Same population as the EMA training set below.
                     Whether each such RPC was capped by rows, time, or
                     bytes depends on tidb_paging_size_bytes — the log
                     does not care.
  - terminal=true  → TiKV's executor drained the region (scenario A
                     natural tail of a large region; scenario B a small
                     region scanned in one RPC). Previously not logged
                     at all, which left a >50%% sample blind spot vs PD's
                     paging_prediction_residual_bytes histogram.

The terminal signal is purely 'region drained', not 'byte budget hit',
so this fix applies uniformly to all paging modes including
tidb_paging_size_bytes=0 (rows/time-driven paging).

The region/lock retry path is intentionally still NOT logged: predicted
vs actual aren't comparable on a retry, and emitting them would only
muddy residual analysis.

The EMA Observe site stays where it is. Only non-terminal paging RPCs
feed the predictor, since they are the only sample class whose 'next of
the same kind' is well-defined within a (iter, region) sequence.
Including terminal samples in the EMA would pull predictions below the
typical mid-region size, under-charging the next non-terminal RPC at
pre-charge time and weakening tier protection.

Net effect: the log row set becomes a strict superset of the EMA
training set, with the EMA-comparable subset recoverable by filtering
terminal=false. This closes the observability blind spot (R7 follow-up
pingcap#2) where Grafana's PD-side residual histogram saw p50 ~= -14 MiB while
log analysis saw p50 ~= 0, the gap being entirely unlogged terminal
RPCs.

Signed-off-by: Yuhao Zhang <yhzhang00@outlook.com>
YuhaoZhang00 added a commit to YuhaoZhang00/tidb that referenced this pull request Apr 27, 2026
Move the per-RPC trace log line up to fire on the terminal (region
drained, range == nil) branch as well as the non-terminal paging path
that was already covered. Add a 'terminal' boolean so offline analysis
can distinguish the two:

  - terminal=false → non-terminal paging RPC (region not yet drained).
                     Same population as the EMA training set below.
                     Whether each such RPC was capped by rows, time, or
                     bytes depends on tidb_paging_size_bytes — the log
                     does not care.
  - terminal=true  → TiKV's executor drained the region (scenario A
                     natural tail of a large region; scenario B a small
                     region scanned in one RPC). Previously not logged
                     at all, which left a >50%% sample blind spot vs PD's
                     paging_prediction_residual_bytes histogram.

The terminal signal is purely 'region drained', not 'byte budget hit',
so this fix applies uniformly to all paging modes including
tidb_paging_size_bytes=0 (rows/time-driven paging).

The region/lock retry path is intentionally still NOT logged: predicted
vs actual aren't comparable on a retry, and emitting them would only
muddy residual analysis.

The EMA Observe site stays where it is. Only non-terminal paging RPCs
feed the predictor, since they are the only sample class whose 'next of
the same kind' is well-defined within a (iter, region) sequence.
Including terminal samples in the EMA would pull predictions below the
typical mid-region size, under-charging the next non-terminal RPC at
pre-charge time and weakening tier protection.

Net effect: the log row set becomes a strict superset of the EMA
training set, with the EMA-comparable subset recoverable by filtering
terminal=false. This closes the observability blind spot (R7 follow-up
pingcap#2) where Grafana's PD-side residual histogram saw p50 ~= -14 MiB while
log analysis saw p50 ~= 0, the gap being entirely unlogged terminal
RPCs.

Signed-off-by: Yuhao Zhang <yhzhang00@outlook.com>
premal added a commit to 6si/tidb that referenced this pull request May 4, 2026
EXPLAIN showed p2023_s0 for a 2024 date range query because PartitionPruning
for RANGE+shard tables only did shard-slot pruning (all logical partitions
survive) and returned flat index 0 (p2023_s0) when slot 0 matched.

Fix: add pruneShardedRangeDynamic (dynamic mode) and processShardedRangePartition
(static mode) — both perform two-stage pruning:
  1. RANGE pruning on logical partitions via pruneRangePartition + original PI
  2. Shard-slot pruning via pruneShardKeyPartition on flat PI
  3. Intersect: surviving flat indices = partIdx*shardCnt + slot

With this fix, EXPLAIN for `WHERE created_at BETWEEN 2024... AND company_id=42`
correctly shows only p2024_s0 (or whichever slot company_id hashes to).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
takaidohigasi added a commit to takaidohigasi/tidb that referenced this pull request May 17, 2026
Fixes for D3Hunter's review on pingcap#68028:

[Blocker] Dual-password clauses are parsed but ignored by execution
  - Add executor stubs that reject RETAIN CURRENT PASSWORD / DISCARD
    OLD PASSWORD with ER_NOT_SUPPORTED_YET in executeAlterUser and
    executeSetPwd. Full execution / privilege / storage logic lives in
    the follow-up PR pingcap#68393.
  - Expose exeerrors.ErrNotSupportedYet for callers (was previously
    only available via dbterror.ClassExecutor.NewStd inline).
  - New TestDualPasswordParserOnlyStub in passwordtest to pin the
    stub's behavior.

[Major pingcap#2] CREATE USER accepted dual-password clauses outside MySQL grammar
  - Drop the CreateUserSpec/CreateUserSpecList non-terminals and route
    CREATE USER back through the original UserSpec/UserSpecList chain.
    CREATE USER + RETAIN/DISCARD is now a parser-level syntax error,
    matching MySQL.

[Major pingcap#3] ALTER USER over-accepted invalid RETAIN combinations
  - Introduce AuthOptionWithPassword (the BY-form subset of AuthOption)
    and restructure AlterUserSpec to bind RETAIN only to that subset.
    Reject at parse time:
      ALTER USER u IDENTIFIED WITH plugin AS '<hash>' RETAIN ...
      ALTER USER u IDENTIFIED WITH plugin RETAIN ...
      ALTER USER u RETAIN CURRENT PASSWORD (no auth)
      ALTER USER u IDENTIFIED BY '...' DISCARD OLD PASSWORD
  - DISCARD becomes its own AlterUserSpec variant (no auth-option
    coexists with it).

[Major pingcap#4] Grammar label/documentation contradiction
  - Drop the misleading 'unsupported dual password option' label on the
    deleted CreateUserSpec; rewrite UserSpec/AlterUserSpec labels to
    state the contract accurately.

[Major pingcap#5] Generic *PasswordOrLockOption type was overloaded
  - Introduce dedicated ast.DualPasswordOption and
    ast.DualPasswordOptionType (with DualPasswordRetainCurrent /
    DualPasswordDiscardOld). UserSpec.DualPasswordOption now uses the
    dedicated type. Remove the RetainCurrentPassword and
    DiscardOldPassword iota entries from PasswordOrLockOption.

[Minor pingcap#6] ALTER USER USER() branch
  - USER() still does not route through AlterUserSpecList; dual-password
    on USER() is now a parse-time syntax error (covered by negative test).

[Minor pingcap#7] Parser tests had no negative coverage
  - Add explicit ok=false rows for CREATE USER + RETAIN, the AS-hash +
    RETAIN form, bare RETAIN with no auth, plain BY + DISCARD,
    bare-plugin + RETAIN, and ALTER USER USER() + RETAIN.

[Minor pingcap#8] CREATE/ALTER user-spec grammar duplication
  - Now naturally eliminated because CREATE USER reuses UserSpec.

Behavior PR (pingcap#68393) needs to:
  - Remove the executor stubs added here.
  - Adopt the new ast.DualPasswordOption / DualPasswordOptionType
    symbols (the iota entries it currently consumes are gone).

Ref pingcap#60587
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants