MySQL Forums
Forum List  »  Newbie

MySQL source code, finding query result records.
Posted by: Roey ko
Date: March 14, 2012 10:02AM

for the question i create table: clients table(id,name) no pk.

does any one knows where and how, can i see the result-set (all the records) for any select query in my sql dbms source code.


i saw this function 'sub_select', the problem was that i could only see the first column of the select * from clients query (aka 'id' columns)

i also assisted the book: Expert
MySQL.

my target is to analyze the content of the query result, and to decide weather the client authorized to see those result by it's predifined sensitivity clearence.

in short: i want to see all the records include all thier columns in some way in the data base.


sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)

{
join_tab->table->null_row=0;
if (end_of_records)

return (*join_tab->next_select)(join,join_tab+1,end_of_records);

int error;
enum_nested_loop_state rc;
READ_RECORD *info= &join_tab->read_record;
//printf((info->record));
join->return_tab= join_tab;
if (join_tab->last_inner)
{
/* join_tab is the first inner table for an outer join operation. */
/* Set initial state of guard variables for this table.*/
join_tab->found=0;
join_tab->not_null_compl= 1;
/* Set first_unmatched for the last inner table of this group */
join_tab->last_inner->first_unmatched= join_tab;
}
join->thd->warning_info->reset_current_row_for_warning();
error= (*join_tab->read_first_record)(join_tab);
rc= evaluate_join_record(join, join_tab, error);
while (rc == NESTED_LOOP_OK)
{
error= info->read_record(info);
rc= evaluate_join_record(join, join_tab, error);
}

if (rc == NESTED_LOOP_NO_MORE_ROWS &&
join_tab->last_inner && !join_tab->found)
rc= evaluate_null_complemented_join_record(join, join_tab);
if (rc == NESTED_LOOP_NO_MORE_ROWS)
rc= NESTED_LOOP_OK;
return rc;

}



i appreciate any kind of help,
tnx.

Options: ReplyQuote


Subject
Written By
Posted
MySQL source code, finding query result records.
March 14, 2012 10:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.