diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 7092c712a21..366df161795 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -604,7 +604,7 @@ void CorruptedPages::zero_out_free_pages() die("Can't zero out corrupted page " UINT32PF " of tablespace %s", *page_it, space_name.c_str()); msg("Corrupted page " UINT32PF - " of tablespace %s was successfuly fixed.", + " of tablespace %s was successfully fixed.", *page_it, space_name.c_str()); } } diff --git a/mysql-test/main/dyncol.result b/mysql-test/main/dyncol.result index 7bc011ece87..a57b5248002 100644 --- a/mysql-test/main/dyncol.result +++ b/mysql-test/main/dyncol.result @@ -1508,7 +1508,7 @@ select column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int); column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int) NULL set names latin1; -# column existance test (names) +# column existence test (names) set names utf8; select column_exists(column_create("адын", 1212), "адын"); column_exists(column_create("адын", 1212), "адын") diff --git a/mysql-test/main/dyncol.test b/mysql-test/main/dyncol.test index c0835de8c44..206c78a8775 100644 --- a/mysql-test/main/dyncol.test +++ b/mysql-test/main/dyncol.test @@ -689,7 +689,7 @@ select column_get(column_create("1212", 2, "адын", 1, 3, 3), 4 as int); select column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int); set names latin1; ---echo # column existance test (names) +--echo # column existence test (names) set names utf8; select column_exists(column_create("адын", 1212), "адын"); select column_exists(column_create("адын", 1212), "aады"); diff --git a/mysql-test/main/group_min_max.result b/mysql-test/main/group_min_max.result index df942513f3a..356bb4b41df 100644 --- a/mysql-test/main/group_min_max.result +++ b/mysql-test/main/group_min_max.result @@ -4057,9 +4057,10 @@ KEY `index_t1_on_owner_id_and_foo` (`owner_id`,`foo`) INSERT INTO t1 (owner_id, foo, whatever) VALUES (1, TRUE, "yello"), (1, FALSE, "yello"), (2, TRUE, "yello"), (2, TRUE, "yello"), (2, FALSE, "yello"); -EXPLAIN SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1); +EXPLAIN +SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL index_t1_on_owner_id_and_foo 7 NULL 5 Using where; Using index +1 SIMPLE t1 index NULL index_t1_on_owner_id_and_foo 7 NULL # Using where; Using index SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1); owner_id 1 diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test index daa407121cf..ed65745a509 100644 --- a/mysql-test/main/group_min_max.test +++ b/mysql-test/main/group_min_max.test @@ -1718,7 +1718,9 @@ CREATE TABLE `t1` ( INSERT INTO t1 (owner_id, foo, whatever) VALUES (1, TRUE, "yello"), (1, FALSE, "yello"), (2, TRUE, "yello"), (2, TRUE, "yello"), (2, FALSE, "yello"); -EXPLAIN SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1); +--replace_column 9 # +EXPLAIN +SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1); SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1); DROP TABLE t1; diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result index 99bb955ea24..74ba3752373 100644 --- a/mysql-test/suite/archive/discover.result +++ b/mysql-test/suite/archive/discover.result @@ -84,7 +84,7 @@ drop table t1; db.opt t0.ARZ # -# discover of table non-existance on drop +# discover of table non-existence on drop # select * from t0; a diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test index 4ab35cf1115..1bced9edcbc 100644 --- a/mysql-test/suite/archive/discover.test +++ b/mysql-test/suite/archive/discover.test @@ -67,7 +67,7 @@ drop table t1; --list_files $mysqld_datadir/test --echo # ---echo # discover of table non-existance on drop +--echo # discover of table non-existence on drop --echo # select * from t0; remove_file $mysqld_datadir/test/t0.ARZ; @@ -119,7 +119,7 @@ select * from t1; --list_files $mysqld_datadir/test # -# MDEV-4955 discover of table non-existance on CREATE +# MDEV-4955 discover of table non-existence on CREATE # create table t1 (a int) engine=archive; select * from t1; diff --git a/mysql-test/suite/innodb/r/default_row_format_create.result b/mysql-test/suite/innodb/r/default_row_format_create.result index 50adc757b62..a1334101b61 100644 --- a/mysql-test/suite/innodb/r/default_row_format_create.result +++ b/mysql-test/suite/innodb/r/default_row_format_create.result @@ -58,10 +58,13 @@ CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1; DROP TABLE IF EXISTS t; SET GLOBAL innodb_compression_level=1; CREATE TABLE t(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC page_compressed=1; +CREATE TEMPORARY TABLE tt(a INT PRIMARY KEY) +ROW_FORMAT=DYNAMIC page_compressed=1 ENGINE=InnoDB; SET GLOBAL innodb_compression_level=0; ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=INPLACE; ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'PAGE_COMPRESSED' ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=COPY; ERROR HY000: Can't create table `test`.`t` (errno: 140 "Wrong create options") DROP TABLE t; +TRUNCATE tt; SET GLOBAL innodb_compression_level=@save_level; diff --git a/mysql-test/suite/innodb/t/default_row_format_create.test b/mysql-test/suite/innodb/t/default_row_format_create.test index 0b3e0d25f00..cd497d74de7 100644 --- a/mysql-test/suite/innodb/t/default_row_format_create.test +++ b/mysql-test/suite/innodb/t/default_row_format_create.test @@ -69,10 +69,13 @@ DROP TABLE IF EXISTS t; SET GLOBAL innodb_compression_level=1; CREATE TABLE t(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC page_compressed=1; +CREATE TEMPORARY TABLE tt(a INT PRIMARY KEY) +ROW_FORMAT=DYNAMIC page_compressed=1 ENGINE=InnoDB; SET GLOBAL innodb_compression_level=0; --error ER_ILLEGAL_HA_CREATE_OPTION ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=INPLACE; --error ER_CANT_CREATE_TABLE ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=COPY; DROP TABLE t; +TRUNCATE tt; SET GLOBAL innodb_compression_level=@save_level; diff --git a/mysql-test/suite/mariabackup/log_page_corruption.result b/mysql-test/suite/mariabackup/log_page_corruption.result index 91db833622a..4dcd21f1e2f 100644 --- a/mysql-test/suite/mariabackup/log_page_corruption.result +++ b/mysql-test/suite/mariabackup/log_page_corruption.result @@ -98,12 +98,12 @@ test/t3_inc ------ # Full backup prepare # "innodb_corrupted_pages" file must not exist after successful prepare -FOUND 1 /was successfuly fixed.*/ in backup.log +FOUND 1 /was successfully fixed.*/ in backup.log # Check that fixed pages are zero-filled # Incremental backup prepare # "innodb_corrupted_pages" file must not exist after successful prepare # do not remove "innodb_corrupted_pages" in incremental dir -FOUND 1 /was successfuly fixed.*/ in backup.log +FOUND 1 /was successfully fixed.*/ in backup.log # Check that fixed pages are zero-filled # shutdown server # remove datadir diff --git a/mysql-test/suite/mariabackup/log_page_corruption.test b/mysql-test/suite/mariabackup/log_page_corruption.test index 0151afb96b4..8931eb1eaf7 100644 --- a/mysql-test/suite/mariabackup/log_page_corruption.test +++ b/mysql-test/suite/mariabackup/log_page_corruption.test @@ -323,7 +323,7 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir > $backuplog; --echo # "innodb_corrupted_pages" file must not exist after successful prepare --error 1 --file_exists $targetdir/innodb_corrupted_pages ---let SEARCH_PATTERN=was successfuly fixed.* +--let SEARCH_PATTERN=was successfully fixed.* --let SEARCH_FILE=$backuplog --source include/search_pattern_in_file.inc @@ -347,7 +347,7 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir --incremental-dir=$incdir > $ --file_exists $targetdir/innodb_corrupted_pages --echo # do not remove "innodb_corrupted_pages" in incremental dir --file_exists $incdir/innodb_corrupted_pages ---let SEARCH_PATTERN=was successfuly fixed.* +--let SEARCH_PATTERN=was successfully fixed.* --let SEARCH_FILE=$backuplog --source include/search_pattern_in_file.inc diff --git a/scripts/sys_schema/README.md b/scripts/sys_schema/README.md index feaf9ff5ee8..3c90f41f8e0 100644 --- a/scripts/sys_schema/README.md +++ b/scripts/sys_schema/README.md @@ -5367,9 +5367,9 @@ name, then 'TEMPORARY' will be returned. ##### Parameters -* in_db (VARCHAR(64)): The database name to check for the existance of the table in. +* in_db (VARCHAR(64)): The database name to check for the existence of the table in. -* in_table (VARCHAR(64)): The name of the table to check the existance of. +* in_table (VARCHAR(64)): The name of the table to check the existence of. * out_exists ENUM('', 'BASE TABLE', 'VIEW', 'TEMPORARY'): The return value: whether the table exists. The value is one of: - '' - the table does not exist neither as a base table, view, nor temporary table. diff --git a/scripts/sys_schema/procedures/table_exists.sql b/scripts/sys_schema/procedures/table_exists.sql index 6f487f2f341..e06d018308f 100644 --- a/scripts/sys_schema/procedures/table_exists.sql +++ b/scripts/sys_schema/procedures/table_exists.sql @@ -34,10 +34,10 @@ CREATE DEFINER='mariadb.sys'@'localhost' PROCEDURE table_exists ( ----------- in_db (VARCHAR(64)): - The database name to check for the existance of the table in. + The database name to check for the existence of the table in. in_table (VARCHAR(64)): - The name of the table to check the existance of. + The name of the table to check the existence of. out_exists ENUM('''', ''BASE TABLE'', ''VIEW'', ''TEMPORARY''): The return value: whether the table exists. The value is one of: diff --git a/sql/semisync_master_ack_receiver.h b/sql/semisync_master_ack_receiver.h index 138f7b5aeed..b75cb7b76cb 100644 --- a/sql/semisync_master_ack_receiver.h +++ b/sql/semisync_master_ack_receiver.h @@ -183,7 +183,7 @@ public: bool listen_on_sockets() { - /* Reinitialze the fds with active fds before calling select */ + /* Reinitialize the fds with active fds before calling select */ m_fds= m_init_fds; struct timeval tv= {1,0}; /* select requires max fd + 1 for the first argument */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index aecdf9832d4..edb75506cb1 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4457,7 +4457,7 @@ int create_table_impl(THD *thd, else if (options.if_not_exists()) { /* - We never come here as part of normal create table as table existance + We never come here as part of normal create table as table existence is checked in open_and_lock_tables(). We may come here as part of ALTER TABLE when converting a table for a distributed engine to a a local one. diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 6a3cac809a8..201d22906af 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -11760,29 +11760,33 @@ index_bad: zip_ssize = 0; } + ulint level = 0; + if (is_temp) { m_flags2 |= DICT_TF2_TEMPORARY; - } else if (m_use_file_per_table) { - m_flags2 |= DICT_TF2_USE_FILE_PER_TABLE; - } + } else { + if (m_use_file_per_table) { + m_flags2 |= DICT_TF2_USE_FILE_PER_TABLE; + } - ulint level = ulint(options->page_compression_level); - if (!level) { - level = page_zip_level; - if (!level && options->page_compressed) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: PAGE_COMPRESSED requires" - " PAGE_COMPRESSION_LEVEL or" - " innodb_compression_level > 0"); - DBUG_RETURN(false); + level = ulint(options->page_compression_level); + if (!level) { + level = page_zip_level; + if (!level && options->page_compressed) { + push_warning_printf( + m_thd, Sql_condition::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: PAGE_COMPRESSED requires" + " PAGE_COMPRESSION_LEVEL or" + " innodb_compression_level > 0"); + DBUG_RETURN(false); + } } } /* Set the table flags */ dict_tf_set(&m_flags, innodb_row_format, zip_ssize, - m_use_data_dir, options->page_compressed, level); + m_use_data_dir, level && options->page_compressed, level); if (m_form->s->table_type == TABLE_TYPE_SEQUENCE) { m_flags |= DICT_TF_MASK_NO_ROLLBACK; @@ -13840,6 +13844,7 @@ int ha_innobase::truncate() int err = create(ib_table->name.m_name, table, &info, true, trx); + ut_ad(!err); if (!err) { err = open(ib_table->name.m_name, 0, 0); m_prebuilt->stored_select_lock_type = stored_lock; diff --git a/storage/maria/ha_s3.cc b/storage/maria/ha_s3.cc index d5efcbafd86..0fd5811e2b6 100644 --- a/storage/maria/ha_s3.cc +++ b/storage/maria/ha_s3.cc @@ -789,13 +789,13 @@ static int s3_discover_table(handlerton *hton, THD* thd, TABLE_SHARE *share) @return 1 frm exists */ -static int s3_discover_table_existance(handlerton *hton, const char *db, +static int s3_discover_table_existence(handlerton *hton, const char *db, const char *table_name) { S3_INFO s3_info; ms3_st *s3_client; int res; - DBUG_ENTER("s3_discover_table_existance"); + DBUG_ENTER("s3_discover_table_existence"); /* Ignore names in "mysql" database to speed up boot */ if (!strcmp(db, MYSQL_SCHEMA_NAME.str)) @@ -1019,7 +1019,7 @@ static int ha_s3_init(void *p) s3_hton->table_options= s3_table_option_list; s3_hton->discover_table= s3_discover_table; s3_hton->discover_table_names= s3_discover_table_names; - s3_hton->discover_table_existence= s3_discover_table_existance; + s3_hton->discover_table_existence= s3_discover_table_existence; s3_hton->notify_tabledef_changed= s3_notify_tabledef_changed; s3_hton->create_partitioning_metadata= s3_create_partitioning_metadata; s3_hton->tablefile_extensions= no_exts;