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

Method start

sql/sql_lex.cc:1234–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1232*/
1233
1234void LEX::start(THD *thd_arg)
1235{
1236 DBUG_ENTER("LEX::start");
1237 DBUG_PRINT("info", ("This: %p thd_arg->lex: %p", this, thd_arg->lex));
1238
1239 thd= unit.thd= thd_arg;
1240 stmt_lex= this; // default, should be rewritten for VIEWs And CTEs
1241
1242 DBUG_ASSERT(!explain);
1243
1244 builtin_select.lex_start(this);
1245 lex_options= 0;
1246 context_stack.empty();
1247 //empty select_stack
1248 select_stack_top= 0;
1249 select_stack_outer_barrier= 0;
1250 unit.init_query();
1251 current_select_number= 0;
1252 curr_with_clause= 0;
1253 with_clauses_list= 0;
1254 with_clauses_list_last_next= &with_clauses_list;
1255 clone_spec_offset= 0;
1256 create_view= NULL;
1257 field_list.empty();
1258 value_list.empty();
1259 update_list.empty();
1260 set_var_list.empty();
1261 param_list.empty();
1262 view_list.empty();
1263 with_persistent_for_clause= FALSE;
1264 column_list= NULL;
1265 index_list= NULL;
1266 prepared_stmt.lex_start();
1267 auxiliary_table_list.empty();
1268 unit.next= unit.master= unit.link_next= unit.return_to= 0;
1269 unit.prev= unit.link_prev= 0;
1270 unit.slave= current_select= all_selects_list= &builtin_select;
1271 sql_cache= LEX::SQL_CACHE_UNSPECIFIED;
1272 describe= 0;
1273 context_analysis_only= 0;
1274 derived_tables= 0;
1275 with_cte_resolution= false;
1276 only_cte_resolution= false;
1277 parsing_options.reset();
1278 part_info= 0;
1279 m_sql_cmd= NULL;
1280 duplicates= DUP_ERROR;
1281 spname= NULL;
1282 spcont= NULL;
1283 proc_list.first= 0;
1284 query_tables= 0;
1285 save_list.empty();
1286 reset_query_tables_list(FALSE);
1287 clause_that_disallows_subselect= NULL;
1288
1289 /* reset bool variables */
1290 is_shutdown_wait_for_slaves= 0;
1291 selects_allow_procedure= 0;

Callers 1

lex_startFunction · 0.45

Calls 5

init_queryMethod · 0.80
clear_allMethod · 0.80
lex_startMethod · 0.45
emptyMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected