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

Method next

sql/sql_join_cache.cc:3527–3563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3525*/
3526
3527int JOIN_TAB_SCAN::next()
3528{
3529 int err= 0;
3530 int skip_rc;
3531 READ_RECORD *info= &join_tab->read_record;
3532 SQL_SELECT *select= join_tab->cache_select;
3533 THD *thd= join->thd;
3534
3535 if (is_first_record)
3536 is_first_record= FALSE;
3537 else
3538 err= info->read_record();
3539
3540 if (!err)
3541 {
3542 join_tab->tracker->r_rows++;
3543 }
3544
3545 while (!err && select && (skip_rc= select->skip_record(thd)) <= 0)
3546 {
3547 if (unlikely(thd->check_killed()) || skip_rc < 0)
3548 return 1;
3549 /*
3550 Move to the next record if the last retrieved record does not
3551 meet the condition pushed to the table join_tab.
3552 */
3553 err= info->read_record();
3554 if (!err)
3555 {
3556 join_tab->tracker->r_rows++;
3557 }
3558 }
3559
3560 if (!err)
3561 join_tab->tracker->r_rows_after_where++;
3562 return err;
3563}
3564
3565
3566/*

Callers 1

join_matching_recordsMethod · 0.45

Calls 5

read_recordMethod · 0.80
check_killedMethod · 0.80
skip_recordMethod · 0.45
multi_range_read_nextMethod · 0.45

Tested by

no test coverage detected