When I execute below query on a MemSQL sharded table, it runs fine and gives me the user who executed the query.
INSERT INTO `schema_Version` (`installed_rank`,`version`,`description`,`type`,`script`,`checksum`,`installed_by`,`execution_time`,`success`) VALUES (4, '2', 'First', 'SQL', 'V1__First.sql', 814278929, USER() ,147470, 1)
But if I run the same query against a MemSQL Reference table, I get a warning as below:
Warnings: --->
W (1): The query cannot be executed. MemSQL code generation has failed: g++ compilation error.
<---
Looks like the USER() is not supported in Reference table only. Is there any solution to this?
It looks like your running an older version of MemSQL. I tried the query above on MemSQL 5 and it worked. I recommend upgrading to the latest version of MemSQL, its painless (http://docs.memsql.com/docs/upgrading-memsql).