[Kexi] Empty Cells - Patch
Jarosław Staniek
js at iidea.pl
Mon Jan 28 10:44:39 CET 2008
Sharan Rao said the following, On 2008-01-27 20:01:
> Hi Jaroslaw,
>
> I've attached the patch to cursor.cpp and the {mysql,pqxx}cursor.cpp , as we
> discussed a few days back on IRC. ( for the empty cells problem in mysql )
>
> Shall I commit ?
>
> Cheers!
> Sharan Rao
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kexi mailing list
> Kexi at kde.org
> https://mail.kde.org/mailman/listinfo/kexi
> I've attached the patch to cursor.cpp and the {mysql,pqxx}cursor.cpp , as we
> discussed a few days back on IRC. ( for the empty cells problem in mysql )
>
> Shall I commit ?
> Index: cursor.cpp
> ===================================================================
> --- cursor.cpp (revision 766421)
> +++ cursor.cpp (working copy)
> @@ -406,10 +406,10 @@
> m_afterLast = true;
> //js m_at = m_records_in_buf;
> m_at = -1; //position is invalid now and will not be used
> - if ((FetchResult) m_result == FetchEnd) {
> - return false;
> - }
[**]
> - setError(ERR_CURSOR_RECORD_FETCHING, i18n("Cannot fetch next record."));
> +// if ((FetchResult) m_result == FetchEnd) {
> +// return false;
> +// }
> +//sr setError(ERR_CURSOR_RECORD_FETCHING, i18n("Cannot fetch next record."));
> return false;
Do we need the above? m_error == FetchError at [**] so I guess that setError()
is expected.
> Index: drivers/mySQL/mysqlcursor.cpp
> ===================================================================
> --- drivers/mySQL/mysqlcursor.cpp (revision 766421)
> +++ drivers/mySQL/mysqlcursor.cpp (working copy)
> @@ -102,7 +102,9 @@
> m_result = FetchEnd;
> }
> else {
> - m_result = FetchError;
> + // control will reach here only when at() < 0 ( which is usually -1 )
> + // -1 is same as "1 beyond the End"
> + m_result = FetchEnd;
> }
> }
>
> Index: drivers/pqxx/pqxxcursor.cpp
> ===================================================================
> --- drivers/pqxx/pqxxcursor.cpp (revision 766421)
> +++ drivers/pqxx/pqxxcursor.cpp (working copy)
> @@ -166,7 +166,9 @@
> }
> else
> {
> - m_result = FetchError;
> + // control will reach here only when at() < 0 ( which is usually -1 )
> + // -1 is same as "1 beyond the End"
> + m_result = FetchEnd;
> }
> }
These fixes are OK.
--
regards / pozdrawiam, Jaroslaw Staniek
Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
KDE Libraries for MS Windows (http://windows.kde.org)
More information about the Kexi
mailing list