MCPcopy Create free account
hub / github.com/MariaDB/server / switch_defaults_to_nullable_trigger_fields

Function switch_defaults_to_nullable_trigger_fields

sql/sql_base.cc:9401–9420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9399*/
9400
9401void switch_defaults_to_nullable_trigger_fields(TABLE *table)
9402{
9403 if (!table->default_field)
9404 return; // no defaults
9405
9406 Field **trigger_field= table->field_to_fill();
9407
9408 /* True if we have NOT NULL fields and BEFORE triggers */
9409 if (*trigger_field != *table->field)
9410 {
9411 for (Field **field_ptr= table->default_field; *field_ptr ; field_ptr++)
9412 {
9413 Field *field= (*field_ptr);
9414 field->default_value->expr->
9415 walk(&Item::switch_to_nullable_fields_processor,
9416 trigger_field, WALK_SUBQUERY);
9417 *field_ptr= (trigger_field[field->field_index]);
9418 }
9419 }
9420}
9421
9422
9423/**

Callers 2

get_local_tableMethod · 0.85
open_table_from_shareFunction · 0.85

Calls 2

field_to_fillMethod · 0.80
walkMethod · 0.45

Tested by

no test coverage detected