@@ -288,11 +288,7 @@ dbcontext::init_thread(const void *stack_bottom, volatile int& shutdown_flag)
288288 thd->system_thread = static_cast <enum_thread_type>(1 <<30UL );
289289 memset (&thd->net , 0 , sizeof (thd->net ));
290290 if (for_write_flag) {
291- #if MYSQL_VERSION_ID >= 50505
292291 thd->variables .option_bits |= OPTION_BIN_LOG;
293- #else
294- thd->options |= OPTION_BIN_LOG;
295- #endif
296292 safeFree ((char *) thd->db .str );
297293 thd->db .str = my_strdup (PSI_NOT_INSTRUMENTED, " handlersocket" , MYF (0 ));
298294 thd->db .length = sizeof (" handlersocket" )-1 ;
@@ -382,13 +378,7 @@ dbcontext::lock_tables_if()
382378 }
383379 table_vec[i].modified = false ;
384380 }
385- #if MYSQL_VERSION_ID >= 50505
386381 lock = thd->lock = mysql_lock_tables (thd, &tables[0 ], num_open, 0 );
387- #else
388- bool need_reopen= false ;
389- lock = thd->lock = mysql_lock_tables (thd, &tables[0 ], num_open,
390- MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN, &need_reopen);
391- #endif
392382 statistic_increment (lock_tables_count, &LOCK_status);
393383 thd_proc_info (thd, &info_message_buf[0 ]);
394384 DENA_VERBOSE (100 , fprintf (stderr, " HNDSOCK lock tables %p %p %zu %zu\n " ,
@@ -399,11 +389,7 @@ dbcontext::lock_tables_if()
399389 thd));
400390 }
401391 if (for_write_flag) {
402- #if MYSQL_VERSION_ID >= 50505
403392 thd->set_current_stmt_binlog_format_row ();
404- #else
405- thd->current_stmt_binlog_row_based = 1 ;
406- #endif
407393 }
408394 DENA_ALLOCA_FREE (tables);
409395 }
@@ -426,11 +412,7 @@ dbcontext::unlock_tables_if()
426412 }
427413 {
428414 bool suc = true ;
429- #if MYSQL_VERSION_ID >= 50505
430415 suc = (trans_commit_stmt (thd) == 0 );
431- #else
432- suc = (ha_autocommit_or_rollback (thd, 0 ) == 0 );
433- #endif
434416 if (!suc) {
435417 commit_error = true ;
436418 DENA_VERBOSE (10 , fprintf (stderr,
@@ -996,7 +978,6 @@ dbcontext::cmd_open(dbcallback_i& cb, const cmd_open_args& arg)
996978 TABLE *table = 0 ;
997979 bool refresh = true ;
998980 const thr_lock_type lock_type = for_write_flag ? TL_WRITE : TL_READ;
999- #if MYSQL_VERSION_ID >= 50505
1000981 LEX_CSTRING db_name= { arg.dbn , strlen (arg.dbn ) };
1001982 LEX_CSTRING tbl_name= { arg.tbl , strlen (arg.tbl ) };
1002983 tables.init_one_table (&db_name, &tbl_name, 0 , lock_type);
@@ -1006,11 +987,6 @@ dbcontext::cmd_open(dbcallback_i& cb, const cmd_open_args& arg)
1006987 if (!open_table (thd, &tables, &ot_act)) {
1007988 table = tables.table ;
1008989 }
1009- #else
1010- tables.init_one_table (arg.dbn , arg.tbl , lock_type);
1011- table = open_table (thd, &tables, thd->mem_root , &refresh,
1012- OPEN_VIEW_NO_PARSE);
1013- #endif
1014990 if (table == 0 ) {
1015991 DENA_VERBOSE (20 , fprintf (stderr,
1016992 " HNDSOCK failed to open %p [%s] [%s] [%d]\n " ,
0 commit comments