summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorNuno Carvalho <nuno.carvalho@oracle.com>2012-10-21 20:28:19 +0100
committerNuno Carvalho <nuno.carvalho@oracle.com>2012-10-21 20:28:19 +0100
commit62503f9cf5af989107e887925816add9b4aec950 (patch)
tree87bc1551bd016489e5cd32293b61a2a999dbd914 /sql
parentaadd8ba6959f6e1a05aa9ab42fe7b7d98767b82f (diff)
downloadmariadb-git-62503f9cf5af989107e887925816add9b4aec950.tar.gz
BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS
Moved explicit instantiation of available_buffer and valid_buffer_range template functions to sql/log_event.cc.
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc16
-rw-r--r--sql/mysql_priv.h9
2 files changed, 16 insertions, 9 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 0ad258f7073..58de0d310d7 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -54,6 +54,22 @@
*/
#define FMT_G_BUFSIZE(PREC) (3 + (PREC) + 5 + 1)
+/*
+ Explicit instantiation to unsigned int of template available_buffer
+ function.
+*/
+template unsigned int available_buffer<unsigned int>(const char*,
+ const char*,
+ unsigned int);
+
+/*
+ Explicit instantiation to unsigned int of template valid_buffer_range
+ function.
+*/
+template bool valid_buffer_range<unsigned int>(unsigned int,
+ const char*,
+ const char*,
+ unsigned int);
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD* thd);
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 05a37228e17..4741562cab3 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -516,10 +516,6 @@ template <class T> T available_buffer(const char* buf_start,
{
return buf_len - (buf_current - buf_start);
}
-/* Explicit instantion to unsigned int. */
-template unsigned int available_buffer<unsigned int>(const char*,
- const char*,
- unsigned int);
/*
Check if jump value is within buffer limits.
@@ -539,11 +535,6 @@ template <class T> bool valid_buffer_range(T jump,
{
return (jump <= available_buffer(buf_start, buf_current, buf_len));
}
-/* Explicit instantion to unsigned int. */
-template bool valid_buffer_range<unsigned int>(unsigned int,
- const char*,
- const char*,
- unsigned int);
/* The rest of the file is included in the server only */
#ifndef MYSQL_CLIENT