[tarantool-patches] Re: [PATCH 1/2] sql: remove "PRAGMA case_sensitive_like"

n.pettik korablev at tarantool.org
Wed Jul 17 19:18:48 MSK 2019



> On 14 Jul 2019, at 01:51, Roman Khabibov <roman.habibov at tarantool.org> wrote:
> 
> According to ANSI, LIKE should match characters taking into
> account passed collation, so this pragma is no longer needed.

Can’t build this particular patch:

/Users/n.pettik/tarantool/src/box/sql/func.c:1795:1: error: conflicting types for 'sql_is_like_func'
sql_is_like_func(struct sql *db, struct Expr *expr, int *is_like_ci)
^
/Users/n.pettik/tarantool/src/box/sql/sqlInt.h:4277:1: note: previous declaration is here
sql_is_like_func(struct sql *db, struct Expr *expr);
^
/Users/n.pettik/tarantool/src/box/sql/func.c:1805:35: error: use of undeclared identifier 'SQL_FUNC_CASE'
        *is_like_ci = (func->funcFlags & SQL_FUNC_CASE) == 0;
                                         ^
2 errors generated.
make[2]: *** [src/box/sql/CMakeFiles/sql.dir/func.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/box/sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2

Please, fix compilation errors.

> diff --git a/test/sql-tap/pragma.test.lua b/test/sql-tap/pragma.test.lua
> index 8221d36e6..d8fb550d0 100755
> --- a/test/sql-tap/pragma.test.lua
> +++ b/test/sql-tap/pragma.test.lua
> @@ -81,21 +81,16 @@ test:do_execsql_test(
> 	-- </pragma-3.2>
> })
> 
> --- Check that "PRAGMA case_sensitive_like" returns its status
> --- (0 or 1) if called without parameter.
> -test:do_test(
> +-- Check that "PRAGMA case_sensitive_like" does not exist.
> +test:do_catchsql_test(
> 	"pragma-3.3",
> -	function()
> -		old_value = box.execute('PRAGMA case_sensitive_like').rows
> -		box.execute('PRAGMA case_sensitive_like = 1')
> -		new_value = box.execute('PRAGMA case_sensitive_like').rows
> -		box.execute('PRAGMA case_sensitive_like = '.. old_value[1][1])
> -		return new_value[1][1]
> -	end,
> +	[[
> +		PRAGMA case_sensitive_like
> +	]], {
> 	-- <pragma-3.3>
> -	1
> +	1, "Pragma 'CASE_SENSITIVE_LIKE' does not exist"
> 	-- </pragma-3.3>
> -	)
> +})

Sorry, this test looks weird. Just remove it.






More information about the Tarantool-patches mailing list