Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lua-luadbi for openSUSE:Factory checked in at 2025-11-06 18:13:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lua-luadbi (Old) and /work/SRC/openSUSE:Factory/.lua-luadbi.new.1980 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lua-luadbi" Thu Nov 6 18:13:08 2025 rev:10 rq:1315990 version:0.7.5 Changes: -------- --- /work/SRC/openSUSE:Factory/lua-luadbi/lua-luadbi.changes 2025-07-27 16:26:33.522469641 +0200 +++ /work/SRC/openSUSE:Factory/.lua-luadbi.new.1980/lua-luadbi.changes 2025-11-06 18:14:36.790991037 +0100 @@ -1,0 +2,24 @@ +Thu Nov 6 10:49:47 UTC 2025 - Matej Cepl <[email protected]> + +- Update to 0.7.5: + - Allow selecting values containing NUL byte + - Fixed overflow when retreving integer values larger than + 2^31-1 in SQLite3 + - Connections and Statements are now capable objects in Lua 5.4 + +------------------------------------------------------------------- +Tue Nov 4 13:09:09 UTC 2025 - Matej Cepl <[email protected]> + +- Use new lua-macros to Obsoletes: lua51-luadbi. + +------------------------------------------------------------------- +Fri Oct 24 14:49:00 UTC 2025 - Matej Cepl <[email protected]> + +- Switch off building lua51 build of the package. + +------------------------------------------------------------------- +Sun Oct 12 00:38:29 UTC 2025 - Matej Cepl <[email protected]> + +- Make the package buildable with LuaJIT. + +------------------------------------------------------------------- Old: ---- luadbi-0.7.4.tar.gz New: ---- luadbi-0.7.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lua-luadbi.spec ++++++ --- /var/tmp/diff_new_pack.7jXBsP/_old 2025-11-06 18:14:37.551023101 +0100 +++ /var/tmp/diff_new_pack.7jXBsP/_new 2025-11-06 18:14:37.555023270 +0100 @@ -18,7 +18,7 @@ %define flavor @BUILD_FLAVOR@ %define mod_name luadbi -Version: 0.7.4 +Version: 0.7.5 Release: 0 Summary: A database interface library for Lua License: MIT @@ -36,7 +36,7 @@ BuildRequires: postgresql-server-devel BuildRequires: sqlite3-devel Requires: %{flavor} -# %%lua_provides +%lua_provides %if "%{flavor}" == "" Name: lua-%{mod_name} ExclusiveArch: do_not_build @@ -72,7 +72,7 @@ %check # run tests -lua%{lua_version} %{SOURCE50} %{buildroot} +lua %{SOURCE50} %{buildroot} %files %license COPYING ++++++ _multibuild ++++++ --- /var/tmp/diff_new_pack.7jXBsP/_old 2025-11-06 18:14:37.607025464 +0100 +++ /var/tmp/diff_new_pack.7jXBsP/_new 2025-11-06 18:14:37.611025632 +0100 @@ -1,5 +1,5 @@ <multibuild> -<package>lua51</package> +<package>luajit</package> <package>lua53</package> <package>lua54</package> </multibuild> ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.7jXBsP/_old 2025-11-06 18:14:37.663027826 +0100 +++ /var/tmp/diff_new_pack.7jXBsP/_new 2025-11-06 18:14:37.675028333 +0100 @@ -1,6 +1,6 @@ -mtime: 1753474170 -commit: f5e8f92060de4cefe7255a88beeece8171b996dd6777eb0998cda0890c896c51 +mtime: 1762426405 +commit: ff15d59a330a00d4042f91193d52a3bf51d22c4c5ea951c8d2488d795760e5f6 url: https://src.opensuse.org/lua/lua-luadbi.git -revision: f5e8f92060de4cefe7255a88beeece8171b996dd6777eb0998cda0890c896c51 +revision: ff15d59a330a00d4042f91193d52a3bf51d22c4c5ea951c8d2488d795760e5f6 projectscmsync: https://src.opensuse.org/lua/_ObsPrj.git ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2025-11-06 11:53:47.000000000 +0100 @@ -0,0 +1,5 @@ +.osc +_scmsync.obsinfo +_buildconfig-* +_buildinfo-*.xml +lua-luadbi-*-build/ ++++++ luadbi-0.7.4.tar.gz -> luadbi-0.7.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/common.c new/luadbi-0.7.5/dbd/common.c --- old/luadbi-0.7.4/dbd/common.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/common.c 2025-07-11 18:49:01.000000000 +0200 @@ -103,7 +103,7 @@ void dbd_register(lua_State *L, const char *name, const luaL_Reg *methods, const luaL_Reg *class_methods, - lua_CFunction gc, lua_CFunction tostring) + lua_CFunction gc, lua_CFunction tostring, lua_CFunction close) { /* Create a new metatable with the given name and then assign the methods * to it. Set the __index, __gc and __tostring fields appropriately. @@ -123,6 +123,9 @@ lua_pushcfunction(L, tostring); lua_setfield(L, -2, "__tostring"); + lua_pushcfunction(L, close); + lua_setfield(L, -2, "__close"); + /* Create a new table and register the class methods with it */ lua_newtable(L); #if LUA_VERSION_NUM < 502 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/common.h new/luadbi-0.7.5/dbd/common.h --- old/luadbi-0.7.4/dbd/common.h 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/common.h 2025-07-11 18:49:01.000000000 +0200 @@ -157,4 +157,4 @@ void dbd_register(lua_State *L, const char *name, const luaL_Reg *methods, const luaL_Reg *class_methods, - lua_CFunction gc, lua_CFunction tostring); + lua_CFunction gc, lua_CFunction tostring, lua_CFunction close); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/db2/connection.c new/luadbi-0.7.5/dbd/db2/connection.c --- old/luadbi-0.7.4/dbd/db2/connection.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/db2/connection.c 2025-07-11 18:49:01.000000000 +0200 @@ -266,7 +266,7 @@ dbd_register(L, DBD_DB2_CONNECTION, connection_methods, connection_class_methods, - connection_gc, connection_tostring); + connection_gc, connection_tostring, connection_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/db2/statement.c new/luadbi-0.7.5/dbd/db2/statement.c --- old/luadbi-0.7.4/dbd/db2/statement.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/db2/statement.c 2025-07-11 18:49:01.000000000 +0200 @@ -520,7 +520,7 @@ dbd_register(L, DBD_DB2_STATEMENT, statement_methods, statement_class_methods, - statement_gc, statement_tostring); + statement_gc, statement_tostring, statement_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/duckdb/connection.c new/luadbi-0.7.5/dbd/duckdb/connection.c --- old/luadbi-0.7.4/dbd/duckdb/connection.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/duckdb/connection.c 2025-07-11 18:49:01.000000000 +0200 @@ -214,7 +214,7 @@ dbd_register(L, DBD_DUCKDB_CONNECTION, connection_methods, connection_class_methods, - connection_gc, connection_tostring); + connection_gc, connection_tostring, connection_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/duckdb/statement.c new/luadbi-0.7.5/dbd/duckdb/statement.c --- old/luadbi-0.7.4/dbd/duckdb/statement.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/duckdb/statement.c 2025-07-11 18:49:01.000000000 +0200 @@ -148,6 +148,7 @@ } break; + default: case DUCKDB_TYPE_BLOB: case DUCKDB_TYPE_VARCHAR: { duckdb_string_t *vector_data = (duckdb_string_t *) duckdb_vector_get_data(col1); @@ -159,10 +160,6 @@ } } break; - - default: - luaL_error(L, DBI_ERR_EXECUTE_FAILED, "unknown datatype to bind"); - break; } } else { // NULL value @@ -456,7 +453,7 @@ dbd_register(L, DBD_DUCKDB_STATEMENT, statement_methods, statement_class_methods, - statement_gc, statement_tostring); + statement_gc, statement_tostring, statement_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/mysql/connection.c new/luadbi-0.7.5/dbd/mysql/connection.c --- old/luadbi-0.7.4/dbd/mysql/connection.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/mysql/connection.c 2025-07-11 18:49:01.000000000 +0200 @@ -239,7 +239,7 @@ dbd_register(L, DBD_MYSQL_CONNECTION, connection_methods, connection_class_methods, - connection_gc, connection_tostring); + connection_gc, connection_tostring, connection_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/mysql/statement.c new/luadbi-0.7.5/dbd/mysql/statement.c --- old/luadbi-0.7.4/dbd/mysql/statement.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/mysql/statement.c 2025-07-11 18:49:01.000000000 +0200 @@ -638,7 +638,7 @@ dbd_register(L, DBD_MYSQL_STATEMENT, statement_methods, statement_class_methods, - statement_gc, statement_tostring); + statement_gc, statement_tostring, statement_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/oracle/connection.c new/luadbi-0.7.5/dbd/oracle/connection.c --- old/luadbi-0.7.4/dbd/oracle/connection.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/oracle/connection.c 2025-07-11 18:49:01.000000000 +0200 @@ -609,7 +609,7 @@ dbd_register(L, DBD_ORACLE_CONNECTION, connection_methods, connection_class_methods, - connection_gc, connection_tostring); + connection_gc, connection_tostring, connection_close); /* Register Oracle constants in our new metatable */ luaL_getmetatable(L, DBD_ORACLE_CONNECTION); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/oracle/statement.c new/luadbi-0.7.5/dbd/oracle/statement.c --- old/luadbi-0.7.4/dbd/oracle/statement.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/oracle/statement.c 2025-07-11 18:49:01.000000000 +0200 @@ -664,7 +664,7 @@ dbd_register(L, DBD_ORACLE_STATEMENT, statement_methods, statement_class_methods, - statement_gc, statement_tostring); + statement_gc, statement_tostring, statement_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/postgresql/connection.c new/luadbi-0.7.5/dbd/postgresql/connection.c --- old/luadbi-0.7.4/dbd/postgresql/connection.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/postgresql/connection.c 2025-07-11 18:49:01.000000000 +0200 @@ -303,7 +303,7 @@ dbd_register(L, DBD_POSTGRESQL_CONNECTION, connection_methods, connection_class_methods, - connection_gc, connection_tostring); + connection_gc, connection_tostring, connection_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/postgresql/statement.c new/luadbi-0.7.5/dbd/postgresql/statement.c --- old/luadbi-0.7.4/dbd/postgresql/statement.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/postgresql/statement.c 2025-07-11 18:49:01.000000000 +0200 @@ -463,7 +463,7 @@ dbd_register(L, DBD_POSTGRESQL_STATEMENT, statement_methods, statement_class_methods, - statement_gc, statement_tostring); + statement_gc, statement_tostring, statement_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/sqlite3/connection.c new/luadbi-0.7.5/dbd/sqlite3/connection.c --- old/luadbi-0.7.4/dbd/sqlite3/connection.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/sqlite3/connection.c 2025-07-11 18:49:01.000000000 +0200 @@ -254,7 +254,7 @@ dbd_register(L, DBD_SQLITE_CONNECTION, connection_methods, connection_class_methods, - connection_gc, connection_tostring); + connection_gc, connection_tostring, connection_close); /* * Connection flag constants exported in our namespace diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/dbd/sqlite3/statement.c new/luadbi-0.7.5/dbd/sqlite3/statement.c --- old/luadbi-0.7.4/dbd/sqlite3/statement.c 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/dbd/sqlite3/statement.c 2025-07-11 18:49:01.000000000 +0200 @@ -262,7 +262,7 @@ LUA_PUSH_ARRAY_NIL(d); } } else if (lua_push == LUA_PUSH_INTEGER) { - int val = sqlite3_column_int(statement->stmt, i); + long val = sqlite3_column_int64(statement->stmt, i); if (named_columns) { LUA_PUSH_ATTRIB_INT(name, val); @@ -279,11 +279,12 @@ } } else if (lua_push == LUA_PUSH_STRING) { const char *val = (const char *)sqlite3_column_text(statement->stmt, i); + int len = sqlite3_column_bytes(statement->stmt, i); if (named_columns) { - LUA_PUSH_ATTRIB_STRING(name, val); + LUA_PUSH_ATTRIB_STRING_BY_LENGTH(name, val, len); } else { - LUA_PUSH_ARRAY_STRING(d, val); + LUA_PUSH_ARRAY_STRING_BY_LENGTH(d, val, len); } } else if (lua_push == LUA_PUSH_BOOLEAN) { int val = sqlite3_column_int(statement->stmt, i); @@ -416,7 +417,7 @@ dbd_register(L, DBD_SQLITE_STATEMENT, statement_methods, statement_class_methods, - statement_gc, statement_tostring); + statement_gc, statement_tostring, statement_close); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/luadbi-duckdb-scm-0.rockspec new/luadbi-0.7.5/luadbi-duckdb-scm-0.rockspec --- old/luadbi-0.7.4/luadbi-duckdb-scm-0.rockspec 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/luadbi-duckdb-scm-0.rockspec 2025-07-11 18:49:01.000000000 +0200 @@ -1,4 +1,4 @@ -package = "luadbi-sqlite3" +package = "luadbi-duckdb" version = "scm-0" description = { @@ -10,7 +10,7 @@ handles, placeholders and bind parameters for all database operations. - This rock is the Sqlite3 DBD module. You will also need the + This rock is the DuckDB DBD module. You will also need the base DBI module to use this software. ]], @@ -28,32 +28,32 @@ } external_dependencies = { - SQLITE = { header = "sqlite3.h" } + DUCKDB = { header = "duckdb.h" } } build = { type = "builtin", modules = { - ['dbd.sqlite3'] = { + ['dbd.duckdb'] = { sources = { 'dbd/common.c', - 'dbd/sqlite3/main.c', - 'dbd/sqlite3/statement.c', - 'dbd/sqlite3/connection.c' + 'dbd/duckdb/main.c', + 'dbd/duckdb/statement.c', + 'dbd/duckdb/connection.c' }, libraries = { - 'sqlite3' + 'duckdb' }, incdirs = { - "$(SQLITE_INCDIR)", + "$(DUCKDB_INCDIR)", './' }, libdirs = { - "$(SQLITE_LIBDIR)" + "$(DUCKDB_LIBDIR)" } } } -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/tests/configs/DuckDB.lua new/luadbi-0.7.5/tests/configs/DuckDB.lua --- old/luadbi-0.7.4/tests/configs/DuckDB.lua 1970-01-01 01:00:00.000000000 +0100 +++ new/luadbi-0.7.5/tests/configs/DuckDB.lua 2025-07-11 18:49:01.000000000 +0200 @@ -0,0 +1,38 @@ +#!/usr/bin/env lua + + +return { + + connect = { + name = 'duckdb-test' + }, + + encoding_test = { + 12435212, + 463769, + 8574678, + -12435212, + 0, + 9998212, + 7653.25, + 7635236, + 0.000, + -7653.25, + 1636.94783, + true, + false, + nil, + "string 1", + "another_string", + "really long string with some escapable chars: #&*%#;@'" + }, + + placeholder = '$1', + + have_last_insert_id = false, + have_typecasts = false, + have_booleans = true, + have_rowcount = false + +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/tests/configs/SQLite3.lua new/luadbi-0.7.5/tests/configs/SQLite3.lua --- old/luadbi-0.7.4/tests/configs/SQLite3.lua 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/tests/configs/SQLite3.lua 2025-07-11 18:49:01.000000000 +0200 @@ -14,6 +14,7 @@ ['::int'] = -12435212, ['::int'] = 0, ['::int'] = 9998212, + ['::int'] = 2839159864, -- bigger than 2^31-1, aka too big for 32 bit signed ['::float'] = 0.00, ['::float'] = -7653.25, ['::float'] = 1636.94783, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/tests/run_tests.lua new/luadbi-0.7.5/tests/run_tests.lua --- old/luadbi-0.7.4/tests/run_tests.lua 2024-10-03 18:37:41.000000000 +0200 +++ new/luadbi-0.7.5/tests/run_tests.lua 2025-07-11 18:49:01.000000000 +0200 @@ -284,6 +284,51 @@ end +local function test_insert_string_with_nul() + + local sth, sth2, err, success + local stringy = 'a\0b' + + + sth, err = dbh:prepare(code('insert')) + + assert.is_nil(err) + assert.is_not_nil(sth) + + success, err = sth:execute(stringy) + + assert.is_true(success) + assert.is_nil(err) + + assert.is_equal(1, sth:affected()) + + -- + -- Grab it back, make sure it's all good + -- + + local id = dbh:last_id() + assert.is_not_nil(id) + sth:close() + + sth2, err = dbh:prepare(code('insert_select')) + + assert.is_nil(err) + assert.is_not_nil(sth) + + success, err = sth2:execute(id) + + assert.is_true(success) + assert.is_nil(err) + + local row = sth2:rows(false)() + assert.is_not_nil(row) + assert.are_equal(id, row[1]) + assert.are_equal(stringy, row[2]) + + sth:close() + sth2:close() + +end local function test_insert_multi() @@ -657,6 +702,7 @@ it( "Tests multi-row selects", test_select_multi ) it( "Tests inserts", test_insert ) it( "Tests inserts of NULL", test_insert_null ) + it( "Tests inserts string with NUL", test_insert_string_with_nul ) it( "Tests statement reuse", test_insert_multi ) it( "Tests no rowcount", test_no_rowcount ) it( "Tests affected rows", test_update ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/luadbi-0.7.4/tests/schemas/duckdb.sql new/luadbi-0.7.5/tests/schemas/duckdb.sql --- old/luadbi-0.7.4/tests/schemas/duckdb.sql 1970-01-01 01:00:00.000000000 +0100 +++ new/luadbi-0.7.5/tests/schemas/duckdb.sql 2025-07-11 18:49:01.000000000 +0200 @@ -0,0 +1,85 @@ +/* + + DuckDB test schema. + +*/ + +create sequence select_ids start 1; +create table select_tests + ( + id int primary key default nextval( 'select_ids' ), + + name varchar(255) not null, + flag boolean not null, + + maths int not null + ); + +insert into select_tests + ( + name, + flag, + maths + ) + values + ( + 'Row 1', + true, + 12345 + ), + ( + 'Row 2', + false, + 54321 + ), + ( + 'Row 3', + false, + 324671 + ); + + +create sequence insert_ids start 1; +create table insert_tests + ( + id int primary key default nextval( 'insert_ids' ), + val varchar(255) null + ); + + +create sequence update_ids start 1; +create table update_tests + ( + id int primary key default nextval( 'update_ids' ), + name varchar(255) not null, + last_update int not null, + flag bool not null + ); + +insert into update_tests + ( + name, + last_update, + flag + ) + values + ( + 'Row 1', + 0, + true + ), + ( + 'Row 2', + 0, + true + ), + ( + 'Row 3', + 0, + false + ), + ( + 'Row 4', + 0, + true + );
