MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
field_conv.cc File Reference

Functions to copy data to or from fields. More...

#include "sql_priv.h"
#include "sql_class.h"
#include "sql_time.h"
#include <m_ctype.h>
Include dependency graph for field_conv.cc:

Go to the source code of this file.

Functions

type_conversion_status set_field_to_null (Field *field)
type_conversion_status set_field_to_null_with_conversions (Field *field, bool no_conversions)
type_conversion_status copy_time_to_time (Field *from, Field *to)
type_conversion_status field_conv (Field *to, Field *from)

Detailed Description

Functions to copy data to or from fields.

This could be done with a single short function but opencoding this gives much more speed.

Definition in file field_conv.cc.

Function Documentation

type_conversion_status field_conv ( Field to,
Field from 
)

Simple quick field convert that is called on insert.

Definition at line 784 of file field_conv.cc.

Here is the caller graph for this function:

type_conversion_status set_field_to_null_with_conversions ( Field field,
bool  no_conversions 
)

Set field to NULL or TIMESTAMP or to next auto_increment number.

Parameters
fieldField to update
no_conversionsSet to 1 if we should return 1 if field can't take null values. If set to 0 we will do store the 'default value' if the field is a special field. If not we will give an error.
Return values
0Field could take 0 or an automatic conversion was used
-1Field could not take NULL and no conversion was used. If no_conversion was not set, an error message is printed

Definition at line 144 of file field_conv.cc.

Here is the call graph for this function:

Here is the caller graph for this function: