| 9399 | */ |
| 9400 | |
| 9401 | void 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 | /** |
no test coverage detected