8000 Remove TABLESPACES schema. Fixes #1477 · mysql-net/MySqlConnector@6010787 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6010787

Browse files
committed
Remove TABLESPACES schema. Fixes #1477
Signed-off-by: Bradley Grainger <bgrainger@gmail.com>
1 parent e93cbf3 commit 6010787

File tree

3 files changed

+1
-49
lines changed

3 files changed

+1
-49
lines changed

docs/content/overview/schema-collections.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
lastmod: 2023-12-15
32
date: 2021-04-24
3+
lastmod: 2024-10-05
44
title: Schema Collections
55
customtitle: "Supported Schema Collections"
66
description: Information about the schemas supported by MySqlConnection.GetSchema.
@@ -41,7 +41,6 @@ weight: 80
4141
* `Tables`[information about tables](../schema/tables/)
4242
* `TableConstraints`
4343
* `TablePrivileges`
44-
* `TableSpaces`
4544
* `Triggers`
4645
* `UserPrivileges`
4746
* `Views`

src/MySqlConnector/Core/SchemaProvider.g.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ public async ValueTask<DataTable> GetSchemaAsync(IOBehavior ioBehavior, string c
6767
await FillTableConstraintsAsync(ioBehavior, dataTable, "TableConstraints", restrictionValues, cancellationToken).ConfigureAwait(false);
6868
else if (string.Equals(collectionName, "TablePrivileges", StringComparison.OrdinalIgnoreCase))
6969
await FillTablePrivilegesAsync(ioBehavior, dataTable, "TablePrivileges", restrictionValues, cancellationToken).ConfigureAwait(false);
70-
else if (string.Equals(collectionName, "TableSpaces", StringComparison.OrdinalIgnoreCase))
71-
await FillTableSpacesAsync(ioBehavior, dataTable, "TableSpaces", restrictionValues, cancellationToken).ConfigureAwait(false);
7270
else if (string.Equals(collectionName, "Triggers", StringComparison.OrdinalIgnoreCase))
7371
await FillTriggersAsync(ioBehavior, dataTable, "Triggers", restrictionValues, cancellationToken).ConfigureAwait(false);
7472
else if (string.Equals(collectionName, "UserPrivileges", StringComparison.OrdinalIgnoreCase))
@@ -125,7 +123,6 @@ private Task FillMetaDataCollectionsAsync(IOBehavior ioBehavior, DataTable dataT
125123
dataTable.Rows.Add("Tables", 4, 3);
126124
dataTable.Rows.Add("TableConstraints", 0, 3);
127125
dataTable.Rows.Add("TablePrivileges", 0, 0);
128-
dataTable.Rows.Add("TableSpaces", 0, 0);
129126
dataTable.Rows.Add("Triggers", 0, 3);
130127
dataTable.Rows.Add("UserPrivileges", 0, 0);
131128
dataTable.Rows.Add("Views", 0, 3);
@@ -757,28 +754,6 @@ private async Task FillTablePrivilegesAsync(IOBehavior ioBehavior, DataTable dat
757754
await FillDataTableAsync(ioBehavior, dataTable, "TABLE_PRIVILEGES", null, cancellationToken).ConfigureAwait(false);
758755
}
759756

760-
private async Task FillTableSpacesAsync(IOBehavior ioBehavior, DataTable dataTable, string tableName, string?[]? restrictionValues, CancellationToken cancellationToken)
761-
{
762-
if (restrictionValues is not null && restrictionValues.Length > 0)
763-
throw new ArgumentException("restrictionValues is not supported for schema 'TableSpaces'.", nameof(restrictionValues));
764-
765-
dataTable.TableName = tableName;
766-
dataTable.Columns.AddRange(
767-
[
768-
new("TABLESPACE_NAME", typeof(string)),
769-
new("ENGINE", typeof(string)),
770-
new("TABLESPACE_TYPE", typeof(string)),
771-
new("LOGFILE_GROUP_NAME", typeof(string)),
772-
new("EXTENT_SIZE", typeof(long)),
773-
new("AUTOEXTEND_SIZE", typeof(long)),
774-
new("MAXIMUM_SIZE", typeof(long)),
775-
new("NODEGROUP_ID", typeof(long)),
776-
new("TABLESPACE_COMMENT", typeof(string)),
777-
]);
778-
779-
await FillDataTableAsync(ioBehavior, dataTable, "TABLESPACES", null, cancellationToken).ConfigureAwait(false);
780-
}
781-
782757
private async Task FillTriggersAsync(IOBehavior ioBehavior, DataTable dataTable, string tableName, string?[]? restrictionValues, CancellationToken cancellationToken)
783758
{
784759
if (restrictionValues is not null && restrictionValues.Length > 0)

tools/SchemaCollectionGenerator/SchemaCollections.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -652,28 +652,6 @@
652652
- name: IS_GRANTABLE
653653
type: string
654654

655-
- name: TableSpaces
656-
table: TABLESPACES
657-
columns:
658-
- name: TABLESPACE_NAME
659-
type: string
660-
- name: ENGINE
661-
type: string
662-
- name: TABLESPACE_TYPE
663-
type: string
664-
- name: LOGFILE_GROUP_NAME
665-
type: string
666-
- name: EXTENT_SIZE
667-
type: long
668-
- name: AUTOEXTEND_SIZE
669-
type: long
670-
- name: MAXIMUM_SIZE
671-
type: long
672-
- name: NODEGROUP_ID
673-
type: long
674-
- name: TABLESPACE_COMMENT
675-
type: string
676-
677655
- name: Triggers
678656
table: TRIGGERS
679657
identifierPartCount: 3

0 commit comments

Comments
 (0)
0