Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
18e1bde
healthcheck: refactor stream timeout code
sougou May 8, 2018
0f3a18e
healthcheck: refactor locking scheme
sougou May 8, 2018
2debc94
healthcheck: address review comments.
sougou May 26, 2018
a939f11
healthcheck: fix data race
sougou May 26, 2018
de45de6
healthcheck: address comments
sougou Oct 9, 2018
e9ff5d9
Implementing authorization rotation for static files
avaidyanatha Oct 20, 2018
4409977
parser: fix possible attack vector
sougou Oct 21, 2018
b26386f
mysql: add password tests for AuthServerStatic
jfontan Oct 24, 2018
d665159
vtctl: add new BackupShard cmd
derekperkins Oct 28, 2018
352995c
Improve warning so it's not that verbose.
Oct 29, 2018
8c0ec16
vtctl: move commandBackup to backup.go
derekperkins Oct 28, 2018
a785874
Merge pull request #4297 from planetscale/ss-safe-ddl
demmer Oct 29, 2018
525d7f7
Merge pull request #4325 from tinyspeck/make-warning-less-verbose
demmer Oct 29, 2018
ee89e01
Merge pull request #4320 from derekperkins/backup-shard
sougou Oct 29, 2018
6c36b57
change s3_backup_aws_region flag to `""`
Oct 30, 2018
3db5b2f
Merge pull request #4326 from slanning/s3-endpoint-default-fix
demmer Oct 30, 2018
a931137
ddl: support multi-table statements
sougou Oct 30, 2018
4a25d55
rebase PR #3450, fix unit test and worker test
deepthi Oct 31, 2018
07650bc
vtgate planbuilder: name generation for subqueries
sougou Apr 9, 2018
a372d9f
vtgate: subquery support
sougou Apr 12, 2018
9c64a05
subqueries: rebase master
sougou Oct 31, 2018
b9abb67
Adds new state to know that a diff has failed early
Sep 20, 2018
9bbfaf6
No panic when could not find glog flag.
Oct 31, 2018
abf0e51
Let PMM client wait for mysql.sock
Oct 31, 2018
b0c06ba
Update pmm-client with procps fix
Oct 31, 2018
9568d1b
Implementing mutex for a.Entries to prevent race conditions
avaidyanatha Oct 31, 2018
6fca997
Merge pull request #4330 from msolters/patch-1
sougou Oct 31, 2018
0c1a439
docker: source vtctlclient from k8s image
derekperkins Oct 28, 2018
be81a56
docker: add vtctlclient binary + install jq
derekperkins Oct 28, 2018
0dda090
docker: add busybox binary to mysqlctld
derekperkins Oct 31, 2018
970555b
fix cancelVerticalResharding so that Master is back in serving state
deepthi Oct 31, 2018
7c1e60c
docker: move apt-get to top of Dockerfile
derekperkins Nov 1, 2018
448413c
helm: reparent on vttablet preStop hook
derekperkins Nov 1, 2018
6572cca
respect wait_slave_timeout during InitShardMaster and PlannedReparent…
deepthi Nov 3, 2018
bd3aed8
Merge pull request #4103 from derekperkins/lifecycle
sougou Nov 4, 2018
9e40c49
Merge pull request #4209 from systay/diff-failed-state
sougou Nov 4, 2018
2437ee4
Merge pull request #4294 from planetscale/abhi-auth-rotation
sougou Nov 4, 2018
bde5ab2
Merge pull request #4327 from planetscale/ss-multi-ddl
sougou Nov 4, 2018
041f2a0
Merge pull request #4328 from kuba--/no-panic
sougou Nov 4, 2018
be5efd9
Merge pull request #4335 from planetscale/ds-reparent-wait-slave-timeout
sougou Nov 4, 2018
e383487
Adding AllowUnsafeDMLs in vttablet configuration
May 17, 2018
54855ec
Merge pull request #3941 from adefilippo83/allowdml
sougou Nov 5, 2018
4437d63
docker: add vitess:vitess to all k8s images
derekperkins Nov 5, 2018
e134ff7
Count TLS/non-TLS connections separately, by TLS version
deepthi Nov 6, 2018
e6486e6
simplify cases of strings.Index with strings.Contains
teresy Nov 6, 2018
36845f2
helm: use debian:stretch-slim instead of busybox
derekperkins Nov 6, 2018
1ff0558
docker: add new logrotate image + logrotate.conf
derekperkins Nov 6, 2018
41a47f5
helm: add logrotate to vttablet StatefulSet
derekperkins Nov 6, 2018
48d5a55
attempt to fix flaky test
deepthi Nov 6, 2018
0719f19
Handle AuthSwitch for MySQL 8.0 client
dveeden Nov 6, 2018
5482b2a
Atomic handling of loadConfig
avaidyanatha Nov 7, 2018
e503196
pass 5 specific env vars to make_mycnf hook
deepthi Nov 7, 2018
be170cb
remove flaky check in test
deepthi Nov 7, 2018
15354c2
TODO add support for new versions of TLS when they become available
deepthi Nov 7, 2018
c0d6da0
codeclimate fixes
deepthi Nov 7, 2018
c7422f5
docker: add logtail image
derekperkins Nov 7, 2018
3856f46
helm: use new logtail image for slow/error logs
derekperkins Nov 7, 2018
5329fa3
docker: logrotate - use bash sleep instead of cron
derekperkins Nov 7, 2018
cef15a5
helm: stop running logrotate as root
derekperkins Nov 7, 2018
c15a90f
helm: use logtail on general.log
derekperkins Nov 7, 2018
c9e5b22
docker: fix logtail codeclimate issues
derekperkins Nov 7, 2018
6dc994b
Use protobuf 3.5.1-1 for protoc version
Nov 7, 2018
5b3a9c7
Add vtctld support for ExecuteFetchAsApp
Nov 6, 2018
1c0078d
Pass along use pool
Nov 7, 2018
31fb204
Added ceph backup support to helm charts.
trevex Nov 8, 2018
560335a
CODEOWNERS: initial commit for /helm/ and /docker/
derekperkins Nov 8, 2018
7537577
Merge pull request #4354 from derekperkins/backup-cron
sougou Nov 8, 2018
9e740ca
Merge pull request #4348 from HubSpot/protoc-glibc-issue
sougou Nov 9, 2018
22a291a
Merge pull request #4342 from teresy/simplify-index
sougou Nov 9, 2018
5c663c1
Merge pull request #4331 from planetscale/tirsen-use-dest-master-for-…
sougou Nov 9, 2018
b6438ab
Add support for substr for statci strings.
Nov 8, 2018
e4e0d00
Add ability to hash the from value of lookup vindexes
eeSeeGee Nov 5, 2018
954b94c
Merge pull request #4350 from kuba--/static-substring
sougou Nov 9, 2018
f6c5cff
Merge pull request #4339 from eeSeeGee/young.20181105.hash_from_ids
sougou Nov 9, 2018
c1d5296
Merge pull request #4352 from trevex/feature/helm-ceph-backup-support
derekperkins Nov 9, 2018
b06f7c8
Merge pull request #4343 from derekperkins/k8s-logs
derekperkins Nov 9, 2018
9ff6b6b
fix tags to have no spaces or dots
deepthi Nov 9, 2018
66b9db2
fix tags to have no spaces or dots - missed one
deepthi Nov 9, 2018
4579f61
add MYSQL_PORT to make_mycnf env vars
deepthi Nov 9, 2018
6a12774
Add ExecuteFetchAsApp test case
Nov 10, 2018
782fec9
Merge pull request #4341 from planetscale/ds-tsl-conn-counts
sougou Nov 10, 2018
f5ceb5a
helm: allow further customization through additional flags and secret…
trevex Nov 12, 2018
8ec6251
If vtgate receives a 0 size packet from a mysql client, it panics. Fi…
deepthi Nov 12, 2018
fc6b07e
Database expects newline in test output
Nov 12, 2018
5dd187b
Merge pull request #4349 from HubSpot/allow-vtctld-execute-as-app
sougou Nov 13, 2018
f5eb8c9
Merge pull request #4357 from planetscale/ds-mysql-conn-panic
sougou Nov 13, 2018
870177c
Merge pull request #4344 from dveeden/mysql80_client
sougou Nov 13, 2018
2581bfa
WIP: mysql-workbench queries
deepthi Nov 13, 2018
cf76d2a
helm: change all imagePullPolicies to Always
derekperkins Nov 13, 2018
c2048b9
helm: use vitess/logtail for orchestrator/pmm
derekperkins Nov 13, 2018
6cae4f1
helm: add labels to InitShardMaster job
derekperkins Nov 13, 2018
ec8fd10
export env vars in vttablet-up.sh so that they are available to the hook
deepthi Nov 13, 2018
319172d
export env vars in vttablet-up.sh so that they are available to the hook
deepthi Nov 13, 2018
b85b34a
Updating error message for grpc_auth
avaidyanatha Nov 13, 2018
f0e20ce
check expected results of newly supported queries
deepthi Nov 13, 2018
52df90c
Merge pull request #4358 from planetscale/abhi-fix-errors
sougou Nov 13, 2018
820e1c1
Support multiple GTIDs in MariaDB GTIDSets
Santiclause Oct 22, 2018
4a14786
helm: default init_db_name_override to keyspace
derekperkins Nov 13, 2018
6be543c
helm: be less aggressive reducing whitespace
derekperkins Nov 13, 2018
e050355
helm: add per shard backup cron jobs
derekperkins Nov 9, 2018
8f34775
Rollback on rotation, mutex updates
avaidyanatha Nov 13, 2018
3dc3648
Merge pull request #4345 from planetscale/abhi-atomic
demmer Nov 14, 2018
f222cf4
Allow docker builds to disable CGO.
mpawliszyn Nov 14, 2018
0baa8e3
specify the character set in buildVarCharFields
demmer Nov 14, 2018
5b3aedd
Merge pull request #4364 from tinyspeck/varchar-fields-need-charset
sougou Nov 14, 2018
99199c2
Update more tests that used MariadbGTID as GTIDSet
Santiclause Nov 14, 2018
0bfe55c
add a flag to require secure connection from clients. will only be en…
deepthi Nov 15, 2018
bfa2323
Merge branch 'improvement/add-password-tests' of git://github.com/jfo…
deepthi Nov 15, 2018
1992988
mysql plaintext password should be checked only if native password is…
deepthi Nov 15, 2018
730c26b
Merge pull request #4367 from planetscale/ds-mysql-require-tls
sougou Nov 15, 2018
3a21c3c
fix codeclimate error
deepthi Nov 15, 2018
33ab9af
Merge pull request #4346 from planetscale/ds-hook-env
sougou Nov 15, 2018
d7b14ad
Merge pull request #4360 from Santiclause/mariadb-gtidset
sougou Nov 15, 2018
8009a83
remove commented panic
deepthi Nov 15, 2018
a1fa3ea
Merge pull request #4368 from planetscale/ds-mysql-password
sougou Nov 15, 2018
088b121
Merge pull request #4356 from derekperkins/cronjob-backups
dkhenry Nov 16, 2018
6aa7a0d
Adding necessary options for hadoop tests
Oct 28, 2018
9152e79
Allow the client to send connection attributes
dveeden Nov 16, 2018
fa42f53
Decode Connection Attributes
dveeden Nov 16, 2018
0623804
Merge pull request #4363 from mpawliszyn/mikepaw.cgo-disable
sougou Nov 16, 2018
c505bf2
Merge pull request #4359 from planetscale/ds-mysql-workbench
sougou Nov 16, 2018
9b8d987
Merge pull request #4321 from planetscale/dk-enable-hadoop-tests
sougou Nov 16, 2018
81ecf42
Fix #4288
deepthi Nov 17, 2018
16af2b8
subquery: address review comments
sougou Nov 17, 2018
102645e
subquery: final touches
sougou Nov 18, 2018
58a4910
Add testing for connection attribute parsing
dveeden Nov 18, 2018
6ec82cf
Merge pull request #3923 from sougou/sq2
sougou Nov 18, 2018
606738d
Merge pull request #3919 from sougou/healthcheck
sougou Nov 18, 2018
095b3d8
select *: add orderedColumns to table
sougou Nov 1, 2018
af9817f
select *: is_authoritative flag
sougou Nov 2, 2018
cf87a28
select *: expand columns for authoritative tables
sougou Nov 3, 2018
b30a5c6
select *: address review comments
sougou Nov 18, 2018
1806242
Merge pull request #4370 from dveeden/connattrs
sougou Nov 18, 2018
f65975a
from review: use continue instead of goto
deepthi Nov 19, 2018
b0d2eee
Merge pull request #4371 from planetscale/ds-vschema-error
sougou Nov 19, 2018
066779f
select *: more review comments
sougou Nov 19, 2018
30b138a
Upgrade grpc-go to 1.15
Nov 20, 2018
6ceac0c
BUG: fix unexpected panic in vtgate
sougou Nov 20, 2018
8254f43
Merge pull request #4361 from derekperkins/helm-cleanup
dkhenry Nov 21, 2018
e232f21
Merge pull request #4376 from HubSpot/upgrade-grpc-to-1-15
sougou Nov 21, 2018
714e126
Merge pull request #4377 from planetscale/insert_panic
demmer Nov 22, 2018
32dd398
Merge pull request #4336 from planetscale/ss-vtgatev3
demmer Nov 22, 2018
59f3051
helm: minikube example
sougou Nov 23, 2018
28b14d9
helm: add support for schema and vschema
sougou Nov 24, 2018
440e157
helm: address review comments
sougou Nov 24, 2018
8632ec1
helm: k8s_secret -> secret
sougou Nov 24, 2018
d93381b
helm: move ApplySchema to keyspace
sougou Nov 24, 2018
9d0594c
Merge pull request #4383 from planetscale/ss-minikube
sougou Nov 25, 2018
0317a86
helm: multiple schema and vschema jobs
sougou Nov 25, 2018
0ea6fc0
ApplySchema: allow DMLs
sougou Nov 25, 2018
ab75400
Merge pull request #4389 from planetscale/ss-schema-dml
sougou Nov 27, 2018
66a73bf
Merge pull request #4388 from planetscale/ss-minikube
sougou Nov 27, 2018
eaf9335
examples: change minikube example to merchant
sougou Nov 28, 2018
3707dc4
Adds stats conn
Nov 28, 2018
4278d8e
Adds tests and refactor timings/counts to avoid name collisions
Nov 29, 2018
cc708b1
Rename variables for clarity
Nov 29, 2018
def30ff
Update license to be vitess authors one
Nov 29, 2018
87f35ad
Address code review feedback
Nov 29, 2018
85c5048
The project already depends on Guava 26.0-jre, which reuqires Java 8.…
ys8 Nov 29, 2018
2e2214a
Merge pull request #4405 from tinyspeck/java8-upgrade
demmer Nov 30, 2018
b28791b
helm example: vertical split up to CopySchemaShard
sougou Nov 30, 2018
ae8d58c
Update name for consistency
Nov 30, 2018
766eb37
minikube: vertical split workflow
sougou Dec 1, 2018
c05c51c
prep for horizontal sharding
sougou Dec 2, 2018
a120f59
helm: include default-fast.cnf for tests and demos
sougou Dec 2, 2018
ff0e121
Merge pull request #4409 from planetscale/ss-fastmysql
sougou Dec 2, 2018
5bf1ab2
helm example: full workflow
sougou Dec 2, 2018
9a937b8
helm: fix codeclimate issues
sougou Dec 2, 2018
bd1d54b
helm example: kvtctld.sh
sougou Dec 2, 2018
562562b
helm example: product_id -> sku
sougou Dec 2, 2018
577c177
Merge pull request #4411 from planetscale/ss-minikube
sougou Dec 3, 2018
df486b6
Merge pull request #4404 from tinyspeck/adds-stats-to-topo
demmer Dec 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* @sougou

