RFC: mysql-native - Supporting both Vibe.d and Phobos sockets

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Sun May 19 14:17:47 PDT 2013


On Sun, 19 May 2013 12:43:37 +0200
"Gary Willoughby" <dev at kalekold.net> wrote:

> > Fixed.
> >
> > Removing the assert turned out to be the correct solution after 
> > all.
> > The assert was based on a faulty assumption, and none of the 
> > code
> > actually relied on the assertion passing (see the ticket above 
> > for more
> > detailed info).
> 
> Great, thanks Nick. I have however found a few other issues.
> 
> Using this code:
> 
> 	auto connection = new Connection(MySQLSocketType.phobos, 
> "127.0.0.1", "root", "r00t", "Project");
> 	auto command    = new Command(connection, "INSERT INTO
> tblUser (name, age) VALUES (?, ?)");
> 	command.prepare();
> 
> 	ulong rowsAffected;
> 	string name;
> 
> 	foreach (int age; 0..100000)
> 	{
> 		name = "Test User";
> 		command.bindParameter(name, 0);
> 		command.bindParameter(age, 1);
> 		command.execPrepared(rowsAffected);
> 	}
> 
> Raises two simple to fix errors in the connection code.
> 
> 1). mysql/connection.d(3845): Error: more initializers than 
> fields (5) of ParameterSpecialization
> 
> Basically the initialisation of the structure contains too many 
> parameters.
> 
> 2). mysql/connection.d(3858): Error: no property 'dummy' for type 
> 'ParameterSpecialization'
> 
> The structure doesn't contain a 'dummy' property. Debug info i 
> guess?

Thanks, I'll look into these...



More information about the Digitalmars-d mailing list