mysql1_dart icon indicating copy to clipboard operation
mysql1_dart copied to clipboard

RangeError running example code.

Open jthlim opened this issue 4 years ago • 6 comments

From the example code here: https://pub.dev/packages/mysql1/example

Running this throws a RangeError on this line:

  var result = await conn.query(
      'insert into users (name, email, age) values (?, ?, ?)',
      ['Bob', '[email protected]', 25]);

RangeError (RangeError (byteOffset): Invalid value: Not in inclusive range 0..5: 7)

Running: macOS 8.0.25 MySQL Community Server dart 2.13.1

jthlim avatar May 27 '21 13:05 jthlim

I'm having the exact same problem.

leonardo-intellisys avatar Jun 07 '21 21:06 leonardo-intellisys

I'm getting the same error as well.

shesha1096 avatar Jun 11 '21 04:06 shesha1096

The same for me

it seems like a bug with the completer during the connect to the db. The override is to wait a while for the connection.

await MysqlConnection.connect(..);

await Future.delayed(Duration(seconds: 1));

kleinpetr avatar Aug 07 '21 11:08 kleinpetr

Same here, running on Windows 10 Pro, MySQL Workbench CE 8.0.27, dart 2.14.4

GabrielCR99 avatar Nov 18 '21 02:11 GabrielCR99

+1

wustrong avatar Feb 17 '22 14:02 wustrong

Getting the same error here...

IgorHilgemberg avatar Feb 24 '22 17:02 IgorHilgemberg