(I'm actually using MariaDB 10.1.22, not MySQL)
I need to use mysqli_data_seek, and so have to use mysqli_store_result, which didn't exist before the change to mysqli and so I don't know anything about it.
Store_result fails in this toy program: (the table keys_used is just strings from the OSM database, 1 string per record, no string over 48 chars)
$q = 'SELECT * from keys_used limit 10' ;
echo 'Getting 10 records from keys_used'.cBR ;
if ( mysqli_query($link,$q) ) // the query does work
$dset = mysqli_store_result($link) ; // but the store_result does not.
if ( $dset) echo mysqli_num_rows($dset).' stored'.cBR ;
else echo 'Store failed'.cBR ;
As far as I can tell from the Very Meager documentation available, it should work. But it doesn't, even with so small a result set. I'll be quite happy if I've simply misunderstood something.
I forgot to mention that the call doesn't return an error message, and mysqli_field_count() returns non-zero, both of which should be signs of success, but dset is nevertheless a zero.
To exactly which port does this PR apply?
(In reply to Mark Linimon from comment #2)
I thought it was probably mysql rather than php, but it turned out to be misleading docs, not a bug in the code, so I'm going to delete it and complain about the docs instead.
I shouldn't have closed this, because there *is* a problem. Either the software is broken or the docs are, since mysqli_store_result doesn't even work on a toy dataset.
My interest was only because, being confused by the poorly-written docs, I thought that a successful store_result call was now required in order to use data_seek. But it's not, and so I lost interest and closed this bug report. But there really is some kind of bug, so I should have left it open even though it doesn't seem to affect my project.
Unfortunately, I've no clue about where the bug is located because the mysqli API is not well-reflected in SQL. There's no equivalent of store_result in the SQL that I can see, so I couldn't test to narrow it down. So it could be in MySQL and thus MariaDB, or the result of some change to MariaDB that's not in MySQL, or in the mysqli API, or only the PHP port of the API, or even just in the documentation. Sorry for not being able to be more clear.
Adding brnrd@ to CC (since it was produced on MariaDB) in hope he can help to produce it in MySQL `:)