diff --git a/test/test_data/exploit_test.sql b/test/test_data/exploit_test.sql
new file mode 100644
index 0000000000..dce733ff4c
--- /dev/null
+++ b/test/test_data/exploit_test.sql
@@ -0,0 +1,150 @@
+-- phpMyAdmin SQL Dump
+-- version 3.5.0-dev
+-- http://www.phpmyadmin.net
+--
+-- Host: barclay
+-- Generation Time: Aug 06, 2011 at 04:53 PM
+-- Server version: 5.1.49-3-log
+-- PHP Version: 5.3.3-7+squeeze1
+
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+
+DROP DATABASE `">`;
+DROP DATABASE `'>`;
+DROP DATABASE `exploit_test`;
+
+--
+-- Database: `">`
+--
+CREATE DATABASE `">` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
+
+--
+-- Database: `'>`
+--
+CREATE DATABASE `'>` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
+
+--
+-- Database: `exploit_test`
+--
+CREATE DATABASE `exploit_test` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
+USE `exploit_test`;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `">`
+--
+
+CREATE TABLE IF NOT EXISTS `">` (
+ `id` int(2) NOT NULL,
+ `foo` varchar(255) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `">`
+--
+
+INSERT INTO `">` (`id`, `foo`) VALUES
+(1, ''),
+(2, '');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `'; eval('alert(107)')`
+--
+
+CREATE TABLE IF NOT EXISTS `'; eval('alert(107)')` (
+ `id` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `'>`
+--
+
+CREATE TABLE IF NOT EXISTS `'>` (
+ `id` int(2) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table ``
+--
+
+CREATE TABLE IF NOT EXISTS `` (
+ `dsaf` int(4) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table ``
+--
+
+INSERT INTO `` (`dsaf`) VALUES
+(1);
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `evil_column_names`
+--
+
+CREATE TABLE IF NOT EXISTS `evil_column_names` (
+ `` int(1) NOT NULL,
+ `">` int(2) NOT NULL,
+ `'>` int(2) NOT NULL,
+ `evil_comment` int(3) NOT NULL COMMENT ''
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `evil_column_names`
+--
+
+INSERT INTO `evil_column_names` (``, `">`, `'>`, `evil_comment`) VALUES
+(1, 23, 45, 5),
+(2, 3, 77, 3);
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `evil_content`
+--
+
+CREATE TABLE IF NOT EXISTS `evil_content` (
+ `text` varchar(255) NOT NULL
+ ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+
+--
+-- Dumping data for table `evil_content`
+--
+
+INSERT INTO `evil_content` (`text`) VALUES
+('">'),
+('''>'),
+(''),
+('''; eval(''alert(304)'');');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `evil_table_comment`
+--
+
+CREATE TABLE IF NOT EXISTS `evil_table_comment` (
+ `id` int(1) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='">';
+
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;