summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-02 13:46:36 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-02 13:46:36 +0300
commit5633f83ca42ac6f035cf2c18ae11b3b7639b1f7e (patch)
tree8d6d40d675c9cd46ca7ea1a75558f6bbc28039af /storage/innobase
parent8650848ec31039fb95dc74ca3b40904b941eaedd (diff)
downloadmariadb-git-5633f83ca42ac6f035cf2c18ae11b3b7639b1f7e.tar.gz
Fix integer type mismatch
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/handler/handler0alter.cc3
-rw-r--r--storage/innobase/include/pars0sym.h4
-rw-r--r--storage/innobase/pars/pars0pars.cc9
3 files changed, 8 insertions, 8 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index d3d250e1026..bfbe70a0fda 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -3024,7 +3024,8 @@ innobase_build_col_map(
== dict_table_get_n_cols(new_table));
DBUG_ASSERT(table->s->stored_fields > 0);
- const size_t old_n_v_cols = table->s->fields - table->s->stored_fields;
+ const uint old_n_v_cols = uint(table->s->fields
+ - table->s->stored_fields);
DBUG_ASSERT(old_n_v_cols == old_table->n_v_cols
|| table->s->frm_version < FRM_VER_EXPRESSSIONS);
DBUG_ASSERT(!old_n_v_cols || table->s->virtual_fields);
diff --git a/storage/innobase/include/pars0sym.h b/storage/innobase/include/pars0sym.h
index c9a5bb5fac2..5108db79322 100644
--- a/storage/innobase/include/pars0sym.h
+++ b/storage/innobase/include/pars0sym.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -224,7 +224,7 @@ struct sym_tab_t{
/*!< SQL string to parse */
size_t string_len;
/*!< SQL string length */
- int next_char_pos;
+ size_t next_char_pos;
/*!< position of the next character in
sql_string to give to the lexical
analyzer */
diff --git a/storage/innobase/pars/pars0pars.cc b/storage/innobase/pars/pars0pars.cc
index b4b9af4baa6..fbc97e07d8b 100644
--- a/storage/innobase/pars/pars0pars.cc
+++ b/storage/innobase/pars/pars0pars.cc
@@ -2065,9 +2065,8 @@ pars_get_lex_chars(
size_t max_size) /*!< in: maximum number of characters which fit
in the buffer */
{
- size_t len = size_t(
- pars_sym_tab_global->string_len
- - pars_sym_tab_global->next_char_pos);
+ size_t len = pars_sym_tab_global->string_len
+ - pars_sym_tab_global->next_char_pos;
if (len == 0) {
return(0);
}
@@ -2076,8 +2075,8 @@ pars_get_lex_chars(
len = max_size;
}
- ut_memcpy(buf, pars_sym_tab_global->sql_string
- + pars_sym_tab_global->next_char_pos, len);
+ memcpy(buf, pars_sym_tab_global->sql_string
+ + pars_sym_tab_global->next_char_pos, len);
pars_sym_tab_global->next_char_pos += len;