Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug into mapi_ping() #2936

monetdb-team opened this issue Nov 30, 2020 · 0 comments

bug into mapi_ping() #2936

monetdb-team opened this issue Nov 30, 2020 · 0 comments


Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2011-12-06 12:04:52 +0100
From: manuela <<m.sagona>>
To: clients devs <>
Version: 11.3.3 (Apr2011-SP1) [obsolete]

Last updated: 2012-01-26 15:32:04 +0100

Comment 16584

Date: 2011-12-06 12:04:52 +0100
From: manuela <<m.sagona>>

User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2
Build Identifier:

monetdb_connected() in php_monetdb.php does not work due to a bug into mapi_ping()

Reproducible: Always

Steps to Reproduce:

1.execute "select true;"

Actual Results:

the resulting handle has not an 'id' element to use in mapi_free_result() call

Expected Results:

an 'id' element to use in mapi_free_result() call

to fix the bug:

@@ -637,6 +637,7 @@
if ($res != NULL) {

  •  		if (! array_key_exists('id', $res)) return TRUE;
     		if (mapi_free_result($conn['id'], $res['id'])) {
     			return TRUE;

Comment 16592

Date: 2011-12-06 13:15:15 +0100
From: @grobian

Changeset 0c5bc1adc7b3 made by Fabian Groffen in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0c5bc1adc7b3

Changeset description:

mapi_ping: Fix call to mapi_free_result

The result id is actually stored in the query array of the handle, not
the handle itself.  Since not all results have such thing, check for it
before calling mapi_free_result, to avoid needless work (and some
warnings from PHP).

Inspired by patch from manuela in bug #2936.

Comment 16827

Date: 2012-01-26 15:32:04 +0100
From: @sjoerdmullender

The Dec2011 version has been release, so declaring this bug as FIXED.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant