Bug #84037 | Error on insert JSON data to a table with generated columns from a SP | ||
---|---|---|---|
Submitted: | 2 Dec 2016 6:51 | Modified: | 2 Dec 2016 7:12 |
Reporter: | Alfredo Kojima | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | 5.7.17, 5.7.16 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[2 Dec 2016 6:51]
Alfredo Kojima
[2 Dec 2016 7:12]
MySQL Verification Team
Hello Alfredo, Thank you for the bug report and test case. verified as described. Thanks, Umesh
[2 Dec 2016 11:07]
Knut Anders Hatlen
Posted by developer: It seems to work if the stored procedure's parameter is renamed to something different from "content". It looks like the name resolution confuses the procedure's "content" parameter and the table's "content" column somehow. The problem can also be seen without any JSON columns or JSON functions: create table t(x int, y int generated always as (x+1)); delimiter $$ create procedure sp(in x int) begin insert into t (t.x) values (x); end$$ delimiter ; call sp(1); --> ERROR 3102 (HY000): Expression of generated column 'y' contains a disallowed function.
[9 Sep 2021 14:05]
Srđan Majstorović
Just wanted to thank you for this Knut!