Hello community,
here is the log from the commit of package mariadb-connector-odbc for
openSUSE:Factory checked in at 2018-01-16 09:43:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mariadb-connector-odbc (Old)
and /work/SRC/openSUSE:Factory/.mariadb-connector-odbc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mariadb-connector-odbc"
Tue Jan 16 09:43:06 2018 rev:4 rq:564492 version:3.0.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/mariadb-connector-odbc/mariadb-connector-odbc.changes
2017-12-12 21:24:21.358411936 +0100
+++
/work/SRC/openSUSE:Factory/.mariadb-connector-odbc.new/mariadb-connector-odbc.changes
2018-01-16 09:43:06.247628919 +0100
@@ -1,0 +2,7 @@
+Thu Jan 4 07:37:10 UTC 2018 - [email protected]
+
+- libreoffice_fixes.patch: Fix crash with LibreOffice (bnc#938195)
+- add mariadb-connector-odbc-rpmlintrc to ignore some
+ rpmlint warnings
+
+-------------------------------------------------------------------
New:
----
libreoffice_fixes.patch
mariadb-connector-odbc-rpmlintrc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mariadb-connector-odbc.spec ++++++
--- /var/tmp/diff_new_pack.ElCMwP/_old 2018-01-16 09:43:06.923597279 +0100
+++ /var/tmp/diff_new_pack.ElCMwP/_new 2018-01-16 09:43:06.927597091 +0100
@@ -1,7 +1,7 @@
#
# spec file for package mariadb-connector-odbc
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,12 +22,14 @@
Summary: MariaDB ODBC Connector
License: LGPL-2.1+
Group: Productivity/Databases/Tools
-URL: https://downloads.mariadb.org/connector-odbc/
+Url: https://downloads.mariadb.org/connector-odbc/
Source:
https://downloads.mariadb.org/interstitial/connector-odbc-%{version}/mariadb-connector-odbc-%{version}-ga-src.tar.gz
# signature is from copy/pasted stuff found on the download page, not actual
file
Source1: mariadb-connector-odbc-%{version}-ga-src.tar.gz.asc
Source2: README
Source3: sample_odbc.ini
+Source4: mariadb-connector-odbc-rpmlintrc
+Patch1: libreoffice_fixes.patch
Patch3: missing_includes.patch
Patch5: package_name.patch
Patch6: DSN_names.patch
@@ -47,6 +49,7 @@
%prep
%setup -q -n mariadb-connector-odbc-%{version}-ga-src
+%patch1 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
++++++ libreoffice_fixes.patch ++++++
Fix crashes with OpenOffice
Upstream Bug: https://jira.mariadb.org/browse/ODBC-123
https://bugzilla.novell.com/show_bug.cgi?id=938195
commit a1e8995d0f8132663ed98a1b6333f2d53b3fe885
Author: Lawrin Novitsky <[email protected]>
Date: Wed Dec 27 21:46:48 2017 +0100
[ODBC-123] Fix and testcase. LibreOffice sets SQL_ATTR_USE_BOOKMARKS
attribute, but does not actually use bookmarks. The connector was not
ready for that, and would throw wrongly error, and then crash.
Fixed a number of compilation warnings.
commit cfb8e530fdabcd17b84a4609a1423fb51ffcea5a
Author: Lawrin <[email protected]>
Date: Fri Jan 12 17:50:40 2018 -0500
Addition to the fix of ODBC-123 and the testcase for that problem - for
SQL_CATALOG_LOCATION info type the connector incorrectly wrote to the buffer
SQLUINTEGER, while it has to be SQLUSMALLINT
diff --git a/ma_bulk.c b/ma_bulk.c
index 4008f55..f45a4bd 100644
--- a/ma_bulk.c
+++ b/ma_bulk.c
@@ -170,7 +170,7 @@ SQLRETURN MADB_SetBulkOperLengthArr(MADB_Stmt *Stmt,
MADB_DescRecord *CRec, SQLL
if (VariableLengthMadbType)
{
- MaBind->length[row]= MADB_CalculateLength(Stmt, OctetLengthPtr != NULL ?
&OctetLengthPtr[row] : NULL, CRec, DataPtr);
+ MaBind->length[row]= (unsigned long)MADB_CalculateLength(Stmt,
OctetLengthPtr != NULL ? &OctetLengthPtr[row] : NULL, CRec, DataPtr);
}
}
@@ -322,7 +322,7 @@ SQLRETURN MADB_ExecuteBulk(MADB_Stmt *Stmt, unsigned int
ParamOffset)
{
if (Stmt->Apd->Header.ArrayStatusPtr[row] == SQL_PARAM_IGNORE)
{
- MADB_SetIndicatorValue(Stmt, &Stmt->params[IndIdx], row,
SQL_PARAM_IGNORE);
+ MADB_SetIndicatorValue(Stmt, &Stmt->params[IndIdx], (unsigned
int)row, SQL_PARAM_IGNORE);
}
}
}
diff --git a/ma_connection.c b/ma_connection.c
index 32be6bf..b18ed6d 100644
--- a/ma_connection.c
+++ b/ma_connection.c
@@ -1333,7 +1333,7 @@ SQLRETURN MADB_DbcGetInfo(MADB_Dbc *Dbc, SQLUSMALLINT
InfoType, SQLPOINTER InfoV
{
size_t max_packet_size;
mariadb_get_infov(Dbc->mariadb, MARIADB_MAX_ALLOWED_PACKET,
&max_packet_size);
- MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, max_packet_size,
StringLengthPtr);
+ MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr,
(SQLUINTEGER)max_packet_size, StringLengthPtr);
}
break;
case SQL_MAX_TABLE_NAME_LEN:
diff --git a/ma_desc.c b/ma_desc.c
index a432098..14f1dab 100644
--- a/ma_desc.c
+++ b/ma_desc.c
@@ -738,7 +738,7 @@ SQLRETURN MADB_DescGetField(SQLHDESC DescriptorHandle,
*((SQLPOINTER *)ValuePtr)= (SQLPOINTER)Desc->Header.BindOffsetPtr;
break;
case SQL_DESC_BIND_TYPE:
- *((SQLINTEGER *)ValuePtr)= Desc->Header.BindType;
+ *((SQLULEN *)ValuePtr)= Desc->Header.BindType;
break;
case SQL_DESC_COUNT:
*(SQLSMALLINT *)ValuePtr= Desc->Header.Count;
diff --git a/ma_statement.c b/ma_statement.c
index 9b366a6..b1bea8e 100644
--- a/ma_statement.c
+++ b/ma_statement.c
@@ -459,7 +459,7 @@ SQLRETURN MADB_RegularPrepare(MADB_Stmt *Stmt)
{
LOCK_MARIADB(Stmt->Connection);
MDBUG_C_PRINT(Stmt->Connection, "mysql_stmt_prepare(%0x,%s)", Stmt->stmt,
Stmt->StmtString);
- if (mysql_stmt_prepare(Stmt->stmt, Stmt->StmtString,
strlen(Stmt->StmtString)))
+ if (mysql_stmt_prepare(Stmt->stmt, Stmt->StmtString, (unsigned
long)strlen(Stmt->StmtString)))
{
/* Need to save error first */
MADB_SetNativeError(&Stmt->Error, SQL_HANDLE_STMT, Stmt->stmt);
@@ -998,7 +998,7 @@ SQLRETURN MADB_StmtExecute(MADB_Stmt *Stmt, BOOL ExecDirect)
unsigned int ParamOffset= 0; /* for multi statements */
unsigned int Iterations= 1,
/* Will use it for STMT_ATTR_ARRAY_SIZE and as indicator if we are
deploying MariaDB bulk insert feature */
- MariadbArrSize= MADB_BulkInsertPossible(Stmt) != FALSE ?
Stmt->Apd->Header.ArraySize : 0;
+ MariadbArrSize= MADB_BulkInsertPossible(Stmt) != FALSE ? (unsigned
int)Stmt->Apd->Header.ArraySize : 0;
SQLULEN j, Start= 0;
MDBUG_C_PRINT(Stmt->Connection, "%sMADB_StmtExecute", "\t->");
@@ -1077,7 +1077,7 @@ SQLRETURN MADB_StmtExecute(MADB_Stmt *Stmt, BOOL
ExecDirect)
{
/* Doing just the same thing as we would do in general case */
MADB_CleanBulkOperData(Stmt, ParamOffset);
- ErrorCount= Stmt->Apd->Header.ArraySize;
+ ErrorCount= (unsigned int)Stmt->Apd->Header.ArraySize;
MADB_SetStatusArray(Stmt, SQL_PARAM_DIAG_UNAVAILABLE);
goto end;
}
@@ -1087,7 +1087,7 @@ SQLRETURN MADB_StmtExecute(MADB_Stmt *Stmt, BOOL
ExecDirect)
}
/* Suboptimal, but more reliable and simple */
MADB_CleanBulkOperData(Stmt, ParamOffset);
- Stmt->ArrayOffset+= Stmt->Apd->Header.ArraySize;
+ Stmt->ArrayOffset+= (int)Stmt->Apd->Header.ArraySize;
if (Stmt->Ipd->Header.RowsProcessedPtr)
{
*Stmt->Ipd->Header.RowsProcessedPtr=
*Stmt->Ipd->Header.RowsProcessedPtr + Stmt->Apd->Header.ArraySize;
@@ -1851,7 +1851,7 @@ SQLRETURN MADB_StmtFetch(MADB_Stmt *Stmt)
return MADB_SetError(&Stmt->Error, MADB_ERR_24000, NULL, 0);
}
- if ((Stmt->Options.UseBookmarks == SQL_UB_VARIABLE &&
Stmt->Options.BookmarkType != SQL_C_VARBOOKMARK) ||
+ if ((Stmt->Options.UseBookmarks == SQL_UB_VARIABLE &&
Stmt->Options.BookmarkType == SQL_C_BOOKMARK) ||
(Stmt->Options.UseBookmarks != SQL_UB_VARIABLE &&
Stmt->Options.BookmarkType == SQL_C_VARBOOKMARK))
{
MADB_SetError(&Stmt->Error, MADB_ERR_07006, NULL, 0);
@@ -1930,7 +1930,7 @@ SQLRETURN MADB_StmtFetch(MADB_Stmt *Stmt)
/************************ Bind! ********************************/
mysql_stmt_bind_result(Stmt->stmt, Stmt->result);
- if (Stmt->Options.UseBookmarks)
+ if (Stmt->Options.UseBookmarks && Stmt->Options.BookmarkPtr != NULL)
{
/* TODO: Bookmark can be not only "unsigned long*", but also "unsigned
char*". Can be determined by examining Stmt->Options.BookmarkType */
long *p= (long *)Stmt->Options.BookmarkPtr;
@@ -2059,7 +2059,7 @@ SQLRETURN MADB_StmtGetAttr(MADB_Stmt *Stmt, SQLINTEGER
Attribute, SQLPOINTER Val
*(SQLPOINTER *)ValuePtr= Stmt->Apd->Header.BindOffsetPtr;
break;
case SQL_ATTR_PARAM_BIND_TYPE:
- *(SQLINTEGER *)ValuePtr= Stmt->Apd->Header.BindType;
+ *(SQLULEN *)ValuePtr= Stmt->Apd->Header.BindType;
break;
case SQL_ATTR_PARAM_OPERATION_PTR:
*(SQLPOINTER *)ValuePtr= (SQLPOINTER)Stmt->Apd->Header.ArrayStatusPtr;
@@ -2084,7 +2084,7 @@ SQLRETURN MADB_StmtGetAttr(MADB_Stmt *Stmt, SQLINTEGER
Attribute, SQLPOINTER Val
*(SQLPOINTER *)ValuePtr= (SQLPOINTER)Stmt->Ard->Header.BindOffsetPtr;
break;
case SQL_ATTR_ROW_BIND_TYPE:
- *(SQLINTEGER *)ValuePtr= Stmt->Ard->Header.BindType;
+ *(SQLULEN *)ValuePtr= Stmt->Ard->Header.BindType;
break;
case SQL_ATTR_ROW_OPERATION_PTR:
*(SQLPOINTER *)ValuePtr= (SQLPOINTER)Stmt->Ard->Header.ArrayStatusPtr;
@@ -2667,7 +2667,7 @@ SQLRETURN MADB_StmtGetData(SQLHSTMT StatementHandle,
if (!Stmt->CharOffset[Offset])
{
- Stmt->Lengths[Offset]= CharLength*sizeof(SQLWCHAR);
+ Stmt->Lengths[Offset]= (unsigned
long)(CharLength*sizeof(SQLWCHAR));
}
}
}
@@ -2703,7 +2703,7 @@ SQLRETURN MADB_StmtGetData(SQLHSTMT StatementHandle,
if (CharLength >= BufferLength / sizeof(SQLWCHAR))
{
/* Calculate new offset and substract 1 byte for null termination */
- Stmt->CharOffset[Offset]+= BufferLength - sizeof(SQLWCHAR);
+ Stmt->CharOffset[Offset]+= (unsigned long)BufferLength -
sizeof(SQLWCHAR);
MADB_FREE(ClientValue);
return MADB_SetError(&Stmt->Error, MADB_ERR_01004, NULL, 0);
diff --git a/ma_typeconv.c b/ma_typeconv.c
index 5ffc7cb..818bab1 100644
--- a/ma_typeconv.c
+++ b/ma_typeconv.c
@@ -578,7 +578,7 @@ SQLRETURN MADB_ConvertC2Sql(MADB_Stmt *Stmt,
MADB_DescRecord *CRec, void* DataPt
MaBind->buffer_type= 0;
MaBind->is_unsigned= 0;
- *LengthPtr= Length;
+ *LengthPtr= (unsigned long)Length;
MaBind->buffer_type= MADB_GetMaDBTypeAndLength(CRec->ConciseType,
&MaBind->is_unsigned, &MaBind->buffer_length);
diff --git a/ma_connection.c b/ma_connection.c
index b18ed6d..1b57e2b 100644
--- a/ma_connection.c
+++ b/ma_connection.c
@@ -887,7 +887,7 @@ SQLRETURN MADB_DbcGetInfo(MADB_Dbc *Dbc, SQLUSMALLINT
InfoType, SQLPOINTER InfoV
MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, 0, StringLengthPtr);
break;
case SQL_CATALOG_LOCATION:
- MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, SQL_CL_START, StringLengthPtr);
+ MADB_SET_NUM_VAL(SQLUSMALLINT, InfoValuePtr, SQL_CL_START,
StringLengthPtr);
break;
case SQL_CATALOG_NAME:
/* Todo: MyODBC Driver has a DSN configuration for diabling catalog usage:
++++++ mariadb-connector-odbc-rpmlintrc ++++++
# Not a direct replacement. Users need to modify their .odbc.ini config files
# to point at the new binary
addFilter("mariadb-connector-odbc.*: W: obsolete-not-provided MyODBC-unixODBC")
# It's a plugin
addFilter("mariadb-connector-odbc.*: W: no-soname /usr/lib.*/libmaodbc.so")