when using substr in a query it returns a blank column Reproducible: Always Steps to Reproduce: 1. import text to a table 2. create a query using substr on a field of the table Actual Results: Returned column is blank Expected Results: the query should return the result of the substring (it works in the underlying sqlite3 backend)
Note: happens on both sqlite3 and mysql backends
Confirmed as a general issue. Set as NORMAL since relatively to other issues it's not above crash.
*** Bug 341557 has been marked as a duplicate of this bug. ***
Git commit 3696fa001fed690b6d9a4468d03e11e5038e5357 by Jaroslaw Staniek. Committed on 02/03/2015 at 23:54. Pushed by staniek into branch 'calligra/2.9'. Kexi queries/parser: make SUBSTR(X, Y [, Z]) built-in SQL function work This is a first step to make lots of functions work. https://community.kde.org/Kexi/Plugins/Queries/SQL_Functions#Functions Details: - add a few convenience functions to BaseExpr - N-arg expressions: make token-to-string function support char tokens - add KexiDBExpr_ArgumentList class ID for N-arg expressions (,,,,) - FunctionExpr: compute type and validation for SUBSTR() - parser: also support empty arg list "()" in functions REVIEW:122783 FIXED-IN:2.9.1 M +138 -11 libs/db/expression.cpp M +33 -3 libs/db/expression.h M +3 -2 libs/db/field.cpp M +796 -1117 libs/db/parser/sqlparser.cpp M +75 -88 libs/db/parser/sqlparser.h M +7 -7 libs/db/parser/sqlparser.y http://commits.kde.org/calligra/3696fa001fed690b6d9a4468d03e11e5038e5357
Git commit 4cb72f0de5901e6ea4a101b72c3d306322e5efc2 by Jaroslaw Staniek. Committed on 02/03/2015 at 23:54. Pushed by staniek into branch 'master'. Kexi queries/parser: make SUBSTR(X, Y [, Z]) built-in SQL function work This is a first step to make lots of functions work. https://community.kde.org/Kexi/Plugins/Queries/SQL_Functions#Functions Details: - add a few convenience functions to BaseExpr - N-arg expressions: make token-to-string function support char tokens - add KexiDBExpr_ArgumentList class ID for N-arg expressions (,,,,) - FunctionExpr: compute type and validation for SUBSTR() - parser: also support empty arg list "()" in functions REVIEW:122783 FIXED-IN:2.9.1 M +139 -12 libs/db/expression.cpp M +33 -3 libs/db/expression.h M +3 -2 libs/db/field.cpp M +796 -1117 libs/db/parser/sqlparser.cpp M +75 -88 libs/db/parser/sqlparser.h M +7 -7 libs/db/parser/sqlparser.y http://commits.kde.org/calligra/4cb72f0de5901e6ea4a101b72c3d306322e5efc2