GithubHelp home page GithubHelp logo

Comments (7)

mtallenca avatar mtallenca commented on June 27, 2024

I do receive the result - however the trace happens and the connection is closed.

from mysql1_dart.

adamlofts avatar adamlofts commented on June 27, 2024

The proc branch here might work better for you https://github.com/adamlofts/mysql1_dart/tree/proc
Let me know if it helps and I'll merge to master if so.

from mysql1_dart.

virtz avatar virtz commented on June 27, 2024

i have a similar issue. I keep getting 'Bad state: Cannot write to socket, it is closed'

from mysql1_dart.

mtallenca avatar mtallenca commented on June 27, 2024

When calling a stored procedure - the MySQL Protocol has the server sending an additional packet to the client that is not handled by the current dart driver. The current driver throws an exception because no handler is defined for the last packet (non data packet) and closes the socket. Subsequent calls on the same connection will give you the "Bad state: Cannot write to socket, it is closed"

A quick work around until the protocol is handled correctly is to add the following in single_connection.dart

Future _handleData(Buffer buffer) async {
// at the top of the function
if (_handler == null) {
_log.fine("Packet read - but no handler assigned...");
return;
}

In my case - we have decided not to implement a dart server connecting to MySQL because this driver is not yet complete. It works great for simple queries, but I'm not able to count on this yet in a production environment.

from mysql1_dart.

virtz avatar virtz commented on June 27, 2024

Thank you very much. I'll try it. I couldn't find a driver for MS SQL for flutter, that's why I think I'm stuck with this.

from mysql1_dart.

adamlofts avatar adamlofts commented on June 27, 2024

@virtz Did you try the proc branch I mentioned above?

from mysql1_dart.

virtz avatar virtz commented on June 27, 2024

no, sorry I'm new to github. Do you mind telling how to try it?

from mysql1_dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.