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

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

bug into mapi_ping() #2936

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working Client interfaces normal

Comments

@monetdb-team
Copy link

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 @@
break;
}
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 fabian@cwi.nl 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
Labels
bug Something isn't working Client interfaces normal
Projects
None yet
Development

No branches or pull requests

2 participants