Skip to content

Improve Documentation: various corrections of the English usage i… - #4

Merged
ngaut merged 1 commit into
pingcap:masterfrom
chuchao333:feature/improve-readmes-enlish-usage
Sep 6, 2015
Merged

ngaut merged 1 commit into
pingcap:masterfrom
chuchao333:feature/improve-readmes-enlish-usage

Conversation

@chuchao333

Copy link
Copy Markdown
Contributor

Thanks for sharing the great work! Just try to improve the README as I am reading through it.

@c4pt0r

c4pt0r commented Sep 6, 2015

Copy link
Copy Markdown
Member

Good job!
LGTM

@ngaut

ngaut commented Sep 6, 2015

Copy link
Copy Markdown
Member

LGTM

1 similar comment
@shenli

shenli commented Sep 6, 2015

Copy link
Copy Markdown
Member

LGTM

ngaut added a commit that referenced this pull request Sep 6, 2015
…usage

Improvement Documentation: various corrections of the English usage i…
@ngaut
ngaut merged commit b7e5674 into pingcap:master Sep 6, 2015
@chuchao333 chuchao333 changed the title Improvement Documentation: various corrections of the English usage i… Improve Documentation: various corrections of the English usage i… Sep 6, 2015
@chuchao333
chuchao333 deleted the feature/improve-readmes-enlish-usage branch September 6, 2015 07:30
IggieWang referenced this pull request in IggieWang/tidb Aug 11, 2019
finish virtual index DDL statement
wph95 referenced this pull request in wph95/tidb Oct 6, 2019
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
windtalker referenced this pull request in windtalker/tidb Apr 22, 2020
basic cbo support for broadcast join
Deardrops pushed a commit to Deardrops/tidb that referenced this pull request May 15, 2020
privilege: support login fail count and account blacklist
abbccdda pushed a commit to abbccdda/tidb that referenced this pull request Jan 16, 2021
store: make network cost threshold as a Variable
djshow832 referenced this pull request in djshow832/tidb Mar 12, 2021
set staleness for transaction
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
* package for hanlding key-value operations

* with error checks

* kv encode now support execute sql convert in 'prepare statement' mode

* address comment

* address comment
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
knull-cn added a commit to knull-cn/tidb that referenced this pull request Dec 31, 2021
TszKitLo40 pushed a commit to TszKitLo40/tidb that referenced this pull request Jan 3, 2022
crazycs520 referenced this pull request in crazycs520/tidb Jan 6, 2022
create `aws` SQL, support WHERE for TableScan and Selection
AilinKid added a commit to AilinKid/tidb that referenced this pull request Mar 2, 2022
sleepymole referenced this pull request in sleepymole/tidb Aug 22, 2022
Fine tuning dry-run in order to avoid recover-data
zhongzc pushed a commit to zhongzc/tidb that referenced this pull request Feb 2, 2023
keeplearning20221 added a commit to keeplearning20221/tidb that referenced this pull request Feb 13, 2023
…ules/golang.org/x/oauth2-0.5.0

build(deps): bump golang.org/x/oauth2 from 0.2.0 to 0.5.0
ljun0712 pushed a commit to ljun0712/tidb that referenced this pull request Mar 1, 2023
qw4990 added a commit to qw4990/tidb that referenced this pull request Jun 21, 2023
# This is the 1st commit message:

fixup

# This is the commit message #2:

fixup

# This is the commit message pingcap#3:

fixup

# This is the commit message pingcap#4:

fixup

# This is the commit message pingcap#5:

fixup

# This is the commit message pingcap#6:

