Jump to content

mysql insert constructs fails after 9/12 win10 update


Recommended Posts

(every site should have a win10 update section)

mysql/php-pdo/xampp insert constructs are suddenly failing (running fine for a year) after an overnight update.

Here's the error code.

   error code: HY093
    error msg: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
      binding: Array

I'm chasing it (cut this part out.....cut that part out) but while I'm doing this I thought I'd see if anyone else is having this experience

 

mysql  Ver 15.1 Distrib 10.1.38-MariaDB, for Win64 (AMD64), win10 pro, 1903, 18362.356

 

Thank you

Edited by fatkatie

the error is because there are a different number of place-holders in an sql query statement compared with the number of values supplied when the query is executed. the solution would be to find out why that is happening and correct it.

it's likely that the computer restart as part of the win update either committed or lost some unsaved change in a server setting or in a code file.

It appears the binding is not allowing empty fields.  But why now.  The strict is off (or was).

 

in toad's window I can write these two inserts.  The first fails.  The second does not.

insert into info (infoid, infoindex values ('', '');

insert into info (infoid, infotext) value (null, null);

both fields are default null. both are ints.

C:\xampp\htdocs\csc> mysql -e "SELECT @@sql_mode;"
+--------------------------------------------+
| @@sql_mode                                 |
+--------------------------------------------+
| NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+--------------------------------------------+

Also checked the table.

Practice aside, this was working yesterday.  .

An empty string is not, and AFAIK never has been, a valid integer value

mysql> CREATE TABLE test99 (id int, val varchar(20) );
Query OK, 0 rows affected (0.32 sec)

mysql> INSERT INTO test99 VALUES ('','');
ERROR 1366 (HY000): Incorrect integer value: '' for column 'id' at row 1

 

All is well.  Typo.  Working as before.

Really thou, is it possible to nuke this post.  This was a bogus claim and will just add to the windows update noise.

Thanks all for your help.  Only took 4 hours to find it.   @#$!!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.