From a42907dc2dccf2623eabdf1a6dc37623afd47624 Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Mon, 27 Nov 2023 11:57:34 +0530 Subject: [PATCH] feat: add docs (#1644) Signed-off-by: Manan Gupta <manan@planetscale.com> --- content/en/docs/19.0/concepts/query-rewriting.md | 2 +- content/en/docs/19.0/reference/features/show.md | 11 +++++++++++ .../19.0/user-guides/vschema-guide/foreign-keys.md | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/content/en/docs/19.0/concepts/query-rewriting.md b/content/en/docs/19.0/concepts/query-rewriting.md index 8a62ac0f7..6d8c7c417 100644 --- a/content/en/docs/19.0/concepts/query-rewriting.md +++ b/content/en/docs/19.0/concepts/query-rewriting.md @@ -91,6 +91,7 @@ Here is a list of all the system variables that are handled by Vitess and how th | sql_select_limit | VitessAware | | transaction_mode | VitessAware | | ddl_strategy | VitessAware | +| foreign_key_checks | VitessAware | | workload | VitessAware | | charset | VitessAware | | names | VitessAware | @@ -171,7 +172,6 @@ Here is a list of all the system variables that are handled by Vitess and how th | end_markers_in_json | ReservedConn | | eq_range_index_dive_limit | ReservedConn | | explicit_defaults_for_timestamp | ReservedConn | -| foreign_key_checks | ReservedConn | | group_concat_max_len | ReservedConn | | information_schema_stats_expiry | ReservedConn | | max_heap_table_size | ReservedConn | diff --git a/content/en/docs/19.0/reference/features/show.md b/content/en/docs/19.0/reference/features/show.md index 88fb37807..1498bf670 100644 --- a/content/en/docs/19.0/reference/features/show.md +++ b/content/en/docs/19.0/reference/features/show.md @@ -73,6 +73,17 @@ Example Output: +-------+----------+-------+------------+---------+------------------+------------+----------------------+ ``` +* `SHOW VSCHEMA KEYSPACES` -- Information about Vschema information for all the keyspaces including the foreign key mode, whether the keyspace is sharded, and if there is an error in the VSchema for the keyspace. +```shell +Example Output: ++----------+---------+-------------+---------+ +| Keyspace | Sharded | Foreign Key | Comment | ++----------+---------+-------------+---------+ +| ks | true | managed | | +| uks | false | managed | | ++----------+---------+-------------+---------+ +``` + * `SHOW VSCHEMA TABLES` -- A list of tables available in the current keyspace's vschema. ```shell Example Output for customer keyspace: diff --git a/content/en/docs/19.0/user-guides/vschema-guide/foreign-keys.md b/content/en/docs/19.0/user-guides/vschema-guide/foreign-keys.md index 990b6ba46..cffeb33a4 100644 --- a/content/en/docs/19.0/user-guides/vschema-guide/foreign-keys.md +++ b/content/en/docs/19.0/user-guides/vschema-guide/foreign-keys.md @@ -33,9 +33,9 @@ For more details on what operations Vitess performs for each type of DML, please #### Limitations - Currently, Vitess only supports shard-scoped foreign key constraints even in the `managed` mode. Support for cross-shard foreign keys is planned for a future release. -- `UPDATE` statements only support updating to a literal value. For example, `UPDATE t1 SET col1 = 3 WHERE id = col + 1` is accepted, but `UPDATE t1 SET col1 = col + 3` is not. - [OnlineDDL](../../schema-changes/managed-online-schema-changes/) doesn't work well with tables that have foreign key constraints on them. - Some query syntaxes like `REPLACE INTO` and `INSERT INTO ... ON DUPLICATE KEY UPDATE` aren't supported. +- Cyclic foreign keys are rejected by Vitess. ### Vitess Disallows Foreign Keys