profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/gregwebs/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

code-lts/jquery-uitablefilter 58

small plugin for filtering (hiding) table rows based on their text content

gregwebs/aeson-applicative 6

define To/From JSON instances from one applicative definition

gregwebs/blog.gregweber.info 3

Greg Weber's Blog

gregwebs/ar-mysql-bit-boolean 2

Add support for MySQL's bit(1) as a boolean

gregwebs/dlist-instances 2

orphan instances for dlist

ArnoVanLumig/azurify 1

Azure blob storage client

gregwebs/contracts.coffee 1

Contracts for CoffeeScript

gregwebs/docker-haskell-dev 1

Dockerfiles for haskell development

gregwebs/amazon-ecs-agent 0

Amazon EC2 Container Service Agent

pull request commentpingcap/tidb

domain: fix the `@@tidb_enable_local_txn` sync bug

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

<details>

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review. </details>

<!--Review Notification Identifier-->

JmPotato

comment created time in a few seconds

PR opened pingcap/tidb

domain: fix the `@@tidb_enable_local_txn` sync bug

Signed-off-by: JmPotato ghzpotato@gmail.com

What problem does this PR solve?

Make @@tidb_enable_local_txn sync between TiDB instances globally.

What is changed and how it works?

Add TiDBEnableLocalTxn variable to the checkEnableServerGlobalVar function.

Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

On TiDB-0:

image

Then on TiDB-1:

image

Release note <!-- bugfixes or new feature need a release note -->

  • No release note.
+2 -0

0 comment

1 changed file

pr created time in a few seconds

pull request commentpingcap/tidb

*: Test cleanup

This pull request has been accepted and is ready to merge. <details>Commit hash: bc498bc13a2e2b5c53d103ff6b9abde40b2faf51</details>

mjonss

comment created time in a few seconds

pull request commentpingcap/tidb

*: Test cleanup

/merge

mjonss

comment created time in a minute

pull request commentpingcap/tidb

*: Test cleanup

/run-all-tests

mjonss

comment created time in 9 minutes

Pull request review commentpingcap/tidb

