MCPcopy Index your code
hub / github.com/pingcap/tidb / GetColOriginDefaultValueWithoutStrictSQLMode

Function GetColOriginDefaultValueWithoutStrictSQLMode

pkg/table/column.go:558–562  ·  view source on GitHub ↗

GetColOriginDefaultValueWithoutStrictSQLMode gets default value of the column from original default value with Strict SQL mode.

(ctx expression.BuildContext, col *model.ColumnInfo)

Source from the content-addressed store, hash-verified

556
557// GetColOriginDefaultValueWithoutStrictSQLMode gets default value of the column from original default value with Strict SQL mode.
558func GetColOriginDefaultValueWithoutStrictSQLMode(ctx expression.BuildContext, col *model.ColumnInfo) (types.Datum, error) {
559 return getColDefaultValue(ctx, col, col.GetOriginDefaultValue(), &getColOriginDefaultValue{
560 StrictSQLMode: false,
561 })
562}
563
564// CheckNoDefaultValueForInsert checks if the column has no default value before insert data.
565// CheckNoDefaultValueForInsert extracts the check logic from getColDefaultValueFromNil,

Callers 3

SetPBColumnsDefaultValueFunction · 0.92
buildMemTableReaderFunction · 0.92
getColIDAndPkColIDsFunction · 0.92

Calls 2

getColDefaultValueFunction · 0.85
GetOriginDefaultValueMethod · 0.80

Tested by

no test coverage detected