| 164 | */ |
| 165 | |
| 166 | Item * |
| 167 | Statement_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 | /** |
nothing calls this directly
no test coverage detected