mirror of
https://github.com/MariaDB/server.git
synced 2025-05-13 01:01:44 +03:00
- Added checking of return value for system(), freopen(), fgets() and chown() - Ensure that calls that require a format strings gets a format string - Other trivial things Updated test suite results (especially for pbxt and embedded server) Removed warning for "Invalid (old?) table or database name 'mysqld.1'" from pbxt tests Speed up some pbxt tests by inserting begin ; commit; around "while loops with inserts" Added mysqld startup option '--debug-flush' Create maria_recovery.trace in data directory instead of current directory client/mysql.cc: Check return value from system() client/mysql_upgrade.c: Check return value from fgets() client/mysqladmin.cc: Check return value from fgets() client/mysqlslap.c: Check return value from system() (but ignore it, as it's not critical) extra/yassl/src/crypto_wrapper.cpp: Check return value from fgets() (but ignore it, as it's internal file) extra/yassl/taocrypt/src/aes.cpp: Added extra {} to remove compiler warning extra/yassl/taocrypt/src/blowfish.cpp: Added extra {} to remove compiler warning extra/yassl/taocrypt/src/misc.cpp: Ifdef not used code include/mysys_err.h: Added error message for failing chown() mysql-test/mysql-test-run.pl: Don't give warning for skipping ndbcluster (never enabled in MariaDB) mysql-test/suite/funcs_1/r/is_columns_is_embedded.result: Update with new information schema information mysql-test/suite/funcs_1/r/is_tables_is_embedded.result: New test mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result: Update test results (has not been tested for a long time) mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result: Update test results (has not been tested for a long time) mysql-test/suite/funcs_1/t/is_tables_is.test: Don't run with embedded server (as results differ) I added a new test for embedded server mysql-test/suite/funcs_1/t/is_tables_is_embedded.test: New test mysql-test/suite/pbxt/my.cnf: Allow one to run pbxt tests without having to specify --mysqld=--default-storage-engine=pbxt mysql-test/suite/pbxt/t/count_distinct3.test: Speed up test by inserting begin; ... commit; mysql-test/suite/pbxt/t/subselect.test: Speed up test by inserting begin; ... commit; mysys/errors.c: Added error message for failing chown() mysys/my_copy.c: Added error message for failing chown() mysys/my_redel.c: Added error message for failing chown() mysys/safemalloc.c: Added cast to get rid of compiler warning sql/ha_partition.cc: Fixed wrong argument to sql_print_error() (it requires a format string) sql/log.cc: Test return value of freopen() sql/mysqld.cc: Test return value of freopen() Added startup option '--debug-flush' to be used when one gets a core dump (easy to explain to people on IRC) sql/rpl_rli.cc: Fixed wrong argument to sql_print_error() (it requires a format string) sql/set_var.cc: Added {} to get rid of compiler warnings sql/slave.cc: Fixed wrong argument to mi->report() and sql_print...() (they require a format string) sql/sql_cache.cc: Fixed wrong argument to sql_printinformation() (it requires a format string) sql/sql_parse.cc: Test return value of fgets() sql/sql_plugin.cc: Fixed wrong argument to sql_print_error() (it requires a format string) sql/sql_select.cc: Use unique table name for internal temp tables instead of full path (Simple speed & space optimization) sql/udf_example.c: Removed compiler warning about not used variable storage/maria/ha_maria.cc: Fixed wrong argument to sql_print_error() and ma_check_print_error() (they require a format string) storage/maria/ma_recovery.c: Create maria_recovery.trace in data directory instead of current directory storage/maria/unittest/ma_test_loghandler-t.c: Fixed wrong argument to ok(); Requires a format string storage/pbxt/src/strutil_xt.cc: Detect temporary tables by checking if that path for the table is in the mysql data directory. The database for temporary tables is after this patch, from PBXT point of view, "" This is needed to stop PBXT from calling filename_to_tablename() with the base directory as an argument, which caused ERROR: Invalid (old?) table or database name 'mysqld.1'" in the log when running the test suite. tests/mysql_client_test.c: Fixed compiler warnings unittest/mysys/base64-t.c: Fixed wrong argument to diag() (it requires a format string) Added a comment that the current 'print' of differing buffers doesn't print the right thing, but didn't fix this as it's not important (unless we find a bug in the real code)
193 lines
4.5 KiB
Plaintext
193 lines
4.5 KiB
Plaintext
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
|
DROP DATABASE IF EXISTS test1;
|
|
DROP DATABASE IF EXISTS test2;
|
|
CREATE DATABASE test1;
|
|
CREATE DATABASE test2;
|
|
CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
|
|
CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
|
|
CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
|
|
SELECT *,
|
|
LEFT( table_comment,
|
|
IF(INSTR(table_comment,'InnoDB free') = 0
|
|
AND INSTR(table_comment,'number_of_replicas') = 0,
|
|
LENGTH(table_comment),
|
|
INSTR(table_comment,'InnoDB free')
|
|
+ INSTR(table_comment,'number_of_replicas') - 1))
|
|
AS "user_comment",
|
|
'-----------------------------------------------------' AS "Separator"
|
|
FROM information_schema.tables
|
|
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
|
|
ORDER BY table_schema,table_name;
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t1
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t2
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test2
|
|
TABLE_NAME t1
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
SHOW TABLES FROM test1;
|
|
Tables_in_test1
|
|
t1
|
|
t2
|
|
SHOW TABLES FROM test2;
|
|
Tables_in_test2
|
|
t1
|
|
DROP USER testuser1@localhost;
|
|
CREATE USER testuser1@localhost;
|
|
GRANT SELECT ON test1.* TO testuser1@localhost;
|
|
# Establish connection testuser1 (user=testuser1)
|
|
SELECT *,
|
|
LEFT( table_comment,
|
|
IF(INSTR(table_comment,'InnoDB free') = 0
|
|
AND INSTR(table_comment,'number_of_replicas') = 0,
|
|
LENGTH(table_comment),
|
|
INSTR(table_comment,'InnoDB free')
|
|
+ INSTR(table_comment,'number_of_replicas') - 1))
|
|
AS "user_comment",
|
|
'-----------------------------------------------------' AS "Separator"
|
|
FROM information_schema.tables
|
|
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
|
|
ORDER BY table_schema,table_name;
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t1
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t2
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test2
|
|
TABLE_NAME t1
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
SHOW TABLES FROM test1;
|
|
Tables_in_test1
|
|
t1
|
|
t2
|
|
SHOW TABLES FROM test2;
|
|
Tables_in_test2
|
|
t1
|
|
# Switch to connection default and close connection testuser1
|
|
DROP USER testuser1@localhost;
|
|
DROP DATABASE test1;
|
|
DROP DATABASE test2;
|