From 201b45b41a4108a6a46d9a40e1eefee124fde2f2 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 23 Sep 2022 19:28:04 -0400 Subject: [PATCH] Remove call that crashes MySQL connector sometimes It no longer is necessary anyway Fixes https://gitlab.com/kicad/code/kicad/-/issues/12471 --- common/database/database_connection.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/database/database_connection.cpp b/common/database/database_connection.cpp index f9918d2922..06f17eeb94 100644 --- a/common/database/database_connection.cpp +++ b/common/database/database_connection.cpp @@ -453,10 +453,7 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, std::vector try { - if( !results.first() ) - return false; - - do + while( results.next() ) { ROW result; @@ -467,8 +464,7 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, std::vector } aResults.emplace_back( std::move( result ) ); - - } while( results.next() ); + } } catch( nanodbc::database_error& e ) {