MySQL Internals Manual  /  ...  /  change_columns()

18.1.2 change_columns()

Prototype: virtual bool change_columns(List<Item> &field_list);

Here you can change the structure of the result field list, for example, you can add fields to the field_list or replace the queries result fields by something completely different alltogether (like PROCEDURE ANALYSE() does).

An example that adds an INTEGER field at the end of the field list:

bool proc_rownum::change_columns(List<Item> &field_list)

   // create a new column item
   row_num_column = new Item_proc_int("RowNum");

   // and attach it to the column list

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.