/docker/ @derekperkins @dkhenry
/helm/ @derekperkins @dkhenry
2 changes: 1 addition & 1 deletion config/mycnf/default-fast.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ key_buffer_size = 2M
log-error = {{.ErrorLogPath}}
long_query_time = 2
max_allowed_packet = 16M
max_connections = 100
max_connections = 200
net_write_timeout = 60
pid-file = {{.PidFile}}
port = {{.MysqlPort}}
Expand Down
36 changes: 18 additions & 18 deletions data/test/tabletserver/ddl_cases.txt
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
"create table a(abcd)"
{
"Action": "create", "NewName": "a"
"Action": "create"
}

"drop table b"
{
"Action": "drop", "TableName": "b"
"Action": "drop"
}

"drop table b.c"
{
"Action": "drop", "TableName": "b.c"
"Action": "drop"
}

"alter table c alter foo"
{
"Action": "alter", "TableName": "c", "NewTable": "c"
"Action": "alter"
}

"alter table c comment 'aa'"
{
"Action": "alter", "TableName": "c", "NewTable": "c"
"Action": "alter"
}

"alter table b.c comment 'aa'"
{
"Action": "alter", "TableName": "b.c", "NewTable": "b.c"
"Action": "alter"
}

"drop index a on b"
{
"Action": "alter", "TableName": "b", "NewName": "b"
"Action": "alter"
}

