This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go | |
index 3897f926..efbe7bf0 100644 | |
--- a/server/cluster/cluster.go | |
+++ b/server/cluster/cluster.go | |
@@ -49,6 +49,7 @@ import ( | |
"github.com/tikv/pd/server/schedule/checker" | |
"github.com/tikv/pd/server/schedule/hbstream" | |
"github.com/tikv/pd/server/schedule/labeler" | |
+ "github.com/tikv/pd/server/schedule/operator" | |
"github.com/tikv/pd/server/schedule/placement" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH histogram AS ( | |
SELECT | |
digest, | |
CASE | |
WHEN bucket_timer_low > 10000000000000 THEN '10s' | |
WHEN bucket_timer_low > 1000000000000 THEN '1s' | |
WHEN bucket_timer_low > 100000000000 THEN '100ms' | |
WHEN bucket_timer_low > 10000000000 THEN '10ms' | |
WHEN bucket_timer_low > 1000000000 THEN '1ms' | |
WHEN bucket_timer_low > 100000000 THEN '100us' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
thr.processlist_id AS mysql_thread_id, | |
FORMAT_PICO_TIME(trx.timer_wait) as trx_duration, | |
COUNT(case when lock_status='GRANTED' then 1 else null end) AS row_locks_held, | |
COUNT(case when lock_status='PENDING' then 1 else null end) AS row_locks_pending, | |
GROUP_CONCAT(DISTINCT CONCAT(object_schema, '.', object_name)) AS tables_with_locks | |
FROM | |
performance_schema.events_transactions_current trx | |
INNER JOIN performance_schema.threads thr USING (thread_id) | |
LEFT JOIN data_locks USING (thread_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"database/sql" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"sync" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source ./sb_include | |
# Setup DM between sandboxes | |
SOURCE=$1 | |
if [ -z "$SOURCE" ]; then | |
echo "Usage: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
killall -9 dm-master | |
killall -9 dm-worker | |
# Setup DM between sandboxes | |
MYSQL_PORT="5725" | |
TIDB_PORT="3000" | |
echo "Downloading required packages" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MySQL [test]> create table t1 (a int not null primary key auto_increment, b char(255)); | |
Query OK, 0 rows affected (0.51 sec) | |
MySQL [test]> create table t2 (a char(255) not null primary key, b char(255)); | |
Query OK, 0 rows affected (0.51 sec) | |
MySQL [test]> INSERT INTO t1 values (1, 'aaa'); | |
Query OK, 1 row affected (0.15 sec) | |
MySQL [test]> INSERT INTO t2 values ('aaa', 'aaa'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
morgo@ryzen:~/go/src/github.com/pingcap/tidb$ git diff | |
diff --git a/util/charset/charset_test.go b/util/charset/charset_test.go | |
index c400d97f..931b78ac 100644 | |
--- a/util/charset/charset_test.go | |
+++ b/util/charset/charset_test.go | |
@@ -17,6 +17,8 @@ import ( | |
"testing" | |
. "github.com/pingcap/check" | |
+ "github.com/pingcap/tidb/store/mockstore" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initial Data does not make sense | |
# should be either "Harvey Dent" or "Two Face" | |
id: 1, firstname: "Two Face", lastname: "Dent" | |
# Assume RR isolation | |
session1.start | |
session2.start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table department ( | |
id bigint not null, | |
budget bigint not null, | |
name varchar(255), | |
primary key (id) | |
) ENGINE=InnoDB; | |
create table employee ( |
NewerOlder