4737 Alexander Barkov 2012-12-06
Minor refactoring in GIS code:
incapsulating "thread_start":
moving it into the private section and adding public methods to access.
Helps to debug easier, e.g. set breakpoints when "thread_start" is set or read.
modified:
sql/gcalc_tools.cc
sql/gcalc_tools.h
4736 Gleb Shchepa 2012-12-05 [merge]
Auto up-merge
modified:
sql/mdl.h
=== modified file 'sql/gcalc_tools.cc'
--- a/sql/gcalc_tools.cc 2012-10-15 14:15:49 +0000
+++ b/sql/gcalc_tools.cc 2012-12-06 06:52:12 +0000
@@ -683,13 +683,13 @@ int Gcalc_operation_reducer::start_coupl
t1->rp= rp1;
if (prev_range)
{
- rp0->set_outer_poly(prev_range->thread_start);
- t1->thread_start= prev_range->thread_start;
+ rp0->set_outer_poly(prev_range->thread_start());
+ t1->set_thread_start(prev_range->thread_start());
}
else
{
rp0->set_outer_poly(NULL);
- t0->thread_start= rp0;
+ t0->set_thread_start(rp0);
}
DBUG_RETURN(0);
}
@@ -712,13 +712,13 @@ int Gcalc_operation_reducer::start_i_cou
t1->rp= rp1;
if (prev_range)
{
- rp0->set_outer_poly(prev_range->thread_start);
- t1->thread_start= prev_range->thread_start;
+ rp0->set_outer_poly(prev_range->thread_start());
+ t1->set_thread_start(prev_range->thread_start());
}
else
{
rp0->set_outer_poly(NULL);
- t0->thread_start= rp0;
+ t0->set_thread_start(rp0);
}
DBUG_RETURN(0);
}
=== modified file 'sql/gcalc_tools.h'
--- a/sql/gcalc_tools.h 2012-10-15 14:15:49 +0000
+++ b/sql/gcalc_tools.h 2012-12-06 06:52:12 +0000
@@ -275,16 +275,25 @@ public:
class active_thread : public Gcalc_dyn_list::Item
{
+ res_point *m_thread_start;
public:
res_point *rp;
int result_range;
- res_point *thread_start;
void init()
{
- rp= thread_start= NULL;
+ rp= m_thread_start= NULL;
result_range= 0;
+ DBUG_PRINT("info", ("setting m_thread_start of #%u to NULL (reset)",
+ item_id()));
}
active_thread *get_next() { return (active_thread *)next; }
+ void set_thread_start(res_point *p)
+ {
+ DBUG_PRINT("info", ("setting m_thread_start of #%u to #%u",
+ item_id(), p ? p->item_id() : 0));
+ m_thread_start= p;
+ }
+ res_point *thread_start() const { return m_thread_start; }
};
protected:
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.6 branch (alexander.barkov:4736 to 4737) | Alexander Barkov | 6 Dec |