"drop index a on b.c"
{
"Action": "alter", "TableName": "b.c", "NewName": "b.c"
"Action": "alter"
}

"drop index a on b lock=none"
{
"Action": "alter", "TableName": "b", "NewName": "b"
"Action": "alter"
}

"rename table a to b"
{
"Action": "rename", "TableName": "a", "NewTable": "b"
"Action": "rename"
}

"rename table c.a to c.b"
{
"Action": "rename", "TableName": "c.a", "NewTable": "c.b"
"Action": "rename"
}

"alter table a rename b"
{
"Action": "rename", "TableName": "a", "NewTable": "b"
"Action": "rename"
}

"alter table a rename to b"
{
"Action": "rename", "TableName": "a", "NewTable": "b"
"Action": "rename"
}

"alter table c.a rename to c.b"
{
"Action": "rename", "TableName": "c.a", "NewTable": "c.b"
"Action": "rename"
}

"create view a asdasd"
{
"Action": "create", "NewName": "a"
"Action": "create"
}

"alter view c as foo"
{
"Action": "alter", "TableName": "c", "NewTable": "c"
"Action": "alter"
}

"drop view b"
{
"Action": "drop", "TableName": "b"
"Action": "drop"
}

"select * from a"
Expand All @@ -100,7 +100,7 @@

