Skip to content

MySQL database connects on haxe 4.3.7 but fails on haxe 5/nightly #12369

Description

@Jarrio
haxelib git logging https://github.com/core-haxe/logging
haxelib git db-core https://github.com/core-haxe/db-core
haxelib git db-mysql https://github.com/core-haxe/db-mysql
haxelib git mysql https://github.com/core-haxe/mysql
haxelib git promises https://github.com/core-haxe/promises
haxelib git libmysqlclient https://github.com/core-haxe/libmysqlclient
-D analyzer-optimize
-main Main

--cpp bin/cpp
--library db-core
--library db-mysql
--debug
import haxe.Timer;
import db.DatabaseFactory;

class Main {
	static function main() {
		trace('here');
		var connected:Bool = false;
		var timer = new Timer(1000);
		timer.run = () -> {
			trace('connected? $connected');
		}

		var db = DatabaseFactory.instance.createDatabase(DatabaseFactory.MYSQL, {
			database: 'test',
			host: "127.0.0.1",
			user: "root",
			pass: "123456"
		});

		db.connect().then(function(state) {
			trace('here');
			if (state.data) {
				connected = true;
				trace('Database connected');
			} else {
				trace('Database not connected');
			}
		}, (err) -> trace(err));
	}
}

Occurs on both Windows and Linux, works on haxe 4.3.7 and on nightlies it compiles fine, runs but fails to connect (with no errors)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions