Hi, Merve!
On Feb 13, Merve Soner wrote:
>
> Hi all,
>
> I am trying to implement an automatic insert function inside MySQL. In
> other words, when a SELECT query is run on the first table the result
> of this query should be written to another table.
>
> I tried to hold handler of second table when mysql_create_table
> function (inside sql_table.cc) is called and then use its ha_write_row
> function. It did not work. The values in the structure was not set
> properly. How can I access handler functions (like ha_write_row or
> write_row) of the second table? Where is handler structure filled
> properly?
You need to open your second table and lock it - which basically means
you need to add it to the list of tables that the main query wants to
open, to have all tables opened at the same time.
But why do you need that, what are you trying to achieve ?
Regards,
Sergei