unsigned char sysbench_compat_lua[] =
  "-- Copyright (C) 2016-2017 Alexey Kopytov <akopytov@gmail.com>\n"
  "\n"
  "-- This program is free software; you can redistribute it and/or modify\n"
  "-- it under the terms of the GNU General Public License as published by\n"
  "-- the Free Software Foundation; either version 2 of the License, or\n"
  "-- (at your option) any later version.\n"
  "\n"
  "-- This program is distributed in the hope that it will be useful,\n"
  "-- but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
  "-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
  "-- GNU General Public License for more details.\n"
  "\n"
  "-- You should have received a copy of the GNU General Public License\n"
  "-- along with this program; if not, write to the Free Software\n"
  "-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n"
  "\n"
  "-- ----------------------------------------------------------------------\n"
  "-- Compatibility wrappers/aliases. These may be removed in later versions\n"
  "-- ----------------------------------------------------------------------\n"
  "\n"
  "thread_id = sysbench.tid\n"
  "\n"
  "test = sysbench.cmdline.script_path\n"
  "\n"
  "function sb_rnd()\n"
  "   -- Keep lower 32 bits from sysbench.rand.uniform_uint64() and convert them to\n"
  "   -- a Lua number\n"
  "   return tonumber(sysbench.rand.uniform_uint64() % 4294967296)\n"
  "end\n"
  "\n"
  "sb_rand = sysbench.rand.default\n"
  "sb_rand_str = sysbench.rand.string\n"
  "sb_rand_uniform = sysbench.rand.uniform\n"
  "sb_rand_gaussian = sysbench.rand.gaussian\n"
  "sb_rand_special = sysbench.rand.special\n"
  "\n"
  "function sb_rand_uniq(a, b)\n"
  "   local res\n"
  "   if type(a) == \"nil\" then\n"
  "      a = 0\n"
  "   end\n"
  "   if type(b) == \"nil\" then\n"
  "      b = 4294967295\n"
  "   end\n"
  "   repeat\n"
  "      res = sysbench.rand.unique()\n"
  "   until res >= a and res <= b\n"
  "   return res\n"
  "end\n"
  "\n"
  "db_connect = sysbench.db.connect\n"
  "db_disconnect = sysbench.db.disconnect\n"
  "\n"
  "db_query = sysbench.db.query\n"
  "\n"
  "db_bulk_insert_init = sysbench.db.bulk_insert_init\n"
  "db_bulk_insert_next = sysbench.db.bulk_insert_next\n"
  "db_bulk_insert_done = sysbench.db.bulk_insert_done\n"
  "\n"
  "db_prepare = sysbench.db.prepare\n"
  "db_bind_param = sysbench.db.bind_param\n"
  "db_bind_result = sysbench.db.bind_result\n"
  "db_execute = sysbench.db.execute\n"
  "\n"
  "db_store_results = sysbench.db.store_results\n"
  "db_free_results = sysbench.db.free_results\n"
  "\n"
  "db_close = sysbench.db.close\n"
  "\n"
  "DB_ERROR_NONE = sysbench.db.DB_ERROR_NONE\n"
  "DB_ERROR_RESTART_TRANSACTION = sysbench.db.DB_ERROR_RESTART_TRANSACTION\n"
  "DB_ERROR_FAILED = sysbench.db.DB_ERROR_FAILED\n"
  "\n"
  "mysql_table_engine = mysql_table_engine or \"innodb\"\n"
  "myisam_max_rows = 1000000\n"
;
size_t sysbench_compat_lua_len = sizeof(sysbench_compat_lua) - 1;
