summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc12
-rw-r--r--sql/field.h1
-rw-r--r--sql/unireg.cc1
3 files changed, 13 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc
index bb4530dc377..57279298cbd 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2619,6 +2619,18 @@ void Field_new_decimal::sql_type(String &str) const
}
+uint Field_new_decimal::is_equal(create_field *new_field)
+{
+ return ((new_field->sql_type == real_type()) &&
+ ((new_field->flags & UNSIGNED_FLAG) ==
+ (uint) (flags & UNSIGNED_FLAG)) &&
+ ((new_field->flags & AUTO_INCREMENT_FLAG) ==
+ (uint) (flags & AUTO_INCREMENT_FLAG)) &&
+ (new_field->length == max_length()) &&
+ (new_field->decimals == dec));
+}
+
+
/****************************************************************************
** tiny int
****************************************************************************/
diff --git a/sql/field.h b/sql/field.h
index 55f2c037109..b1221e34cc5 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -516,6 +516,7 @@ public:
uint32 max_length() { return field_length; }
uint size_of() const { return sizeof(*this); }
uint32 pack_length() const { return (uint32) bin_size; }
+ uint is_equal(create_field *new_field);
};
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 42518e7b9b7..426debab7d8 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -24,7 +24,6 @@
str is a (long) to record position where 0 is the first position.
*/
-#define USES_TYPES
#include "mysql_priv.h"
#include <m_ctype.h>
#include <assert.h>