Commit 28f81366 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Merge tag 'upstream/5.5.58' into ubuntu-14.04

Upstream version 5.5.58

# gpg: Signature made la 30. joulukuuta 2017 17.55.25 EET
# gpg:                using RSA key BED8449FCEE8DA88
# gpg: Good signature from "Otto Kekäläinen <otto@seravo.fi>" [full]
# gpg:                 aka "Otto Kekäläinen <otto@kekalainen.net>" [full]
# gpg:                 aka "Otto Kekäläinen <otto@fsfe.org>" [full]
# gpg:                 aka "Otto Kekäläinen <otto@linux.com>" [full]
# gpg:                 aka "Otto Kekäläinen <otto.kekalainen@seravo.fi>" [full]
# gpg:                 aka "Otto Kekäläinen <otto@mariadb.org>" [undefined]
# gpg:                 aka "Otto Kekäläinen <otto@debian.org>" [undefined]
# gpg:                 aka "Otto Kekäläinen <otto@sange.fi>" [full]
parents d84cded3 fa5f29ea
......@@ -2741,7 +2741,7 @@ static my_bool translog_recover_page_up_to_sector(uchar *page, uint16 offset)
DBUG_PRINT("enter", ("offset: %u first chunk: %u",
(uint) offset, (uint) chunk_offset));
while (page[chunk_offset] != TRANSLOG_FILLER && chunk_offset < offset)
while (chunk_offset < offset && page[chunk_offset] != TRANSLOG_FILLER)
{
uint16 chunk_length;
if ((chunk_length=
......
......@@ -3059,7 +3059,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const
case LOGREC_REDO_INDEX:
case LOGREC_REDO_INDEX_FREE_PAGE:
index_page_redo_entry= 1;
/* Fall trough*/
/* fall through*/
case LOGREC_REDO_INSERT_ROW_HEAD:
case LOGREC_REDO_INSERT_ROW_TAIL:
case LOGREC_REDO_PURGE_ROW_HEAD:
......
......@@ -150,6 +150,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
if (info->s->data_file_type != DYNAMIC_RECORD)
break;
/* Remove read/write cache if dynamic rows */
/* fall through */
case HA_EXTRA_NO_CACHE:
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
......@@ -262,7 +263,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
//share->deleting= TRUE;
share->global_changed= FALSE; /* force writing changed flag */
_mi_mark_file_changed(info);
/* Fall trough */
/* fall through */
case HA_EXTRA_PREPARE_FOR_RENAME:
mysql_mutex_lock(&THR_LOCK_myisam);
share->last_version= 0L; /* Impossible version */
......
......@@ -1661,13 +1661,16 @@ bool CSphSEQuery::ParseField ( char * sField )
char * sLat = sValue;
char * p = sValue;
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0';
if (!( p = strchr ( p, ',' ) )) break;
*p++ = '\0';
char * sLong = p;
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0';
if (!( p = strchr ( p, ',' ) )) break;
*p++ = '\0';
char * sLatVal = p;
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0';
if (!( p = strchr ( p, ',' ) )) break;
*p++ = '\0';
char * sLongVal = p;
m_sGeoLatAttr = chop(sLat);
......@@ -1736,7 +1739,8 @@ bool CSphSEQuery::ParseField ( char * sField )
while ( sRest )
{
char * sId = sRest;
if (!( sRest = strchr ( sRest, ':' ) )) break; *sRest++ = '\0';
if (!( sRest = strchr ( sRest, ':' ) )) break;
*sRest++ = '\0';
if (!( sRest - sId )) break;
char * sValue = sRest;
......
......@@ -100,6 +100,7 @@ endmacro(append_cflags_if_supported)
set_cflags_if_supported(-Wno-missing-field-initializers)
append_cflags_if_supported(-Wno-vla)
append_cflags_if_supported(-Wno-implicit-fallthrough)
ADD_SUBDIRECTORY(ft-index)
......
......@@ -38,7 +38,7 @@ ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT
CREATE TABLE t2 (a char(256));
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
CREATE TABLE t1 (a varchar(70000) default "hello");
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
CREATE TABLE t2 (a blob default "hello");
ERROR 42000: BLOB/TEXT column 'a' can't have a default value
drop table if exists t1,t2;
......
......@@ -2,6 +2,7 @@
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2017, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
......@@ -3376,7 +3377,6 @@ btr_cur_pessimistic_delete(
ulint n_reserved;
ibool success;
ibool ret = FALSE;
ulint level;
mem_heap_t* heap;
ulint* offsets;
......@@ -3425,6 +3425,8 @@ btr_cur_pessimistic_delete(
#endif /* UNIV_ZIP_DEBUG */
}
lock_update_delete(block, rec);
if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
&& UNIV_UNLIKELY(dict_index_get_page(index)
!= buf_block_get_page_no(block))) {
......@@ -3440,10 +3442,7 @@ btr_cur_pessimistic_delete(
goto return_after_reservations;
}
lock_update_delete(block, rec);
level = btr_page_get_level(page, mtr);
if (level > 0
if (!page_is_leaf(page)
&& UNIV_UNLIKELY(rec == page_rec_get_next(
page_get_infimum_rec(page)))) {
......@@ -3466,6 +3465,7 @@ btr_cur_pessimistic_delete(
on a page, we have to change the father node pointer
so that it is equal to the new leftmost node pointer
on the page */
ulint level = btr_page_get_level(page, mtr);
btr_node_ptr_delete(index, block, mtr);
......
......@@ -6144,7 +6144,7 @@ ha_innobase::innobase_lock_autoinc(void)
break;
}
}
/* Fall through to old style locking. */
/* fall through */
case AUTOINC_OLD_STYLE_LOCKING:
error = row_lock_table_autoinc_for_mysql(prebuilt);
......@@ -8190,7 +8190,7 @@ create_options_are_valid(
case ROW_TYPE_DYNAMIC:
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE;
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
/* fall through since dynamic also shuns KBS */
/* fall through */ /* since dynamic also shuns KBS */
case ROW_TYPE_COMPACT:
case ROW_TYPE_REDUNDANT:
if (kbs_specified) {
......@@ -8436,6 +8436,7 @@ ha_innobase::create(
thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: assuming ROW_FORMAT=COMPACT.");
/* fall through */
case ROW_TYPE_DEFAULT:
case ROW_TYPE_COMPACT:
flags = DICT_TF_COMPACT;
......
......@@ -477,7 +477,7 @@ dtype_get_fixed_size_low(
#else /* !UNIV_HOTBACKUP */
return(len);
#endif /* !UNIV_HOTBACKUP */
/* fall through for variable-length charsets */
/* fall through */
case DATA_VARCHAR:
case DATA_BINARY:
case DATA_DECIMAL:
......
......@@ -170,7 +170,7 @@ page_zip_rec_needs_ext(
ignored if zip_size == 0 */
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
{
ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES);
ut_ad(rec_size > (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
ut_ad(ut_is_2pow(zip_size));
ut_ad(comp || !zip_size);
......
......@@ -64,7 +64,7 @@ component, i.e. we show M.N.P as M.N */
(INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR)
#ifndef PERCONA_INNODB_VERSION
#define PERCONA_INNODB_VERSION 38.8
#define PERCONA_INNODB_VERSION 38.9
#endif
#define INNODB_VERSION_STR "5.5.55-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION)
......
......@@ -3635,7 +3635,7 @@ row_drop_table_for_mysql(
row_mysql_handle_errors(&err, trx, NULL, NULL);
/* Fall through to raise error */
/* fall through */ /* to raise error */
default:
/* No other possible error returns */
......@@ -4455,7 +4455,7 @@ row_check_index_for_mysql(
fputs(" InnoDB: Warning: CHECK TABLE on ", stderr);
dict_index_name_print(stderr, prebuilt->trx, index);
fprintf(stderr, " returned %lu\n", ret);
/* fall through (this error is ignored by CHECK TABLE) */
/* fall through */ /* this error is ignored by CHECK TABLE */
case DB_END_OF_INDEX:
func_exit:
mem_free(buf);
......
......@@ -407,8 +407,8 @@ row_purge_remove_sec_if_poss_leaf(
goto func_exit;
}
}
/* fall through (the index entry is still needed,
or the deletion succeeded) */
/* the index entry is still needed, or the deletion succeeded */
/* fall through */
case ROW_NOT_DELETED_REF:
/* The index entry is still needed. */
case ROW_BUFFERED:
......
......@@ -2678,6 +2678,7 @@ row_sel_field_store_in_mysql_format(
case DATA_SYS:
/* These column types should never be shipped to MySQL. */
ut_ad(0);
/* fall through */
case DATA_CHAR:
case DATA_FIXBINARY:
......
......@@ -730,7 +730,7 @@ trx_sys_doublewrite_init_or_restore_pages(
TRUE, read_buf, zip_size))) {
fprintf(stderr,
"InnoDB: Warning: database page"
"InnoDB: Database page"
" corruption or a failed\n"
"InnoDB: file read of"
" space %lu page %lu.\n"
......
......@@ -2488,14 +2488,18 @@ static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_TOOSMALLN(count);
switch (count) {
/* Fall through all cases!!! */
#ifdef UNICODE_32BIT
case 6: r[5] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x4000000;
/* fall through */
case 5: r[4] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x200000;
/* fall through */
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
#endif
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
......@@ -2521,9 +2525,10 @@ static int my_uni_utf8_no_range(CHARSET_INFO *cs __attribute__((unused)),
switch (count)
{
/* Fall through all cases!!! */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
......@@ -4979,10 +4984,12 @@ my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_TOOSMALLN(count);
switch (count) {
/* Fall through all cases!!! */
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
......@@ -5011,10 +5018,12 @@ my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
switch (count)
{
/* Fall through all cases!!! */
case 4: r[3]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
......
......@@ -1377,7 +1377,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
switch (*s) {
case '-':
sign= 1;
/* no break */
/* fall through */
case '+':
s++;
goto break2;
......@@ -1465,10 +1465,9 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
esign= 0;
if (++s < end)
switch (c= *s) {
case '-':
esign= 1;
case '+':
c= *++s;
case '-': esign= 1;
/* fall through */
case '+': c= *++s;
}
if (s < end && c >= '0' && c <= '9')
{
......@@ -2360,7 +2359,7 @@ static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
break;
case 2:
leftright= 0;
/* no break */
/* fall through */
case 4:
if (ndigits <= 0)
ndigits= 1;
......@@ -2368,7 +2367,7 @@ static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
break;
case 3:
leftright= 0;
/* no break */
/* fall through */
case 5:
i= ndigits + k + 1;
ilim= i;
......
Supports Markdown
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