[MDEV-8644] Using a UDF in a virtual column causes a crash when stopping the server Created: 2015-08-18 Updated: 2015-12-08 Resolved: 2015-12-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Virtual Columns |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 5.5.47, 10.0.23, 10.1.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Olivier Bertrand | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | UDF, Virtual | ||
| Attachments: |
|
| Description |
|
Because MariaDB does not accept a constant virtual column (other DBMS's do) I was obliged to write the noconst UDF as:
Now, creating the table t1, inserting one line to it and displaying it does work:
However, later on when stopping the server a crash occurs in the function:
See the attach udf_crash.log. |
| Comments |
| Comment by Elena Stepanova [ 2015-08-18 ] | |||||||||||||||||
|
That's a surprise it works at all, documentation says UDFs are not allowed for virtual columns. bertrandop, | |||||||||||||||||
| Comment by Olivier Bertrand [ 2015-08-18 ] | |||||||||||||||||
|
Done. | |||||||||||||||||
| Comment by Elena Stepanova [ 2015-09-16 ] | |||||||||||||||||
|
| |||||||||||||||||
| Comment by Sergei Golubchik [ 2015-12-06 ] | |||||||||||||||||
|
I cannot repeat this. elenst, could you please show a complete test case? | |||||||||||||||||
| Comment by Elena Stepanova [ 2015-12-06 ] | |||||||||||||||||
|
I do the following:
Reproducible on 5.5 commit 13ad179c96ee8c8c4043806b8575c851e3676f0d - | |||||||||||||||||
| Comment by Olivier Bertrand [ 2015-12-08 ] | |||||||||||||||||
|
Does this mean that UDFs are no more banned from virtual columns? | |||||||||||||||||
| Comment by Sergei Golubchik [ 2015-12-08 ] | |||||||||||||||||
|
They were not banned, were they? If they were banned, one would not be able to create a virtual column with a UDF in the first place. | |||||||||||||||||
| Comment by Elena Stepanova [ 2015-12-08 ] | |||||||||||||||||
|
serg, it was the point of my initial comment: the documentation says they cannot be used, while in fact they can. |