Commit b8326540 authored by unknown's avatar unknown

Add mtr database

parent bd025736
...@@ -2041,7 +2041,7 @@ sub mysql_install_db { ...@@ -2041,7 +2041,7 @@ sub mysql_install_db {
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql"; my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
# Use the mysql database for system tables # Use the mysql database for system tables
mtr_tofile($bootstrap_sql_file, "use mysql"); mtr_tofile($bootstrap_sql_file, "use mysql\n");
# Add the offical mysql system tables # Add the offical mysql system tables
# for a production system # for a production system
...@@ -2067,7 +2067,11 @@ sub mysql_install_db { ...@@ -2067,7 +2067,11 @@ sub mysql_install_db {
# Remove anonymous users # Remove anonymous users
mtr_tofile($bootstrap_sql_file, mtr_tofile($bootstrap_sql_file,
"DELETE FROM mysql.user where user= '';"); "DELETE FROM mysql.user where user= '';\n");
# Create mtr database
mtr_tofile($bootstrap_sql_file,
"CREATE DATABASE mtr;\n");
# Log bootstrap command # Log bootstrap command
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log"; my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
......
show databases; show databases;
Database Database
information_schema information_schema
mtr
mysql mysql
test test
show tables in mysql; show tables in mysql;
......
...@@ -47,6 +47,7 @@ create database mysqltest; ...@@ -47,6 +47,7 @@ create database mysqltest;
show databases; show databases;
Database Database
information_schema information_schema
mtr
mysql mysql
mysqltest mysqltest
test test
...@@ -58,6 +59,7 @@ drop database mysqltest; ...@@ -58,6 +59,7 @@ drop database mysqltest;
show databases; show databases;
Database Database
information_schema information_schema
mtr
mysql mysql
test test
drop database mysqltest; drop database mysqltest;
......
...@@ -9,11 +9,13 @@ create user mysqltest_3@localhost; ...@@ -9,11 +9,13 @@ create user mysqltest_3@localhost;
create user mysqltest_3; create user mysqltest_3;
select * from information_schema.SCHEMATA where schema_name > 'm'; select * from information_schema.SCHEMATA where schema_name > 'm';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
NULL mtr latin1 latin1_swedish_ci NULL
NULL mysql latin1 latin1_swedish_ci NULL NULL mysql latin1 latin1_swedish_ci NULL
NULL test latin1 latin1_swedish_ci NULL NULL test latin1 latin1_swedish_ci NULL
select schema_name from information_schema.schemata; select schema_name from information_schema.schemata;
schema_name schema_name
information_schema information_schema
mtr
mysql mysql
test test
show databases like 't%'; show databases like 't%';
...@@ -22,6 +24,7 @@ test ...@@ -22,6 +24,7 @@ test
show databases; show databases;
Database Database
information_schema information_schema
mtr
mysql mysql
test test
show databases where `database` = 't%'; show databases where `database` = 't%';
...@@ -351,6 +354,7 @@ create view v0 (c) as select schema_name from information_schema.schemata; ...@@ -351,6 +354,7 @@ create view v0 (c) as select schema_name from information_schema.schemata;
select * from v0; select * from v0;
c c
information_schema information_schema
mtr
mysql mysql
test test
explain select * from v0; explain select * from v0;
......
...@@ -259,6 +259,7 @@ prepare stmt4 from ' show databases '; ...@@ -259,6 +259,7 @@ prepare stmt4 from ' show databases ';
execute stmt4; execute stmt4;
Database Database
information_schema information_schema
mtr
mysql mysql
test test
prepare stmt4 from ' show tables from test like ''t2%'' '; prepare stmt4 from ' show tables from test like ''t2%'' ';
......
...@@ -7,6 +7,7 @@ show schemas; ...@@ -7,6 +7,7 @@ show schemas;
Database Database
information_schema information_schema
foo foo
mtr
mysql mysql
test test
drop schema foo; drop schema foo;
...@@ -140,6 +140,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is ...@@ -140,6 +140,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def SCHEMATA SCHEMA_NAME Database 253 64 18 N 1 0 8 def SCHEMATA SCHEMA_NAME Database 253 64 18 N 1 0 8
Database Database
information_schema information_schema
mtr
mysql mysql
test test
show databases like "test%"; show databases like "test%";
......
...@@ -52,5 +52,6 @@ master-bin.000001 # Query # # drop database testing_1 ...@@ -52,5 +52,6 @@ master-bin.000001 # Query # # drop database testing_1
show databases; show databases;
Database Database
information_schema information_schema
mtr
mysql mysql
test test
...@@ -21,6 +21,7 @@ COUNT(*) ...@@ -21,6 +21,7 @@ COUNT(*)
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema information_schema
mtr
mysql mysql
mysqltest mysqltest
test test
......
...@@ -9,6 +9,7 @@ CREATE DATABASE test_ignore; ...@@ -9,6 +9,7 @@ CREATE DATABASE test_ignore;
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema information_schema
mtr
mysql mysql
test test
test_ignore test_ignore
...@@ -33,6 +34,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F ...@@ -33,6 +34,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema information_schema
mtr
mysql mysql
test test
USE test; USE test;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment