Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

MySQL.Net Core 7.0.4-IR-191 .Take() Bug or Not Implemented (no replies)

$
0
0
Hi, when I do a very basic query

var model = _context.wp_posts.Take(10).ToList();

I get this error: MySqlException: Undeclared variable: __p_0

It seems that you do use LIMIT __p_0 in the query but you don't define __p_0.

Is this a bug or not implemented? If it is a bug, do we need to escalate it here http://bugs.mysql.com/ or you can take care of it?

A detailed log below

Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilderFactory[1]
Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT `w`.`ID`, `w`.`comment_count`, `w`.`comment_status`, `w`.`guid`, `w`.`menu_order`, `w`.`ping_status`, `w`.`pinged`, `w`.`post_author`, `w`.`post_content`, `w`.`post_content_filtered`, `w`.`post_date`, `w`.`post_date_gmt`, `w`.`post_excerpt`, `w`.`post_mime_type`, `w`.`post_modified`, `w`.`post_modified_gmt`, `w`.`post_name`, `w`.`post_parent`, `w`.`post_password`, `w`.`post_status`, `w`.`post_title`, `w`.`post_type`, `w`.`to_ping`
FROM `wp_posts` AS `w`
LIMIT __p_0
fail: Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContextFactory[1]
An exception occurred in the database while iterating the results of a query.
MySql.Data.MySqlClient.MySqlException: Undeclared variable: __p_0
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean openConnection, Boolean closeConnection)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues, Boolean manageConnection)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext()
at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__15`2.MoveNext()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()

Thank you.

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>