summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.h
diff options
context:
space:
mode:
authorKnut Anders Hatlen <knut.hatlen@oracle.com>2016-01-07 12:53:18 +0100
committerKnut Anders Hatlen <knut.hatlen@oracle.com>2016-01-17 20:28:00 +0100
commit95825fa28a7e84a2f5dbdef5241078f7055c5b04 (patch)
tree516eb39b4ff3d1a9830506025b2d83fc487680e2 /sql/item_geofunc.h
parent79032a7ae1b4e000028a64ab0d2f216d4c23767b (diff)
downloadmariadb-git-95825fa28a7e84a2f5dbdef5241078f7055c5b04.tar.gz
Bug#21682356: STOP INJECTING DATA ITEMS IN AN ERROR MESSAGE
GENERATED BY THE EXP() FUNCTION When generating the error message for numeric overflow, pass a flag to Item::print() that prevents it from expanding constant expressions and parameters to the values they evaluate to. For consistency, also pass the flag to Item::print() when Item_func_spatial_collection::fix_length_and_dec() generates an error message. It doesn't make any difference at the moment, since constant expressions haven't been evaluated yet when this function is called.
Diffstat (limited to 'sql/item_geofunc.h')
-rw-r--r--sql/item_geofunc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 903257525f9..fe7ccf10fcc 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -1,7 +1,7 @@
#ifndef ITEM_GEOFUNC_INCLUDED
#define ITEM_GEOFUNC_INCLUDED
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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
@@ -187,7 +187,7 @@ public:
if (args[i]->fixed && args[i]->field_type() != MYSQL_TYPE_GEOMETRY)
{
String str;
- args[i]->print(&str, QT_ORDINARY);
+ args[i]->print(&str, QT_NO_DATA_EXPANSION);
str.append('\0');
my_error(ER_ILLEGAL_VALUE_FOR_TYPE, MYF(0), "non geometric",
str.ptr());