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

Method get_value

sql/sql_get_diagnostics.cc:166–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164*/
165
166Item *
167Statement_information_item::get_value(THD *thd, const Diagnostics_area *da)
168{
169 Item *value= NULL;
170 DBUG_ENTER("Statement_information_item::get_value");
171
172 switch (m_name)
173 {
174 /*
175 The number of condition areas that have information. That is,
176 the number of errors and warnings within the diagnostics area.
177 */
178 case NUMBER:
179 {
180 ulong count= da->cond_count();
181 value= new (thd->mem_root) Item_uint(thd, count);
182 break;
183 }
184 /*
185 Number that shows how many rows were directly affected by
186 a data-change statement (INSERT, UPDATE, DELETE, MERGE,
187 REPLACE, LOAD).
188 */
189 case ROW_COUNT:
190 value= new (thd->mem_root) Item_int(thd, thd->get_row_count_func());
191 break;
192 }
193
194 DBUG_RETURN(value);
195}
196
197
198/**

Callers

nothing calls this directly

Calls 4

get_row_count_funcMethod · 0.80
cond_countMethod · 0.45
set_asciiMethod · 0.45
get_sqlstateMethod · 0.45

Tested by

no test coverage detected