@RonG
I was getting the errors below in the WordPress debug.log. I see your new code doesn't use mysql_query. The updated file you linked to is working
[09-Jul-2014 19:26:29 UTC] PHP Warning: mysql_query(): Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/html/wp-content/plugins/search-and-replace/search-and-replace.php on line 484
[09-Jul-2014 19:26:29 UTC] PHP Warning: mysql_query(): A link to the server could not be established in /var/www/html/wp-content/plugins/search-and-replace/search-and-replace.php on line 484
I'm on WordPress 3.9.1
PHP Version 5.5.9-1ubuntu4.2
When will you push an update to WordPress.org?