"alter table a partition by range (id) (partition p0 values less than (10), partition p1 values less than (maxvalue))"
{
"Action": "alter", "TableName": "a", "NewTable": "a"
"Action": "alter"
}

# truncate
Expand Down
64 changes: 47 additions & 17 deletions data/test/tabletserver/exec_cases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2076,12 +2076,8 @@ options:PassthroughDMLs
"alter table a add column(a int)"
{
"PlanID": "DDL",
"TableName": "a",
"TableName": "",
"Permissions": [
{
"TableName": "a",
"Role": 2
},
{
"TableName": "a",
"Role": 2
Expand All @@ -2093,7 +2089,7 @@ options:PassthroughDMLs
"alter table a rename b"
{
"PlanID": "DDL",
"TableName": "a",
"TableName": "",
"Permissions": [
{
"TableName": "a",
Expand All @@ -2110,7 +2106,24 @@ options:PassthroughDMLs
"rename table a to b"
{
"PlanID": "DDL",
"TableName": "a",
"TableName": "",
"Permissions": [
{
"TableName": "a",
"Role": 2
},
{
"TableName": "b",
"Role": 2
}
]
}

# multi-rename
"rename table a to b, b to a"
{
"PlanID": "DDL",
"TableName": "",
"Permissions": [
{
"TableName": "a",
Expand All @@ -2119,6 +2132,14 @@ options:PassthroughDMLs
{
"TableName": "b",
"Role": 2
},
{
"TableName": "b",
"Role": 2
},
{
"TableName": "a",
"Role": 2
}
]
}
Expand All @@ -2127,7 +2148,7 @@ options:PassthroughDMLs
"drop table a"
{
"PlanID": "DDL",
"TableName": "a",
"TableName": "",
"Permissions": [
{
"TableName": "a",
Expand All @@ -2136,16 +2157,29 @@ options:PassthroughDMLs
]
}

# analyze
"analyze table a"
# multi-drop
"drop table a, b"
{
"PlanID": "DDL",
"TableName": "a",
"TableName": "",
"Permissions": [
{
"TableName": "a",
"Role": 2
},
{
"TableName": "b",
"Role": 2
}
]
}

# analyze
"analyze table a"
{
"PlanID": "DDL",
"TableName": "",
"Permissions": [
{
"TableName": "a",
"Role": 2
Expand All @@ -2157,7 +2191,7 @@ options:PassthroughDMLs
"alter table a reorganize partition b into (partition c values less than (:bv), partition d values less than (maxvalue))"
{
"PlanID": "DDL",
"TableName": "a",
"TableName": "",
"Permissions": [
{
"TableName": "a",
Expand All @@ -2171,12 +2205,8 @@ options:PassthroughDMLs
"alter table a partition by range (id) (partition p0 values less than (10), partition p1 values less than (maxvalue))"
{
"PlanID": "DDL",
"TableName": "a",
"TableName": "",
"Permissions": [
{
"TableName": "a",
"Role": 2
},
{
"TableName": "a",
"Role": 2
Expand Down
38 changes: 38 additions & 0 deletions data/test/vtexplain/multi-output/selectsharded-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,41 @@ select * from (select id from user) s /* scatter paren select */
1 ks_sharded/c0-: select * from (select id from user) as s limit 10001 /* scatter paren select */

----------------------------------------------------------------------
select name from user where id = (select id from t1) /* non-correlated subquery as value */

1 ks_unsharded/-: select id from t1 limit 10001 /* non-correlated subquery as value */
2 ks_sharded/-40: select name from user where id = 1 limit 10001 /* non-correlated subquery as value */

----------------------------------------------------------------------
select name from user where id in (select id from t1) /* non-correlated subquery in IN clause */

1 ks_unsharded/-: select id from t1 limit 10001 /* non-correlated subquery in IN clause */
2 ks_sharded/-40: select name from user where 1 = 1 and (id in (1)) limit 10001 /* non-correlated subquery in IN clause */

----------------------------------------------------------------------
select name from user where id not in (select id from t1) /* non-correlated subquery in NOT IN clause */

1 ks_unsharded/-: select id from t1 limit 10001 /* non-correlated subquery in NOT IN clause */
2 ks_sharded/-40: select name from user where (1 = 0 or (id not in (1))) limit 10001 /* non-correlated subquery in NOT IN clause */
2 ks_sharded/40-80: select name from user where (1 = 0 or (id not in (1))) limit 10001 /* non-correlated subquery in NOT IN clause */
2 ks_sharded/80-c0: select name from user where (1 = 0 or (id not in (1))) limit 10001 /* non-correlated subquery in NOT IN clause */
2 ks_sharded/c0-: select name from user where (1 = 0 or (id not in (1))) limit 10001 /* non-correlated subquery in NOT IN clause */

----------------------------------------------------------------------
select name from user where exists (select id from t1) /* non-correlated subquery as EXISTS */

1 ks_unsharded/-: select id from t1 limit 10001 /* non-correlated subquery as EXISTS */
2 ks_sharded/-40: select name from user where 1 limit 10001 /* non-correlated subquery as EXISTS */
2 ks_sharded/40-80: select name from user where 1 limit 10001 /* non-correlated subquery as EXISTS */
2 ks_sharded/80-c0: select name from user where 1 limit 10001 /* non-correlated subquery as EXISTS */
2 ks_sharded/c0-: select name from user where 1 limit 10001 /* non-correlated subquery as EXISTS */

----------------------------------------------------------------------
select * from name_info order by info /* select * and order by varchar column */

1 ks_sharded/-40: select name, info, weight_string(info) from name_info order by info asc limit 10001 /* select * and order by varchar column */
1 ks_sharded/40-80: select name, info, weight_string(info) from name_info order by info asc limit 10001 /* select * and order by varchar column */
1 ks_sharded/80-c0: select name, info, weight_string(info) from name_info order by info asc limit 10001 /* select * and order by varchar column */
1 ks_sharded/c0-: select name, info, weight_string(info) from name_info order by info asc limit 10001 /* select * and order by varchar column */

----------------------------------------------------------------------
7 changes: 7 additions & 0 deletions data/test/vtexplain/selectsharded-queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ select name, count(*) from user group by name /* scatter aggregate */;

select 1, "hello", 3.14 from user limit 10 /* select constant sql values */;
select * from (select id from user) s /* scatter paren select */;

select name from user where id = (select id from t1) /* non-correlated subquery as value */;
select name from user where id in (select id from t1) /* non-correlated subquery in IN clause */;
select name from user where id not in (select id from t1) /* non-correlated subquery in NOT IN clause */;
select name from user where exists (select id from t1) /* non-correlated subquery as EXISTS */;

select * from name_info order by info /* select * and order by varchar column */
19 changes: 15 additions & 4 deletions data/test/vtexplain/test-vschema.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"ks_unsharded": {
"Sharded": false,
"Tables": {
"sharded": false,
"tables": {
"t1": {},
"table_not_in_schema": {}
}
},
"ks_sharded": {
"Sharded": true,
"sharded": true,
"vindexes": {
"music_user_map": {
"type": "lookup_hash_unique",
Expand Down Expand Up @@ -81,7 +81,18 @@
"column": "name",
"name": "md5"
}
]
],
"columns": [
{
"name": "name",
"type": "VARCHAR"
},
{
"name": "info",
"type": "VARCHAR"
}
],
"column_list_authoritative": true
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions data/test/vtgate/dml_cases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,10 @@
}
}

# insert into a vindex not allowed
"insert into user_index(id) values(1)"
"inserting into a vindex not allowed: user_index"

# simple replace unsharded
"replace into unsharded values(1, 2)"
{
Expand Down
Loading