Skip to content

Commit 3dbc49f

Browse files
committed
Merge 10.4 into 10.5
2 parents 9ed08f3 + b58586a commit 3dbc49f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+523
-132
lines changed

client/mysql.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,8 +1287,8 @@ sig_handler mysql_end(int sig)
12871287
{
12881288
#ifndef _WIN32
12891289
/*
1290-
Ingnoring SIGQUIT and SIGINT signals when cleanup process starts.
1291-
This will help in resolving the double free issues, which occures in case
1290+
Ignoring SIGQUIT and SIGINT signals when cleanup process starts.
1291+
This will help in resolving the double free issues, which occurs in case
12921292
the signal handler function is started in between the clean up function.
12931293
*/
12941294
signal(SIGQUIT, SIG_IGN);
@@ -4720,7 +4720,7 @@ sql_real_connect(char *host,char *database,char *user,char *password,
47204720
/*
47214721
CLIENT_PROGRESS_OBSOLETE is set only if we requested it in
47224722
mysql_real_connect() and the server also supports it
4723-
*/
4723+
*/
47244724
if (mysql.client_flag & CLIENT_PROGRESS_OBSOLETE)
47254725
mysql_options(&mysql, MYSQL_PROGRESS_CALLBACK, (void*) report_progress);
47264726
#else
@@ -4789,7 +4789,7 @@ com_status(String *buffer __attribute__((unused)),
47894789
tee_fprintf(stdout, "\nConnection id:\t\t%lu\n",mysql_thread_id(&mysql));
47904790
/*
47914791
Don't remove "limit 1",
4792-
it is protection againts SQL_SELECT_LIMIT=0
4792+
it is protection against SQL_SELECT_LIMIT=0
47934793
*/
47944794
if (!mysql_store_result_for_lazy(&result))
47954795
{
@@ -5138,7 +5138,7 @@ static const char *construct_prompt()
51385138
time_t lclock = time(NULL);// Get the date struct
51395139
struct tm *t = localtime(&lclock);
51405140

5141-
/* parse thru the settings for the prompt */
5141+
/* parse through the settings for the prompt */
51425142
for (char *c = current_prompt; *c ; c++)
51435143
{
51445144
if (*c != PROMPT_CHAR)

client/mysql_plugin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ static int find_plugin(char *tp_path)
10241024

10251025

10261026
/**
1027-
Build the boostrap file.
1027+
Build the bootstrap file.
10281028
10291029
Create a new file and populate it with SQL commands to ENABLE or DISABLE
10301030
the plugin via REPLACE and DELETE operations on the mysql.plugin table.
@@ -1153,7 +1153,7 @@ static int dump_bootstrap_file(char *bootstrap_file)
11531153
11541154
Create a command line sequence to launch mysqld in bootstrap mode. This
11551155
will allow mysqld to launch a minimal server instance to read and
1156-
execute SQL commands from a file piped in (the boostrap file). We use
1156+
execute SQL commands from a file piped in (the bootstrap file). We use
11571157
the --no-defaults option to skip reading values from the config file.
11581158
11591159
The bootstrap mode skips loading of plugins and many other subsystems.

client/mysqlbinlog.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ static bool shall_skip_database(const char *log_dbname)
753753
/**
754754
Print "use <db>" statement when current db is to be changed.
755755
756-
We have to control emiting USE statements according to rewrite-db options.
756+
We have to control emitting USE statements according to rewrite-db options.
757757
We have to do it here (see process_event() below) and to suppress
758758
producing USE statements by corresponding log event print-functions.
759759
*/
@@ -785,7 +785,7 @@ print_use_stmt(PRINT_EVENT_INFO* pinfo, const Query_log_event *ev)
785785
// In case of rewrite rule print USE statement for db_to
786786
my_fprintf(result_file, "use %`s%s\n", db_to, pinfo->delimiter);
787787

788-
// Copy the *original* db to pinfo to suppress emiting
788+
// Copy the *original* db to pinfo to suppress emitting
789789
// of USE stmts by log_event print-functions.
790790
memcpy(pinfo->db, db, db_len + 1);
791791
}

client/mysqldump.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static char * opt_mysql_unix_port=0;
147147
static int first_error=0;
148148
/*
149149
multi_source is 0 if old server or 2 if server that support multi source
150-
This is choosen this was as multi_source has 2 extra columns first in
150+
This is chosen this was as multi_source has 2 extra columns first in
151151
SHOW ALL SLAVES STATUS.
152152
*/
153153
static uint multi_source= 0;
@@ -2075,7 +2075,7 @@ static void print_xml_tag(FILE * xml_file, const char* sbeg,
20752075
<stag_atr="sval" xsi:nil="true"/>
20762076
NOTE
20772077
sval MUST be a NULL terminated string.
2078-
sval string will be qouted before output.
2078+
sval string will be quoted before output.
20792079
*/
20802080

20812081
static void print_xml_null_tag(FILE * xml_file, const char* sbeg,
@@ -2147,7 +2147,7 @@ static void print_xml_cdata(FILE *xml_file, const char *str, ulong len)
21472147
Print tag with many attribute to the xml_file. Format is:
21482148
\t\t<row_name Atr1="Val1" Atr2="Val2"... />
21492149
NOTE
2150-
All atributes and values will be quoted before output.
2150+
All attributes and values will be quoted before output.
21512151
*/
21522152

21532153
static void print_xml_row(FILE *xml_file, const char *row_name,
@@ -2632,7 +2632,7 @@ static uint dump_routines_for_db(char *db)
26322632
print_comment(sql_file, 1,
26332633
"-- does %s have permissions on mysql.proc?\n\n",
26342634
fix_for_comment(current_user));
2635-
maybe_die(EX_MYSQLERR,"%s has insufficent privileges to %s!",
2635+
maybe_die(EX_MYSQLERR,"%s has insufficient privileges to %s!",
26362636
current_user, query_buff);
26372637
}
26382638
else if (strlen(row[2]))
@@ -4187,7 +4187,7 @@ static void dump_table(char *table, char *db, const uchar *hash_key, size_t len)
41874187
}
41884188
}
41894189

4190-
/* XML - close table tag and supress regular output */
4190+
/* XML - close table tag and suppress regular output */
41914191
if (opt_xml)
41924192
fputs("\t</table_data>\n", md_result_file);
41934193
else if (extended_insert && row_break)

client/mysqlimport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static char *field_escape(char *to,const char *from,uint length)
581581
else
582582
{
583583
if (*from == '\'' && !end_backslashes)
584-
*to++= *from; /* We want a dublicate of "'" for MySQL */
584+
*to++= *from; /* We want a duplicate of "'" for MySQL */
585585
end_backslashes=0;
586586
}
587587
}

client/mysqlslap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2283,7 +2283,7 @@ slap_connect(MYSQL *mysql)
22832283
opt_mysql_unix_port,
22842284
connect_flags))
22852285
{
2286-
/* Connect suceeded */
2286+
/* Connect succeeded */
22872287
connect_error= 0;
22882288
break;
22892289
}

client/mysqltest.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ struct property {
146146
my_bool *var;/* Actual variable */
147147
my_bool set;/* Has been set for ONE command */
148148
my_bool old;/* If set, thus is the old value */
149-
my_bool reverse;/* Varible is true if disabled */
149+
my_bool reverse;/* Variable is true if disabled */
150150
const char *env_name;/* Env. variable name */
151151
};
152152

@@ -566,7 +566,7 @@ DYNAMIC_ARRAY regex_arr; /* stores a list of st_regex subsitutions */
566566
Temporary storage areas for substitutions. To reduce unnessary copying
567567
and memory freeing/allocation, we pre-allocate two buffers, and alternate
568568
their use, one for input/one for output, the roles changing on the next
569-
st_regex substition. At the end of substitutions buf points to the
569+
st_regex substitution. At the end of substitutions buf points to the
570570
one containing the final result.
571571
*/
572572
char* buf;
@@ -3095,7 +3095,7 @@ void open_file(const char *name)
30953095
strxnmov(buff, sizeof(buff), opt_overlay_dir, suffix, name, NullS);
30963096

30973097
/*
3098-
Overlayed rty/include/thing.inc can contain the line
3098+
Overlaid rty/include/thing.inc can contain the line
30993099
--source thing.inc
31003100
which would mean to include qwe/include/thing.inc.
31013101
But it looks like including "itself", so don't try to open the file,
@@ -4803,7 +4803,7 @@ int do_save_master_pos()
48034803
mysql_errno(mysql), mysql_error(mysql));
48044804

48054805
if (!(res = mysql_store_result(mysql)))
4806-
die("mysql_store_result() retuned NULL for '%s'", query);
4806+
die("mysql_store_result() returned NULL for '%s'", query);
48074807
if (!(row = mysql_fetch_row(res)))
48084808
die("empty result in show master status");
48094809
strnmov(master_pos.file, row[0], sizeof(master_pos.file)-1);
@@ -5350,7 +5350,7 @@ void do_get_errcodes(struct st_command *command)
53505350
p++;
53515351
}
53525352

5353-
/* Convert the sting to int */
5353+
/* Convert the string to int */
53545354
if (!str2int(start, 10, (long) INT_MIN, (long) INT_MAX, &val))
53555355
die("Invalid argument to error: '%s'", command->first_argument);
53565356

@@ -5742,7 +5742,7 @@ int connect_n_handle_errors(struct st_command *command,
57425742
dynstr_append_mem(ds, delimiter, delimiter_length);
57435743
dynstr_append_mem(ds, "\n", 1);
57445744
}
5745-
/* Simlified logging if enabled */
5745+
/* Simplified logging if enabled */
57465746
if (!disable_connect_log && !disable_query_log)
57475747
{
57485748
replace_dynstr_append(ds, command->query);
@@ -8219,7 +8219,7 @@ void handle_no_error(struct st_command *command)
82198219
SYNPOSIS
82208220
run_query_stmt
82218221
mysql - mysql handle
8222-
command - currrent command pointer
8222+
command - current command pointer
82238223
query - query string to execute
82248224
query_len - length query string to execute
82258225
ds - output buffer where to store result form query
@@ -8459,7 +8459,7 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
84598459
/*
84608460
Create a util connection if one does not already exists
84618461
and use that to run the query
8462-
This is done to avoid implict commit when creating/dropping objects such
8462+
This is done to avoid implicit commit when creating/dropping objects such
84638463
as view, sp etc.
84648464
*/
84658465

@@ -8500,7 +8500,7 @@ int util_query(MYSQL* org_mysql, const char* query){
85008500
SYNPOSIS
85018501
run_query()
85028502
mysql mysql handle
8503-
commandcurrrent command pointer
8503+
commandcurrent command pointer
85048504
85058505
flags control the phased/stages of query execution to be performed
85068506
if QUERY_SEND_FLAG bit is on, the query will be sent. If QUERY_REAP_FLAG
@@ -10257,7 +10257,7 @@ int multi_reg_replace(struct st_replace_regex* r,char* val)
1025710257
if (!reg_replace(&out_buf, buf_len_p, re.pattern, re.replace,
1025810258
in_buf, re.icase))
1025910259
{
10260-
/* if the buffer has been reallocated, make adjustements */
10260+
/* if the buffer has been reallocated, make adjustments */
1026110261
if (save_out_buf != out_buf)
1026210262
{
1026310263
if (save_out_buf == r->even_buf)
@@ -10524,7 +10524,7 @@ typedef struct st_rep_set {
1052410524
uint found_len;/* Best match to date */
1052510525
intfound_offset;
1052610526
uint table_offset;
10527-
uint size_of_bits;/* For convinience */
10527+
uint size_of_bits;/* For convenience */
1052810528
} REP_SET;
1052910529

1053010530
typedef struct st_rep_sets {
@@ -10627,7 +10627,7 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
1062710627
DBUG_RETURN(0);
1062810628
}
1062910629
(void) make_new_set(&sets);/* Set starting set */
10630-
make_sets_invisible(&sets);/* Hide previus sets */
10630+
make_sets_invisible(&sets);/* Hide previous sets */
1063110631
used_sets=-1;
1063210632
word_states=make_new_set(&sets);/* Start of new word */
1063310633
start_states=make_new_set(&sets);/* This is first state */

mysql-test/main/ctype_utf32_uca.result

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7921,3 +7921,21 @@ SET NAMES utf8;
79217921
#
79227922
# End of 10.2 tests
79237923
#
7924+
#
7925+
# Start of 10.4 tests
7926+
#
7927+
#
7928+
# MDEV-22499 Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed in TABLE_SHARE::init_from_binary_frm_image
7929+
#
7930+
SET @@SESSION.collation_connection=utf32_estonian_ci;
7931+
CREATE TABLE t1(c1 SET('a') COLLATE 'Binary',c2 JSON);
7932+
SHOW CREATE TABLE t1;
7933+
Table Create Table
7934+
t1 CREATE TABLE `t1` (
7935+
`c1` set('\0\0\0a') CHARACTER SET binary DEFAULT NULL,
7936+
`c2` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`c2`))
7937+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
7938+
DROP TABLE t1;
7939+
#
7940+
# End of 10.4 tests
7941+
#

mysql-test/main/ctype_utf32_uca.test

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,21 @@ SET NAMES utf8;
268268
--echo #
269269
--echo # End of 10.2 tests
270270
--echo #
271+
272+
273+
--echo #
274+
--echo # Start of 10.4 tests
275+
--echo #
276+
277+
--echo #
278+
--echo # MDEV-22499 Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed in TABLE_SHARE::init_from_binary_frm_image
279+
--echo #
280+
281+
SET @@SESSION.collation_connection=utf32_estonian_ci;
282+
CREATE TABLE t1(c1 SET('a') COLLATE 'Binary',c2 JSON);
283+
SHOW CREATE TABLE t1;
284+
DROP TABLE t1;
285+
286+
--echo #
287+
--echo # End of 10.4 tests
288+
--echo #

mysql-test/main/func_math.result

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,6 +2251,36 @@ SELECT ROUND( i, 18446744073709551594 ) AS f FROM t1;
22512251
f
22522252
DROP TABLE t1;
22532253
#
2254+
# MDEV-22268 virtual longlong Item_func_div::int_op(): Assertion `0' failed in Item_func_div::int_op
2255+
#
2256+
SET sql_mode='';
2257+
SET @@SESSION.div_precision_increment=0;
2258+
SELECT UTC_TIME / 0;
2259+
UTC_TIME / 0
2260+
NULL
2261+
SELECT TIMESTAMP'2001-01-01 00:00:00'/0;
2262+
TIMESTAMP'2001-01-01 00:00:00'/0
2263+
NULL
2264+
SELECT TIME'00:00:00'/0;
2265+
TIME'00:00:00'/0
2266+
NULL
2267+
CREATE TABLE t1 AS SELECT
2268+
UTC_TIME / 0 AS c1,
2269+
TIMESTAMP'2001-01-01 00:00:00'/0 AS c3,
2270+
TIME'00:00:00'/0 AS c4;
2271+
SHOW CREATE TABLE t1;
2272+
Table Create Table
2273+
t1 CREATE TABLE `t1` (
2274+
`c1` decimal(7,0) DEFAULT NULL,
2275+
`c3` decimal(14,0) DEFAULT NULL,
2276+
`c4` decimal(7,0) DEFAULT NULL
2277+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
2278+
DROP TABLE t1;
2279+
SELECT(-0 * MOD((UTC_TIME / -0)MOD (ATAN('<img src_x0=x onerror="javascript:alert(0)">') MOD COT(0)),-0)) MOD (0 DIV 0);
2280+
ERROR 22003: DOUBLE value is out of range in 'cot(0)'
2281+
SET @@SESSION.div_precision_increment=DEFAULT;
2282+
SET sql_mode=DEFAULT;
2283+
#
22542284
# End of 10.3 tests
22552285
#
22562286
#

0 commit comments

Comments
 (0)