Merge lp:~sinha/drizzle/patch-621856 into lp:drizzle/7.0

Proposed by Akash Sinha
Status: Superseded
Proposed branch: lp:~sinha/drizzle/patch-621856
Merge into: lp:drizzle/7.0
Diff against target: 231 lines (+21/-22)
12 files modified
drizzled/join.cc (+1/-2)
drizzled/join_cache.cc (+1/-1)
drizzled/sql_lex.h (+1/-1)
drizzled/sql_parse.cc (+3/-3)
drizzled/sql_parse.h (+2/-2)
drizzled/sql_select.cc (+4/-4)
drizzled/sql_select.h (+4/-4)
drizzled/statement/insert.cc (+1/-1)
drizzled/statement/insert_select.cc (+1/-1)
drizzled/statement/replace.cc (+1/-1)
drizzled/statement/replace_select.cc (+1/-1)
drizzled/statement/update.cc (+1/-1)
To merge this branch: bzr merge lp:~sinha/drizzle/patch-621856
Reviewer Review Type Date Requested Status
Stewart Smith Pending
Review via email: mp+53330@code.launchpad.net

This proposal has been superseded by a proposal from 2011-03-15.

Description of the change

Functions inside the drizzled directory have been re-factored (unused params removed) and their definitions and call sites are taken care.

Virtual functions are not touched,will do them afterwards.

To post a comment you must log in.
lp:~sinha/drizzle/patch-621856 updated
2237. By Akash Sinha<email address hidden>

calc_used_field_length call updated.

Unmerged revisions

2237. By Akash Sinha<email address hidden>

calc_used_field_length call updated.

2236. By Akash Sinha<email address hidden>

sql_select.cc
        #1 int join_no_more_records(ReadRecord *) at line 3549
           sql_select.h file: function altered
           No other calls found

        #2 void calc_used_field_length(Session *, JoinTable *join_tab) at line 847
        sql_select.h file: function altered
        Calls from join.cc and join_cache.cc altered

        #3 enum_nested_loop_state end_send_group(Join *join, JoinTable *, bool end_of_records)
        sql_select.h file: function altered
        no other calls

        #4 enum_nested_loop_state end_write_group(Join *join, JoinTable *, bool end_of_records)
        sql_select.h file: function altered
        no other calls

