This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, I installed the latest nightly build and found that some records no longer get deleted. It seems LightSpeed is generating the incorrect SQL for a deletion. It worked in version 4.0.811.18502 and failed in 4.0.1025.19328 (which is the latest nightly build). Attached is a solution to reproduce this issue. And I have included the output of the console application below. I'm using Visual Studio 2010 SP1, Windows Server R2 (with all service packs) and MySQL 5.5.9. Thanks, Werner --- Logs SELECT KeyTable.NextId AS "KeyTable.NextId" FROM KeyTable FOR UPDATE --> Time: 2 ms UPDATE KeyTable SET NextId = 21 --> Time: 2 ms INSERT INTO DocumentRelationships ( Id, CreatedOn, DeletedOn, Type, UpdatedOn, Title ) VALUES ( 13, '12/21/2011 13:57:00', NULL, '1', '12/21/2011 13:57:00', 'Sample Comparison' ); INSERT INTO Documents ( Id, CreatedOn, DeletedOn, Name, UpdatedOn ) VALUES ( 12, '12/21/2011 13:57:00', NULL, 'original.doc', '12/21/2011 13:57:00' ); INSERT INTO Documents ( Id, CreatedOn, DeletedOn, Name, UpdatedOn ) VALUES ( 15, '12/21/2011 13:57:00', NULL, 'modified.doc', '12/21/2011 13:57:00' ); INSERT INTO Documents ( Id, CreatedOn, DeletedOn, Name, UpdatedOn ) VALUES ( 17, '12/21/2011 13:57:00', NULL, 'redline.rtf', '12/21/2011 13:57:00' ); INSERT INTO DocumentRoles ( Id, CreatedOn, DeletedOn, DocumentId, DocumentRelationshipId, Type, UpdatedOn ) VALUES ( 11, '12/21/2011 13:57:00', NULL, 12, 13, '1', '12/21/2011 13:57:00' ); INSERT INTO DocumentRoles ( Id, CreatedOn, DeletedOn, DocumentId, DocumentRelationshipId, Type, UpdatedOn ) VALUES ( 14, '12/21/2011 13:57:00', NULL, 15, 13, '2', '12/21/2011 13:57:00' ); INSERT INTO DocumentRoles ( Id, CreatedOn, DeletedOn, DocumentId, DocumentRelationshipId, Type, UpdatedOn ) VALUES ( 16, '12/21/2011 13:57:00', NULL, 17, 13, '3', '12/21/2011 13:57:00' ) --> Time: 9 ms Saved comparison 13 SELECT DocumentRelationships.Id AS "DocumentRelationships.Id", DocumentRelationships.CreatedOn AS "DocumentRelationships.CreatedOn", DocumentRelationships.DeletedOn AS "DocumentRelationships.DeletedOn", DocumentRelationships.Type AS "DocumentRelationships.Type", DocumentRelationships.UpdatedOn AS "DocumentRelationships.UpdatedOn", DocumentRelationships.Title AS "DocumentRelationships.Title" FROM DocumentRelationships WHERE ((DocumentRelationships.Id = 13 AND DocumentRelationships.Type = 1) AND Docume ntRelationships.DeletedOn IS NULL) --> Time: 1 ms SELECT DocumentRoles.Id AS "DocumentRoles.Id" FROM DocumentRoles WHERE (DocumentRoles.DocumentRelationshipId = 13 AND DocumentRoles.DeletedOn IS NULL ) --> Time: 0 ms UPDATE DocumentRoles SET DeletedOn = '12/21/2011 13:57:00' WHERE (EXISTS ( SELECT DocumentRelationships.* FROM DocumentRelationships WHERE DocumentRelationships.Id = DocumentRoles.DocumentRelationshipId AND t0.DeletedOn IS NULL AND DocumentRelationships.Id = 13 ) AND DocumentRoles.DeletedOn IS NULL) --> Time: 0 ms MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown column 't0.DeletedOn
' in 'where clause'
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& i
nsertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affected
Rows, Int32& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior
)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at ↕..♥.?()
at Mindscape.LightSpeed.Profiling.Interceptor.ExecuteCommand(Func |
|
|
Hi Werner, Thanks - we are on break at the moment but will be back in the office on Monday. I will have a look into this then and keep you updated on getting this sorted. As always thanks for attaching a repro case.
|
|
|
Hi Werner, Just an update on this - we have isolated the issue which was caused by an update about a month ago to correct a separate issue so we are currently working on making the update and hope to have this included in the nightlies for you soon.
|
|
|
Hi Werner, We have now committed a fix for this and this will be available in the next nightly build.
|
|