executor: Let the SHUTDOWN statement do a graceful shutdown

 func (e *SimpleExec) executeShutdown(s *ast.ShutdownStmt) error { // This function need to run with async model, otherwise it will block main coroutine func asyncDelayShutdown(p *os.Process, delay time.Duration) { 	time.Sleep(delay)-	err := p.Kill()+	// Send SIGTERM instead of SIGKILL to allow graceful shutdown and cleanups to work properly.+	err := p.Signal(syscall.SIGTERM)+	if err != nil {+		panic(err)+	}++	// Sending SIGKILL should not be needed as SIGTERM should cause a graceful shutdown after+	// n seconds as configured by the GracefulWaitBeforeShutdown. This is here in case that doesn't+	// work for some reason.+	graceTime := config.GetGlobalConfig().GracefulWaitBeforeShutdown+	if graceTime < 5 {+		graceTime = 5+	}+	time.Sleep(time.Second * time.Duration(graceTime*2))

Why wait double the grace period? I think it is more predictable to wait exactly the graceTime.

dveeden

comment created time in 14 minutes

Pull request review commentpingcap/tidb

executor: Let the SHUTDOWN statement do a graceful shutdown

 func (e *SimpleExec) executeShutdown(s *ast.ShutdownStmt) error { // This function need to run with async model, otherwise it will block main coroutine func asyncDelayShutdown(p *os.Process, delay time.Duration) { 	time.Sleep(delay)-	err := p.Kill()+	// Send SIGTERM instead of SIGKILL to allow graceful shutdown and cleanups to work properly.+	err := p.Signal(syscall.SIGTERM)+	if err != nil {+		panic(err)+	}++	// Sending SIGKILL should not be needed as SIGTERM should cause a graceful shutdown after+	// n seconds as configured by the GracefulWaitBeforeShutdown. This is here in case that doesn't+	// work for some reason.+	graceTime := config.GetGlobalConfig().GracefulWaitBeforeShutdown+	if graceTime < 5 {+		graceTime = 5+	}+	time.Sleep(time.Second * time.Duration(graceTime*2))+	logutil.BgLogger().Info("Killing process as grace peroid is over", zap.Int("pid", p.Pid))
	logutil.BgLogger().Info("Killing process as grace period is over", zap.Int("pid", p.Pid), zap.Init("graceTime", graceTime))
dveeden

comment created time in 15 minutes

push eventpingcap/tidb

Zhuhe Fang

commit sha 9ca449b8bd3aee6115cf5037e6d75fa71bc0e540

planner: enforce projection push down (#25450)

view details

push time in 39 minutes

PR merged pingcap/tidb

Reviewers
planner: enforce projection push down sig/execution size/L status/LGT2 status/can-merge

<!-- Thank you for contributing to TiDB!

PR Title Format:

  1. pkg [, pkg2, pkg3]: what's changed
  2. *: what's changed

-->

What problem does this PR solve?

Issue Number: close #xxx <!-- REMOVE this line if no issue to close -->

Problem Summary: if enforced MPP, we push down projection to tiflash.

What is changed and how it works?

Proposal: xxx <!-- REMOVE this line if not applicable -->

What's Changed:

How it Works:

Related changes

  • Need to cherry-pick to the release branch

Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

  • Integration test

Release note <!-- bugfixes or new feature need a release note -->

  • No release note<!-- Please write a release note here to describe the change you made when it is released to the users of TiDB. If your PR doesn't involve any change to TiDB(like test enhancements, RFC proposals...), you can write No release note. -->
+147 -108

9 comments

6 changed files

fzhedu

pr closed time in 39 minutes

pull request commentpingcap/tidb

planner: enforce projection push down

@fzhedu: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

<details>

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. </details>

fzhedu

comment created time in an hour

push eventpingcap/tidb

Weizhen Wang

commit sha 3602ddd44a6562f231c3739be497ae8d430a746a

planner: generate wrong plan when update has subquery (#25660)

view details

push time in an hour

issue commentpingcap/tidb

Return wrong result when UPDATE's assignment_list has subquery

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added Example for how to fill out the template: https://github.com/pingcap/tidb/issues/20100

1. Root Cause Analysis (RCA) (optional)

<!-- Write down the reason why this bug occurs -->

2. Symptom (optional)

<!-- What will the user see when this bug occurs. The error message may be in the terminal, log or monitoring -->

3. All Trigger Conditions (optional)

<!-- All the user scenarios that may trigger this bug -->

4. Workaround (optional)

5. Affected versions

<!-- In the format of [start_version:end_version], multiple version ranges are accepted. If the bug only affects the unreleased version, please input: "unreleased". For example:

Notes:

  1. Do not use any white spaces in '[]'.
  2. The range in '[]' is a closed interval
  3. The version format is v$Major.$Minor.$Patch, the $Majoy and $Minor number in a version range should be the same. [v3.0.1:v3.1.2] is invalid because the $Minor number of the version range is different.

Example 1: [v3.0.1:v3.0.5], [v4.0.1:v4.0.5] Example 2: unreleased -->

6. Fixed versions

<!-- The first released version that contains this fix in each minor version. If the bug's affected version has been released, the fixed version should be a detailed version number; If the bug doesn't affect any released version, the fixed version can be "master";

Example 1: v3.0.13, v4.0.5 Example 2: master -->

hawkingrei

comment created time in an hour

PR merged pingcap/tidb

Reviewers
planner: generate wrong plan when update has subquery size/S status/LGT2 status/can-merge

Signed-off-by: Weizhen Wang wangweizhen@pingcap.com

<!-- Thank you for contributing to TiDB!

PR Title Format:

  1. pkg [, pkg2, pkg3]: what's changed
  2. *: what's changed

-->

What problem does this PR solve?

Issue Number: close #25658

Problem Summary:

What is changed and how it works?

if finding the subquery in the UPDATE's assignment list, the point_get return null.

What's Changed:

How it Works:

it change plan. the plan is shown below. image

Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

  • Manual test
CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL,
  `name` longtext DEFAULT NULL,
  `age` bigint(20) unsigned DEFAULT NULL,
  `company_id` bigint(20) DEFAULT NULL,
  `manager_id` bigint(20) unsigned DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  `created_at` datetime(3) DEFAULT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  `deleted_at` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_users_deleted_at` (`deleted_at`)
);
insert into users(id, company_id, name, updated_at) values(239, 15, 'Company 2 id 15', '2021-03-01 12:12:12.987');
create table companies(id bigint primary key, name longtext default null);
insert into companies values(14, 'Company 1 id 14');
insert into companies values(15, 'Company 2 id 15');
UPDATE `users` SET `company_id`=14,`name`=(SELECT `name` FROM `companies` WHERE companies.id = users.company_id),`updated_at`='2021-04-27 10:28:31.459' WHERE `id` = 239;

Release note

  • No release note
+19 -0

11 comments

2 changed files

hawkingrei

pr closed time in an hour

issue closedpingcap/tidb

Return wrong result when UPDATE's assignment_list has subquery

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL,
  `name` longtext DEFAULT NULL,
  `age` bigint(20) unsigned DEFAULT NULL,
  `company_id` bigint(20) DEFAULT NULL,
  `manager_id` bigint(20) unsigned DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  `created_at` datetime(3) DEFAULT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  `deleted_at` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_users_deleted_at` (`deleted_at`)
);
insert into users(id, company_id, name, updated_at) values(239, 15, 'Company 2 id 15', '2021-03-01 12:12:12.987');
create table companies(id bigint primary key, name longtext default null);
insert into companies values(14, 'Company 1 id 14');
insert into companies values(15, 'Company 2 id 15');
UPDATE `users` SET `company_id`=14,`name`=(SELECT `name` FROM `companies` WHERE companies.id = users.company_id),`updated_at`='2021-04-27 10:28:31.459' WHERE `id` = 239;

2. What did you expect to see? (Required)

select * from users;

name is not null

3. What did you see instead (Required)

image

but it is null

4. What is your TiDB version? (Required)

master branch <!-- Paste the output of SELECT tidb_version() -->

closed time in an hour

hawkingrei

pull request commentpingcap/tidb

planner: generate wrong plan when update has subquery

@hawkingrei Please try to check if #25658 can be reproduced in v4.0, v5.0 & v5.1, so that we will decide how many branches that backports would be needed.

OK

hawkingrei

comment created time in an hour

pull request commentpingcap/tidb

planner: generate wrong plan when update has subquery

@hawkingrei Please try to check if #25658 can be reproduced in v4.0, v5.0 & v5.1, so that we will decide how many branches that backports would be needed.

hawkingrei

comment created time in an hour

pull request commentpingcap/tidb

executor: make show create table show index comments

@xhebox: /merge is only allowed for the committers, you can assign this pull request to the committer in list by filling /assign @committer in the comment to help merge this pull request.

<details>

In response to this:

/merge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. </details>

dveeden

comment created time in an hour

pull request commentpingcap/tidb

executor: make show create table show index comments

/merge

dveeden

comment created time in an hour

pull request commentpingcap/tidb

executor: make show create table show index comments

@xhebox: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

<details>

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. </details>

dveeden

comment created time in an hour

pull request commentpingcap/tidb

planner: generate wrong plan when update has subquery

@hawkingrei: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

<details>

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. </details>

hawkingrei

comment created time in an hour

pull request commentpingcap/tidb

planner: generate wrong plan when update has subquery

This pull request has been accepted and is ready to merge. <details>Commit hash: 74bca01a7ad23d1fe2b8e757f302dc6b59ccb1c4</details>

hawkingrei

comment created time in an hour

pull request commentpingcap/tidb

planner: generate wrong plan when update has subquery

/merge

hawkingrei

comment created time in an hour

pull request commentpingcap/tidb

*: Test cleanup

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • xhebox

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

<details>

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review. </details>

<!--Review Notification Identifier-->

mjonss

comment created time in an hour

pull request commentpingcap/tidb

planner: generate wrong plan when update has subquery

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AilinKid
  • bb7133

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

<details>

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review. </details>

<!--Review Notification Identifier-->

hawkingrei

comment created time in an hour

pull request commentpingcap/docs

system-variables: update for consistency

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • dveeden

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

<details>

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review. </details>

<!--Review Notification Identifier-->

morgo

comment created time in an hour

Pull request review commentpingcap/tidb

util: Automatically create TLS certificates

 type SequenceTable interface { // LoadTLSCertificates loads CA/KEY/CERT for special paths. func LoadTLSCertificates(ca, key, cert string) (tlsConfig *tls.Config, err error) { 	if len(cert) == 0 || len(key) == 0 {-		return+		tempStoragePath := config.GetGlobalConfig().TempStoragePath+		cert = tempStoragePath + "/cert.pem"

+1, @dveeden Could you update this?

dveeden

comment created time in an hour

pull request commentpingcap/tidb

executor: make show create table show index comments

/cc @pingcap/sql-infra-reviewers

dveeden

comment created time in an hour

pull request commentpingcap/tidb

executor: make show create table show index comments

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

<details>

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review. </details>

<!--Review Notification Identifier-->

dveeden

comment created time in an hour

pull request commentpingcap/docs

tidb-configuration-file: add graceful-wait-before-shutdown

/uncc bb7133

dveeden

comment created time in an hour

pull request commentpingcap/docs

tidb-configuration-file: add graceful-wait-before-shutdown

I'm not a reviewer, PTAL @TomShawn

dveeden

comment created time in an hour