| 1192 | */ |
| 1193 | |
| 1194 | bool TABLE_LIST::fill_recursive(THD *thd) |
| 1195 | { |
| 1196 | bool rc= false; |
| 1197 | st_select_lex_unit *unit= get_unit(); |
| 1198 | rc= with->instantiate_tmp_tables(); |
| 1199 | while (!rc && !with->all_are_stabilized()) |
| 1200 | { |
| 1201 | if (with->level > thd->variables.max_recursive_iterations) |
| 1202 | { |
| 1203 | push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, |
| 1204 | ER_QUERY_RESULT_INCOMPLETE, |
| 1205 | ER_THD(thd, ER_QUERY_RESULT_INCOMPLETE), |
| 1206 | "max_recursive_iterations =", |
| 1207 | (ulonglong)thd->variables.max_recursive_iterations); |
| 1208 | break; |
| 1209 | } |
| 1210 | with->prepare_for_next_iteration(); |
| 1211 | rc= unit->exec_recursive(); |
| 1212 | } |
| 1213 | if (!rc) |
| 1214 | { |
| 1215 | TABLE *src= with->rec_result->table; |
| 1216 | rc =src->insert_all_rows_into_tmp_table(thd, |
| 1217 | table, |
| 1218 | &with->rec_result->tmp_table_param, |
| 1219 | true); |
| 1220 | } |
| 1221 | return rc; |
| 1222 | } |
| 1223 | |
| 1224 | |
| 1225 | /* |
no test coverage detected