mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-17658 change the structure of mysql.user table
Implement User_table_json. Fix scripts to use mysql.global_priv. Fix tests.
This commit is contained in:
@ -9,6 +9,11 @@ t int, check (t>32) # table constraint
|
||||
) ENGINE=myisam;
|
||||
SELECT * from information_schema.check_constraints order by check_clause;
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA mysql
|
||||
CONSTRAINT_NAME Priv
|
||||
TABLE_NAME global_priv
|
||||
CHECK_CLAUSE json_valid(`Priv`)
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME CONSTRAINT_1
|
||||
TABLE_NAME t0
|
||||
@ -17,6 +22,11 @@ ALTER TABLE t0
|
||||
ADD CONSTRAINT CHK_t0_t CHECK(t<100);
|
||||
SELECT * from information_schema.check_constraints order by check_clause;
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA mysql
|
||||
CONSTRAINT_NAME Priv
|
||||
TABLE_NAME global_priv
|
||||
CHECK_CLAUSE json_valid(`Priv`)
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME CHK_t0_t
|
||||
TABLE_NAME t0
|
||||
@ -30,6 +40,11 @@ ALTER TABLE t0
|
||||
DROP CONSTRAINT CHK_t0_t;
|
||||
SELECT * from information_schema.check_constraints order by check_clause;
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA mysql
|
||||
CONSTRAINT_NAME Priv
|
||||
TABLE_NAME global_priv
|
||||
CHECK_CLAUSE json_valid(`Priv`)
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME CONSTRAINT_1
|
||||
TABLE_NAME t0
|
||||
@ -40,6 +55,11 @@ tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint
|
||||
) ENGINE=InnoDB;
|
||||
SELECT * from information_schema.check_constraints order by check_clause;
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA mysql
|
||||
CONSTRAINT_NAME Priv
|
||||
TABLE_NAME global_priv
|
||||
CHECK_CLAUSE json_valid(`Priv`)
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME CHK_tt
|
||||
TABLE_NAME t1
|
||||
@ -58,6 +78,11 @@ ALTER TABLE t1
|
||||
DROP CONSTRAINT CHK_tt;
|
||||
SELECT * from information_schema.check_constraints order by check_clause;
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA mysql
|
||||
CONSTRAINT_NAME Priv
|
||||
TABLE_NAME global_priv
|
||||
CHECK_CLAUSE json_valid(`Priv`)
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME t
|
||||
TABLE_NAME t1
|
||||
@ -81,6 +106,11 @@ CONSTRAINT_NAME name
|
||||
TABLE_NAME t2
|
||||
CHECK_CLAUSE char_length(`name`) > 2
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA mysql
|
||||
CONSTRAINT_NAME Priv
|
||||
TABLE_NAME global_priv
|
||||
CHECK_CLAUSE json_valid(`Priv`)
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME CHK_dates
|
||||
TABLE_NAME t2
|
||||
@ -104,6 +134,11 @@ CONSTRAINT_NAME name
|
||||
TABLE_NAME t2
|
||||
CHECK_CLAUSE char_length(`name`) > 2
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA mysql
|
||||
CONSTRAINT_NAME Priv
|
||||
TABLE_NAME global_priv
|
||||
CHECK_CLAUSE json_valid(`Priv`)
|
||||
CONSTRAINT_CATALOG def
|
||||
CONSTRAINT_SCHEMA test
|
||||
CONSTRAINT_NAME CHK_dates
|
||||
TABLE_NAME t2
|
||||
@ -132,6 +167,7 @@ CONSTRAINT b check (b>10) # table constraint
|
||||
select * from information_schema.check_constraints order by check_clause;
|
||||
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
|
||||
def test name t2 char_length(`name`) > 2
|
||||
def mysql Priv global_priv json_valid(`Priv`)
|
||||
def test b t3 `b` > 0
|
||||
def test b t3 `b` > 10
|
||||
def test CHK_dates t2 `start_date` is null
|
||||
|
Reference in New Issue
Block a user