fixup
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
…oschema cache size and refine metric (pingcap#46684) (pingcap#4)

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

Signed-off-by: crazycs520 <crazycs520@gmail.com>
Co-authored-by: crazycs <crazycs520@gmail.com>
gengliqi pushed a commit to gengliqi/tidb that referenced this pull request Feb 28, 2026
premal referenced this pull request in 6si/tidb May 4, 2026
Bug #4 — panic in PointGetPlan.AccessObject and LoadTableStats when a
partitioned+sharded table is accessed by PK/index on UPDATE/DELETE.
GetPartitionIdxByRow returns a flat shard index (partIdx*shardCnt+slot)
which was used directly to index pi.Definitions (original partition count),
causing index-out-of-range. Fix maps flat→logical via idx/ShardCnt before
indexing the original PI for display (access_object.go, point_get_plan.go)
and resolves to the physical shard ID for KV access (GetPhysID in executor).

Bug #1 — PointGetPlan misroutes PK-only queries on sharded tables to the
wrong shard because locateShard hashes a zero shard-key column value.
Fix: decline to generate PointGetPlan when the predicate omits the shard key;
queries like WHERE id=X fall back to a table scan covering all shards.

Bug #3 — RANGE/HASH/KEY+shard tables with a shard-only filter always pruned
to partition p0 because PartitionPruning called pruneShardKeyPartition
directly (returning flat indices only in the first partition's range).
Fix: use pruneShardedRangeOrHashDynamic which expands matched shard slots
across all logical partitions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
premal referenced this pull request in 6si/tidb May 4, 2026
Adds 7 unit tests to shard_test.go covering the flatIdx arithmetic,
shardForRow bounds safety, rebuildShards post-DROP-PARTITION, and
PartitionExpr staleness detection. Tests run without a live cluster
and directly exercise the 4×4 layout (4 partitions × 4 shards) that
triggered the OOB panic in production (Bug #4).

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 #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
takaidohigasi added a commit to takaidohigasi/tidb that referenced this pull request Jun 3, 2026
…dant read

Code-review findings (recall pass):

#1 (security, privilege escalation): cross-user RETAIN/DISCARD let a caller
with only APPLICATION_PASSWORD_ADMIN reset another account's primary
password — executeSetPwd's cross-user RETAIN branch skipped the SUPER
check, and executeAlterUser's dualPwdBypass substituted
APPLICATION_PASSWORD_ADMIN for CREATE USER. Realigned to the MySQL 8.0
contract: self-account RETAIN/DISCARD requires APPLICATION_PASSWORD_ADMIN
(CREATE USER / UPDATE-mysql also suffice); cross-account requires the
normal ALTER USER / SET PASSWORD authority (CREATE USER / SUPER), for
which APPLICATION_PASSWORD_ADMIN is NOT a substitute.

pingcap#5 (altitude): the self-service bypass is no longer expressed via an
APPLICATION_PASSWORD_ADMIN substitution into the admin gate; it is a
narrow self-account-only relaxation with a documented default-deny posture
(a forgotten statement-option field falls back to requiring admin
authority, not to bypassing it).

pingcap#3 (compat): DISCARD OLD PASSWORD is no longer gated on plugin capability
— only RETAIN is. DISCARD on an LDAP/socket/token account is now a
harmless no-op (matching MySQL) instead of an error.

pingcap#4 (compat): DISCARD that empties user_attributes now collapses the result
to NULL via NULLIF rather than storing a literal '{}', matching MySQL and
the NULL-preserving behavior in deletePasswordLockingAttribute.

pingcap#6 (efficiency): RETAIN no longer issues a second FOR UPDATE read for the
old authentication_string — userExistsInternal now returns it from the row
it already locked, and buildAdditionalPasswordEntry takes the hash
directly. Removed the now-unused readAuthenticationString helper.

Tests: updated dual_password.test / dual_password_test.go to the corrected
privilege model and added regressions for empty-primary secondary login,
DISCARD-no-op-on-LDAP, {}->NULL collapse, and cross-user APP-only denial.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mjonss added a commit to mjonss/tidb that referenced this pull request Jun 28, 2026
…paths, not yet done

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mjonss added a commit to mjonss/tidb that referenced this pull request Jun 28, 2026
…ingcap#4)

Recognize a Sort/TopN whose ByItems is ST_Distance(col, const) over a SRID-0 point
spatial-index column directly above a DataSource, and rewrite the geometry operand to
Point(ST_X, ST_Y) reconstructed from the in-index bbox columns. Point(ST_X(p),ST_Y(p))
== p, so the order is unchanged; the geometry column then has no remaining reference for
a SELECT that does not project it, the second column-pruning pass drops it, and the
order-by is served index-only (IndexFullScan — no table read, no EWKB decode).

This narrows the scan (avoids the wide table rows + EWKB decode). It does NOT add spatial
pruning: it is still an O(n) index scan + TopN, not a best-first / expanding-cell search
(that would need a new physical operator). Queries that do project the geometry remain
correct via a normal table scan (one extra Point reconstruction in the distance).

Verified (TestPOCSpatialKNN): SELECT id ORDER BY ST_Distance(p,const) LIMIT 5 yields an
IndexReader/IndexFullScan with no TableReader/TableRowIDScan, and the top-k matches the
IGNORE INDEX full-scan baseline exactly; projecting the geometry stays correct.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants