Loading mysql-test/t/partition.test +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ insert into t1 values (0xFFFFFFFFFFFFFFFD); insert into t1 values (0xFFFFFFFFFFFFFFFE); select * from t1 where (a + 1) < 10; select * from t1 where (a + 1) > 10; drop table t1; # # Bug 19307: CSV engine crashes Loading sql/ha_ndbcluster.cc +1 −8 Original line number Diff line number Diff line Loading @@ -6420,14 +6420,7 @@ void ha_ndbcluster::print_error(int error, myf errflag) DBUG_PRINT("enter", ("error = %d", error)); if (error == HA_ERR_NO_PARTITION_FOUND) { char buf[100]; my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), m_part_info->part_expr->null_value ? "NULL" : llstr(m_part_info->part_expr->val_int(), buf)); dbug_tmp_restore_column_map(table->read_set, old_map); } m_part_info->print_no_partition_found(table); else handler::print_error(error, errflag); DBUG_VOID_RETURN; Loading sql/ha_partition.cc +1 −8 Original line number Diff line number Diff line Loading @@ -5097,14 +5097,7 @@ void ha_partition::print_error(int error, myf errflag) DBUG_PRINT("enter", ("error: %d", error)); if (error == HA_ERR_NO_PARTITION_FOUND) { char buf[100]; my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), m_part_info->part_expr->null_value ? "NULL" : llstr(m_part_info->part_expr->val_int(), buf)); dbug_tmp_restore_column_map(table->read_set, old_map); } m_part_info->print_no_partition_found(table); else m_file[0]->print_error(error, errflag); DBUG_VOID_RETURN; Loading sql/partition_info.cc +24 −0 Original line number Diff line number Diff line Loading @@ -827,4 +827,28 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, } /* Print error for no partition found SYNOPSIS print_no_partition_found() table Table object RETURN VALUES NONE */ void partition_info::print_no_partition_found(TABLE *table) { char buf[100]; char *buf_ptr= (char*)&buf; my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); if (part_expr->null_value) buf_ptr= (char*)"NULL"; else longlong2str(part_expr->val_int(), buf, part_expr->unsigned_flag ? 10 : -10); my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr); dbug_tmp_restore_column_map(table->read_set, old_map); } #endif /* WITH_PARTITION_STORAGE_ENGINE */ sql/partition_info.h +2 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ class partition_info : public Sql_alloc list_of_part_fields(FALSE), list_of_subpart_fields(FALSE), linear_hash_ind(FALSE), fixed(FALSE), is_auto_partitioned(FALSE), from_openfrm(FALSE), has_null_value(FALSE), has_null_part_id(0) has_null_value(FALSE) { all_fields_in_PF.clear_all(); all_fields_in_PPF.clear_all(); Loading Loading @@ -251,6 +251,7 @@ class partition_info : public Sql_alloc bool check_list_constants(); bool check_partition_info(THD *thd, handlerton **eng_type, handler *file, ulonglong max_rows); void print_no_partition_found(TABLE *table); private: static int list_part_cmp(const void* a, const void* b); static int list_part_cmp_unsigned(const void* a, const void* b); Loading Loading
mysql-test/t/partition.test +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ insert into t1 values (0xFFFFFFFFFFFFFFFD); insert into t1 values (0xFFFFFFFFFFFFFFFE); select * from t1 where (a + 1) < 10; select * from t1 where (a + 1) > 10; drop table t1; # # Bug 19307: CSV engine crashes Loading
sql/ha_ndbcluster.cc +1 −8 Original line number Diff line number Diff line Loading @@ -6420,14 +6420,7 @@ void ha_ndbcluster::print_error(int error, myf errflag) DBUG_PRINT("enter", ("error = %d", error)); if (error == HA_ERR_NO_PARTITION_FOUND) { char buf[100]; my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), m_part_info->part_expr->null_value ? "NULL" : llstr(m_part_info->part_expr->val_int(), buf)); dbug_tmp_restore_column_map(table->read_set, old_map); } m_part_info->print_no_partition_found(table); else handler::print_error(error, errflag); DBUG_VOID_RETURN; Loading
sql/ha_partition.cc +1 −8 Original line number Diff line number Diff line Loading @@ -5097,14 +5097,7 @@ void ha_partition::print_error(int error, myf errflag) DBUG_PRINT("enter", ("error: %d", error)); if (error == HA_ERR_NO_PARTITION_FOUND) { char buf[100]; my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), m_part_info->part_expr->null_value ? "NULL" : llstr(m_part_info->part_expr->val_int(), buf)); dbug_tmp_restore_column_map(table->read_set, old_map); } m_part_info->print_no_partition_found(table); else m_file[0]->print_error(error, errflag); DBUG_VOID_RETURN; Loading
sql/partition_info.cc +24 −0 Original line number Diff line number Diff line Loading @@ -827,4 +827,28 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, } /* Print error for no partition found SYNOPSIS print_no_partition_found() table Table object RETURN VALUES NONE */ void partition_info::print_no_partition_found(TABLE *table) { char buf[100]; char *buf_ptr= (char*)&buf; my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); if (part_expr->null_value) buf_ptr= (char*)"NULL"; else longlong2str(part_expr->val_int(), buf, part_expr->unsigned_flag ? 10 : -10); my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr); dbug_tmp_restore_column_map(table->read_set, old_map); } #endif /* WITH_PARTITION_STORAGE_ENGINE */
sql/partition_info.h +2 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ class partition_info : public Sql_alloc list_of_part_fields(FALSE), list_of_subpart_fields(FALSE), linear_hash_ind(FALSE), fixed(FALSE), is_auto_partitioned(FALSE), from_openfrm(FALSE), has_null_value(FALSE), has_null_part_id(0) has_null_value(FALSE) { all_fields_in_PF.clear_all(); all_fields_in_PPF.clear_all(); Loading Loading @@ -251,6 +251,7 @@ class partition_info : public Sql_alloc bool check_list_constants(); bool check_partition_info(THD *thd, handlerton **eng_type, handler *file, ulonglong max_rows); void print_no_partition_found(TABLE *table); private: static int list_part_cmp(const void* a, const void* b); static int list_part_cmp_unsigned(const void* a, const void* b); Loading