Comments - String Literals

3 years, 4 months ago Tibor den Ouden

Is it possible to emit a warning when string literals are concatenated ? May be only when a specific option is set. The reason is that I got bitten by literal string concatenation in the following case: I have a given datamodel which contains enums in several records. Then there is code which based on the value of the enum field does certain processing. The code structure is typically like: if foo_bar in ('enum0', 'enum1', ...) then

If you forget to type the , then you get a different value to which foo_bar is never equal and you initially do not understand what is going on. A warning when the script is processed about literal concatenation would trigger some extra inspection.

 
8 months, 3 weeks ago Daniel Black

This would be covered by part of MDEV-4419 that is waiting for someone to implement

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.