~ubuntu-branches/ubuntu/vivid/mariadb-5.5/vivid-proposed

« back to all changes in this revision

Viewing changes to storage/tokudb/ft-index/locktree/tests/locktree_misc.cc

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2014-11-14 21:04:24 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20141114210424-xlyna0ozl11647o5
Tags: 5.5.40-0ubuntu0.14.10.1
* SECURITY UPDATE: Update to 5.5.40 to fix security issues (LP: #1391676)
  - CVE-2014-6507
  - CVE-2014-6491
  - CVE-2014-6500
  - CVE-2014-6469
  - CVE-2014-6555
  - CVE-2014-6559
  - CVE-2014-6494
  - CVE-2014-6496
  - CVE-2014-6464
* Add bsdutils as mariadb-server dependency like upstream does in 5.5.40.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
COPYRIGHT NOTICE:
31
31
 
32
 
  TokuDB, Tokutek Fractal Tree Indexing Library.
 
32
  TokuFT, Tokutek Fractal Tree Indexing Library.
33
33
  Copyright (C) 2007-2013 Tokutek, Inc.
34
34
 
35
35
DISCLAIMER:
109
109
void locktree_unit_test::test_misc(void) {
110
110
    locktree lt;
111
111
    DICTIONARY_ID dict_id = { 1 };
112
 
    lt.create(nullptr, dict_id, nullptr, my_compare_dbts);
 
112
    toku::comparator my_dbt_comparator;
 
113
    my_dbt_comparator.create(my_compare_dbts, nullptr);
 
114
    lt.create(nullptr, dict_id, my_dbt_comparator);
113
115
 
114
116
    invariant(lt.get_userdata() == nullptr);
115
117
    int userdata;
124
126
    expected_a = &dbt_a;
125
127
    expected_b = &dbt_b;
126
128
 
 
129
    toku::comparator cmp_d1, cmp_d2;
 
130
    cmp_d1.create(my_compare_dbts, &d1);
 
131
    cmp_d2.create(my_compare_dbts, &d2);
 
132
 
127
133
    // make sure the comparator object has the correct
128
134
    // descriptor when we set the locktree's descriptor
129
 
    lt.set_descriptor(&d1);
 
135
    lt.set_comparator(cmp_d1);
130
136
    expected_descriptor = &d1;
131
 
    r = lt.m_cmp->compare(&dbt_a, &dbt_b);
 
137
    r = lt.m_cmp(&dbt_a, &dbt_b);
132
138
    invariant(r == expected_comparison_magic);
133
 
    lt.set_descriptor(&d2);
 
139
    lt.set_comparator(cmp_d2);
134
140
    expected_descriptor = &d2;
135
 
    r = lt.m_cmp->compare(&dbt_a, &dbt_b);
 
141
    r = lt.m_cmp(&dbt_a, &dbt_b);
136
142
    invariant(r == expected_comparison_magic);
137
143
 
138
144
    lt.release_reference();
139
145
    lt.destroy();
 
146
 
 
147
    cmp_d1.destroy();
 
148
    cmp_d2.destroy();
 
149
    my_dbt_comparator.destroy();
140
150
}
141
151
 
142
152
} /* namespace toku */