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

Method compute_values_for_current_row

sql/sql_window.cc:2267–2287  ·  view source on GitHub ↗

Scan the rows between the top bound and bottom bound. Add all the values between them, top bound row and bottom bound row inclusive. */

Source from the content-addressed store, hash-verified

2265 /* Scan the rows between the top bound and bottom bound. Add all the values
2266 between them, top bound row and bottom bound row inclusive. */
2267 void compute_values_for_current_row()
2268 {
2269 if (top_bound.is_outside_computation_bounds() ||
2270 bottom_bound.is_outside_computation_bounds())
2271 return;
2272
2273 ha_rows start_rownum= top_bound.get_curr_rownum();
2274 ha_rows bottom_rownum= bottom_bound.get_curr_rownum();
2275 DBUG_PRINT("info", ("COMPUTING (%llu %llu)", start_rownum, bottom_rownum));
2276
2277 cursor.move_to(start_rownum);
2278
2279 for (ha_rows idx= start_rownum; idx <= bottom_rownum; idx++)
2280 {
2281 if (cursor.fetch()) //EOF
2282 break;
2283 add_value_to_items();
2284 if (cursor.next()) // EOF
2285 break;
2286 }
2287 }
2288};
2289
2290/* A cursor that follows a target cursor. Each time a new row is added,

Callers

nothing calls this directly

Calls 5

move_toMethod · 0.80
get_curr_rownumMethod · 0.45
fetchMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected