← Back to team overview

maria-developers team mailing list archive

No coverage for cases where materialization failed to create temptable?

 

Hi Timour,

I was working on BUG#868908, which involves having different kind of handling for 
cases where Materialization is not applicable because temp table had the wrong properties. 

So, I've set a goal to catch such cases:

=== modified file 'sql/item_subselect.cc'
--- sql/item_subselect.cc       2011-12-06 21:03:00 +0000
+++ sql/item_subselect.cc       2011-12-06 21:11:16 +0000
@@ -4182,6 +4182,8 @@ bool subselect_hash_sj_engine::init(List
   */
   if (tmp_table->s->keys == 0)
   {
+    //fprintf(stderr, "Q: %s\n", current_thd->query());
+    DBUG_ASSERT(0);
     DBUG_ASSERT(
       tmp_table->s->uniques ||
       tmp_table->key_info->key_length >= tmp_table->file->max_key_length() ||

Surprisingly, running mysql-test-run t/subselect*.test with this didn't produce any failures.
Is this poor test coverage? Or, this branch is now deadcode?

BR
 Sergei
-- 
Sergei Petrunia, Software Developer
Monty Program AB, http://askmonty.org
Blog: http://s.petrunia.net/blog