~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/get_user_var.cc

  • Committer: Eric Herman
  • Date: 2008-12-06 19:42:46 UTC
  • mto: (656.1.6 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206194246-5cdexuu81i366eek
removed trailing whitespace with simple script:

for file in $(find . -name "*.c") $(find . -name "*.cc") $(find . -name "*.h"); do ruby -pe 'gsub(/\s+$/, $/)' < $file > $file.out; mv $file.out $file; done;

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
}
61
61
 
62
62
/**
63
 
  Get variable by name and, if necessary, put the record of variable 
 
63
  Get variable by name and, if necessary, put the record of variable
64
64
  use into the binary log.
65
65
 
66
66
  When a user variable is invoked from an update query (INSERT, UPDATE etc),
90
90
  /*
91
91
    Any reference to user-defined variable which is done from stored
92
92
    function or trigger affects their execution and the execution of the
93
 
    calling statement. We must log all such variables even if they are 
 
93
    calling statement. We must log all such variables even if they are
94
94
    not involved in table-updating statements.
95
95
  */
96
96
  if (!(opt_bin_log && is_update_query(sql_command)))
112
112
      in dispatch_command()). Instead of building a one-element list to pass to
113
113
      sql_set_variables(), we could instead manually call check() and update();
114
114
      this would save memory and time; but calling sql_set_variables() makes
115
 
      one unique place to maintain (sql_set_variables()). 
 
115
      one unique place to maintain (sql_set_variables()).
116
116
 
117
117
      Manipulation with lex is necessary since free_underlaid_joins
118
118
      is going to release memory belonging to the main query.
137
137
  else if (var_entry->used_query_id == session->query_id ||
138
138
           drizzle_bin_log.is_query_in_union(session, var_entry->used_query_id))
139
139
  {
140
 
    /* 
 
140
    /*
141
141
       If this variable was already stored in user_var_events by this query
142
142
       (because it's used in more than one place in the query), don't store
143
143
       it.
155
155
    We have to write to binlog value @a= 1.
156
156
 
157
157
    We allocate the user_var_event on user_var_events_alloc pool, not on
158
 
    the this-statement-execution pool because in SPs user_var_event objects 
 
158
    the this-statement-execution pool because in SPs user_var_event objects
159
159
    may need to be valid after current [SP] statement execution pool is
160
160
    destroyed.
161
161
  */