sql_parse.cc
        #1 TableList *Select_Lex::end_nested_join(Session *) at line 1130
        sql_lex.h file : definition altered
        No other calls found

        #2 bool update_precheck(Session *session, TableList *) at line 1539
        sql_parse.h file: function altered
        statement/update.cc call altered

        #3 bool insert_precheck(Session *session, TableList *) at line 1578
        sql_parse.h file: function altered
        Calls from these files updated
                statement/replace_select.cc
                statement/insert_select.cc
                statement/replace.cc
                statement/insert.cc

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/join.cc'
2--- drizzled/join.cc 2011-03-10 12:49:38 +0000
3+++ drizzled/join.cc 2011-03-14 21:44:38 +0000
4@@ -3289,7 +3289,6 @@
5 {
6 uint32_t length=0;
7 JoinTable **pos,**end;
8- Session *session=join->session;
9
10 for (pos=join->best_ref+join->const_tables,end=join->best_ref+idx ;
11 pos != end ;
12@@ -3297,7 +3296,7 @@
13 {
14 JoinTable *join_tab= *pos;
15 if (!join_tab->used_fieldlength) /* Not calced yet */
16- calc_used_field_length(session, join_tab);
17+ calc_used_field_length( join_tab);
18 length+=join_tab->used_fieldlength;
19 }
20 return length;
21
22=== modified file 'drizzled/join_cache.cc'
23--- drizzled/join_cache.cc 2011-02-17 00:14:13 +0000
24+++ drizzled/join_cache.cc 2011-03-14 21:44:38 +0000
25@@ -78,7 +78,7 @@
26 for (unsigned int i= 0; i < table_count ; i++, join_tab++)
27 {
28 if (!join_tab->used_fieldlength) /* Not calced yet */
29- calc_used_field_length(session, join_tab);
30+ calc_used_field_length(join_tab);
31 cache->fields+=join_tab->used_fields;
32 blobs+=join_tab->used_blobs;
33
34
35=== modified file 'drizzled/sql_lex.h'
36--- drizzled/sql_lex.h 2011-03-14 05:40:28 +0000
37+++ drizzled/sql_lex.h 2011-03-14 21:44:38 +0000
38@@ -615,7 +615,7 @@
39 LEX_STRING *option= 0);
40 TableList* get_table_list();
41 bool init_nested_join(Session *session);
42- TableList *end_nested_join(Session *session);
43+ TableList *end_nested_join();
44 TableList *nest_last_join(Session *session);
45 void add_joined_table(TableList *table);
46 TableList *convert_right_join();
47
48=== modified file 'drizzled/sql_parse.cc'
49--- drizzled/sql_parse.cc 2011-03-10 13:40:36 +0000
50+++ drizzled/sql_parse.cc 2011-03-14 21:44:38 +0000
51@@ -1127,7 +1127,7 @@
52 - 0, otherwise
53 */
54
55-TableList *Select_Lex::end_nested_join(Session *)
56+TableList *Select_Lex::end_nested_join()
57 {
58 TableList *ptr;
59 NestedJoin *nested_join;
60@@ -1536,7 +1536,7 @@
61 true Error
62 */
63
64-bool update_precheck(Session *session, TableList *)
65+bool update_precheck(Session *session)
66 {
67 const char *msg= 0;
68 Select_Lex *select_lex= &session->lex().select_lex;
69@@ -1575,7 +1575,7 @@
70 true error
71 */
72
73-bool insert_precheck(Session *session, TableList *)
74+bool insert_precheck(Session *session)
75 {
76 /*
77 Check that we have modify privileges for the first table and
78
79=== modified file 'drizzled/sql_parse.h'
80--- drizzled/sql_parse.h 2011-03-14 05:40:28 +0000
81+++ drizzled/sql_parse.h 2011-03-14 21:44:38 +0000
82@@ -47,9 +47,9 @@
83
84 bool execute_sqlcom_select(Session *session, TableList *all_tables);
85 bool insert_select_prepare(Session *session);
86-bool update_precheck(Session *session, TableList *tables);
87+bool update_precheck(Session *session);
88 bool delete_precheck(Session *session, TableList *tables);
89-bool insert_precheck(Session *session, TableList *tables);
90+bool insert_precheck(Session *session);
91
92 Item *negate_expression(Session *session, Item *expr);
93
94
95=== modified file 'drizzled/sql_select.cc'
96--- drizzled/sql_select.cc 2011-03-11 19:18:45 +0000
97+++ drizzled/sql_select.cc 2011-03-14 21:44:38 +0000
98@@ -844,7 +844,7 @@
99 /**
100 Find how much space the prevous read not const tables takes in cache.
101 */
102-void calc_used_field_length(Session *, JoinTable *join_tab)
103+void calc_used_field_length(JoinTable *join_tab)
104 {
105 uint32_t null_fields,blobs,fields,rec_length;
106 Field **f_ptr,*field;
107@@ -3546,7 +3546,7 @@
108 return 0;
109 }
110
111-int join_no_more_records(ReadRecord *)
112+int join_no_more_records()
113 {
114 return -1;
115 }
116@@ -3798,7 +3798,7 @@
117 return safe_index_read(tab); // then read null keys
118 }
119
120-enum_nested_loop_state end_send_group(Join *join, JoinTable *, bool end_of_records)
121+enum_nested_loop_state end_send_group(Join *join, bool end_of_records)
122 {
123 int idx= -1;
124 enum_nested_loop_state ok_code= NESTED_LOOP_OK;
125@@ -3887,7 +3887,7 @@
126 return(NESTED_LOOP_OK);
127 }
128
129-enum_nested_loop_state end_write_group(Join *join, JoinTable *, bool end_of_records)
130+enum_nested_loop_state end_write_group(Join *join, bool end_of_records)
131 {
132 Table *table=join->tmp_table;
133 int idx= -1;
134
135=== modified file 'drizzled/sql_select.h'
136--- drizzled/sql_select.h 2011-03-14 05:40:28 +0000
137+++ drizzled/sql_select.h 2011-03-14 21:44:38 +0000
138@@ -56,8 +56,8 @@
139
140 enum_nested_loop_state sub_select_cache(Join *join, JoinTable *join_tab, bool end_of_records);
141 enum_nested_loop_state sub_select(Join *join,JoinTable *join_tab, bool end_of_records);
142-enum_nested_loop_state end_send_group(Join *join, JoinTable *join_tab, bool end_of_records);
143-enum_nested_loop_state end_write_group(Join *join, JoinTable *join_tab, bool end_of_records);
144+enum_nested_loop_state end_send_group(Join *join,bool end_of_records);
145+enum_nested_loop_state end_write_group(Join *join, bool end_of_records);
146
147 class Rollup
148 {
149@@ -211,7 +211,7 @@
150 int join_read_key(JoinTable *tab);
151 int join_read_always_key(JoinTable *tab);
152 int join_read_last_key(JoinTable *tab);
153-int join_no_more_records(ReadRecord *info);
154+int join_no_more_records();
155 int join_read_next(ReadRecord *info);
156 int join_read_next_different(ReadRecord *info);
157 int join_init_quick_read_record(JoinTable *tab);
158@@ -227,7 +227,7 @@
159 int join_read_always_key_or_null(JoinTable *tab);
160 int join_read_next_same_or_null(ReadRecord *info);
161
162-void calc_used_field_length(Session *, JoinTable *join_tab);
163+void calc_used_field_length(JoinTable *join_tab);
164 StoredKey *get_store_key(Session *session,
165 optimizer::KeyUse *keyuse,
166 table_map used_tables,
167
168=== modified file 'drizzled/statement/insert.cc'
169--- drizzled/statement/insert.cc 2011-03-10 10:44:18 +0000
170+++ drizzled/statement/insert.cc 2011-03-14 21:44:38 +0000
171@@ -35,7 +35,7 @@
172 assert(first_table == all_tables && first_table != 0);
173 bool need_start_waiting= false;
174
175- if (insert_precheck(&session(), all_tables))
176+ if (insert_precheck(&session()))
177 {
178 return true;
179 }
180
181=== modified file 'drizzled/statement/insert_select.cc'
182--- drizzled/statement/insert_select.cc 2011-03-10 10:44:18 +0000
183+++ drizzled/statement/insert_select.cc 2011-03-14 21:44:38 +0000
184@@ -40,7 +40,7 @@
185 bool res= false;
186 bool need_start_waiting= false;
187
188- if (insert_precheck(&session(), all_tables))
189+ if (insert_precheck(&session()))
190 {
191 return true;
192 }
193
194=== modified file 'drizzled/statement/replace.cc'
195--- drizzled/statement/replace.cc 2011-03-10 10:44:18 +0000
196+++ drizzled/statement/replace.cc 2011-03-14 21:44:38 +0000
197@@ -33,7 +33,7 @@
198 TableList *all_tables= lex().query_tables;
199 assert(first_table == all_tables && first_table != 0);
200
201- if (insert_precheck(&session(), all_tables))
202+ if (insert_precheck(&session()))
203 {
204 return true;
205 }
206
207=== modified file 'drizzled/statement/replace_select.cc'
208--- drizzled/statement/replace_select.cc 2011-03-10 10:44:18 +0000
209+++ drizzled/statement/replace_select.cc 2011-03-14 21:44:38 +0000
210@@ -38,7 +38,7 @@
211 select_result *sel_result= NULL;
212 bool res;
213
214- if (insert_precheck(&session(), all_tables))
215+ if (insert_precheck(&session()))
216 {
217 return true;
218 }
219
220=== modified file 'drizzled/statement/update.cc'
221--- drizzled/statement/update.cc 2011-03-10 10:44:18 +0000
222+++ drizzled/statement/update.cc 2011-03-14 21:44:38 +0000
223@@ -33,7 +33,7 @@
224 assert(first_table == all_tables && first_table != 0);
225 Select_Lex *select_lex= &lex().select_lex;
226 Select_Lex_Unit *unit= &lex().unit;
227- if (update_precheck(&session(), all_tables))
228+ if (update_precheck(&session()))
229 {
230 return true;
231 }

Subscribers

People subscribed via source and target branches