summaryrefslogtreecommitdiff
path: root/innobase/include/data0data.ic
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/include/data0data.ic')
-rw-r--r--innobase/include/data0data.ic25
1 files changed, 25 insertions, 0 deletions
diff --git a/innobase/include/data0data.ic b/innobase/include/data0data.ic
index d356664df21..def80d3f430 100644
--- a/innobase/include/data0data.ic
+++ b/innobase/include/data0data.ic
@@ -406,3 +406,28 @@ data_write_sql_null(
data[j] = '\0';
}
}
+
+/**************************************************************************
+Checks if a dtuple contains an SQL null value. */
+UNIV_INLINE
+ibool
+dtuple_contains_null(
+/*=================*/
+ /* out: TRUE if some field is SQL null */
+ dtuple_t* tuple) /* in: dtuple */
+{
+ ulint n;
+ ulint i;
+
+ n = dtuple_get_n_fields(tuple);
+
+ for (i = 0; i < n; i++) {
+ if (dfield_get_len(dtuple_get_nth_field(tuple, i))
+ == UNIV_SQL_NULL) {
+
+ return(TRUE);
+ }
+ }
+
+ return(FALSE);
+}