I was wondering if anyone else had had a problem with a query on LAST_INSERT_ID(). When I execute the following C++ code it will work, but when execution reaches the Query->Open() the CPU load jumps to 100% and it takes about 5 seconds to complete. It seems only to happen on this table, but is not an isolated event - I have seen it in other sections of my code where LAST_INSERT_ID() is used.
Thanks in anticipation ...
TMyQuery* Query2 = new TMyQuery(0);
Query->Connection = MyDBSession;
Query->SQL->Clear();
Query->SQL->Add( "select"
" LAST_INSERT_ID() SeqNo"
" from txqueue" );
Query->Open();
if ( !Query->Eof )
SeqNo = Query->FieldByName( "SeqNo" )->AsInteger;
[/code]
Bug / CPU issue with LAST_INSERT_ID()
Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
-
dragonslayer
Return to “MySQL Data Access Components”
Jump to
- General Forums
- ↳ Announcements
- Database Tools
- ↳ dbForge for MySQL
- ↳ dbForge for Oracle
- ↳ dbForge for PostgreSQL
- ↳ dbForge for SQL Server
- ADO.NET Data Providers
- ↳ Entity Framework support
- ↳ LinqConnect (LINQ to SQL support)
- ↳ dotConnect for Oracle
- ↳ dotConnect for MySQL
- ↳ dotConnect for PostgreSQL
- ↳ dotConnect for SQLite
- ↳ dotConnect for DB2
- ↳ dotConnect for SQL Server
- ↳ dotConnect for Cloud Applications
- ↳ dotConnect Universal
- ↳ Entity Developer
- Delphi Data Access Components
- ↳ EntityDAC
- ↳ Universal Data Access Components
- ↳ Oracle Data Access Components
- ↳ SQL Server Data Access Components
- ↳ MySQL Data Access Components
- ↳ InterBase Data Access Components
- ↳ PostgreSQL Data Access Components
- ↳ SQLite Data Access Components
- ↳ VirtualDAC
- dbExpress Drivers
- ↳ dbExpress driver for Oracle
- ↳ dbExpress driver for SQL Server
- ↳ dbExpress driver for MySQL
- ↳ dbExpress driver for InterBase & Firebird
- ↳ dbExpress driver for PostgreSQL
- ↳ dbExpress driver for SQLite
- ODBC Drivers
- ↳ ODBC Drivers
- Network Security
- ↳ SecureBridge
- Developer Tools
- ↳ Code Compare
- ↳ Review Assistant
- ↳ LINQ Insight
- ↳ SSIS Data Flow Components
- ↳ Excel Add-ins