| 1076 | */ |
| 1077 | |
| 1078 | int JOIN_CACHE::init(bool for_explain) |
| 1079 | { |
| 1080 | DBUG_ENTER("JOIN_CACHE::init"); |
| 1081 | |
| 1082 | for_explain_only= for_explain; |
| 1083 | |
| 1084 | calc_record_fields(); |
| 1085 | |
| 1086 | collect_info_on_key_args(); |
| 1087 | |
| 1088 | if (alloc_fields()) |
| 1089 | DBUG_RETURN(1); |
| 1090 | |
| 1091 | create_flag_fields(); |
| 1092 | |
| 1093 | create_key_arg_fields(); |
| 1094 | |
| 1095 | create_remaining_fields(); |
| 1096 | |
| 1097 | set_constants(); |
| 1098 | |
| 1099 | if (alloc_buffer()) |
| 1100 | DBUG_RETURN(1); |
| 1101 | |
| 1102 | reset(TRUE); |
| 1103 | |
| 1104 | DBUG_RETURN(0); |
| 1105 | } |
| 1106 | |
| 1107 | |
| 1108 | /* |
nothing calls this directly
no test coverage detected