Merge lp:~brianaker/drizzle/bug_798959 into lp:~drizzle-trunk/drizzle/development

Proposed by Brian Aker
Status: Merged
Approved by: Brian Aker
Approved revision: 2367
Merged at revision: 2368
Proposed branch: lp:~brianaker/drizzle/bug_798959
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 494 lines (+112/-46) (has conflicts)
19 files modified
.bzrignore (+1/-0)
drizzled/function/set_user_var.cc (+2/-0)
drizzled/item/boolean.h (+20/-0)
drizzled/item/cmpfunc.cc (+32/-22)
drizzled/item/cmpfunc.h (+7/-4)
drizzled/message.cc (+0/-6)
drizzled/message.h (+0/-1)
drizzled/set_var.cc (+1/-0)
drizzled/signal_handler.cc (+1/-1)
drizzled/sql_string.cc (+2/-2)
drizzled/sql_string.h (+9/-0)
drizzled/sql_yacc.yy (+3/-1)
drizzled/util/backtrace.cc (+2/-3)
drizzled/util/backtrace.h (+3/-1)
plugin/debug/module.cc (+1/-1)
plugin/utility_functions/tests/r/result_type.result (+2/-2)
plugin/utility_functions/tests/r/typeof.result (+2/-2)
tests/suite/regression/r/798959.result (+18/-0)
tests/suite/regression/t/798959.test (+6/-0)
Text conflict in drizzled/item/boolean.h
Text conflict in drizzled/sql_string.h
To merge this branch: bzr merge lp:~brianaker/drizzle/bug_798959
Reviewer Review Type Date Requested Status
Drizzle Merge Team Pending
Review via email: mp+68036@code.launchpad.net

Description of the change

Fix for 798959

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2011-06-28 21:02:08 +0000
+++ .bzrignore 2011-07-14 22:36:00 +0000
@@ -359,3 +359,4 @@
359drizzled/execute/parser.output359drizzled/execute/parser.output
360drizzled/execute/scanner.cc360drizzled/execute/scanner.cc
361drizzled/execute/scanner.h361drizzled/execute/scanner.h
362plugin/innobase/xtrabackup/drizzlebackup.innobase
362363
=== modified file 'drizzled/function/set_user_var.cc'
--- drizzled/function/set_user_var.cc 2011-05-28 16:23:09 +0000
+++ drizzled/function/set_user_var.cc 2011-07-14 22:36:00 +0000
@@ -144,8 +144,10 @@
144 {144 {
145 save_result.vint= use_result_field ? result_field->val_int() :145 save_result.vint= use_result_field ? result_field->val_int() :
146 args[0]->val_int();146 args[0]->val_int();
147
147 unsigned_flag= use_result_field ? ((Field_num*)result_field)->unsigned_flag:148 unsigned_flag= use_result_field ? ((Field_num*)result_field)->unsigned_flag:
148 args[0]->unsigned_flag;149 args[0]->unsigned_flag;
150
149 break;151 break;
150 }152 }
151 case STRING_RESULT:153 case STRING_RESULT:
152154
=== modified file 'drizzled/item/boolean.h'
--- drizzled/item/boolean.h 2011-07-05 09:52:28 +0000
+++ drizzled/item/boolean.h 2011-07-14 22:36:00 +0000
@@ -20,6 +20,7 @@
20#pragma once20#pragma once
2121
22#include <drizzled/item/basic_constant.h>22#include <drizzled/item/basic_constant.h>
23#include <drizzled/util/backtrace.h>
2324
24namespace drizzled {25namespace drizzled {
25namespace item {26namespace item {
@@ -48,6 +49,11 @@
4849
49 enum Type type() const { return BOOLEAN_ITEM; }50 enum Type type() const { return BOOLEAN_ITEM; }
5051
52 Item_result result_type() const
53 {
54 return INT_RESULT;
55 }
56
51 virtual bool val_bool()57 virtual bool val_bool()
52 {58 {
53 return value;59 return value;
@@ -55,6 +61,7 @@
5561
56 double val_real()62 double val_real()
57 {63 {
64 call_backtrace();
58 return value ? 1 : 0;65 return value ? 1 : 0;
59 }66 }
6067
@@ -66,7 +73,20 @@
66 drizzled::String* val_str(drizzled::String *value_buffer)73 drizzled::String* val_str(drizzled::String *value_buffer)
67 {74 {
68 value_buffer->realloc(5);75 value_buffer->realloc(5);
76<<<<<<< TREE
69 value_buffer->append(value ? "TRUE" : "FALSE");77 value_buffer->append(value ? "TRUE" : "FALSE");
78=======
79
80 if (value)
81 {
82 value_buffer->copy("TRUE", 4, default_charset());
83 }
84 else
85 {
86 value_buffer->copy("FALSE", 5, default_charset());
87 }
88
89>>>>>>> MERGE-SOURCE
70 return value_buffer;90 return value_buffer;
71 }91 }
7292
7393
=== modified file 'drizzled/item/cmpfunc.cc'
--- drizzled/item/cmpfunc.cc 2011-07-08 21:39:07 +0000
+++ drizzled/item/cmpfunc.cc 2011-07-14 22:36:00 +0000
@@ -26,6 +26,7 @@
26#include <drizzled/cached_item.h>26#include <drizzled/cached_item.h>
27#include <drizzled/check_stack_overrun.h>27#include <drizzled/check_stack_overrun.h>
28#include <drizzled/current_session.h>28#include <drizzled/current_session.h>
29#include <drizzled/display.h>
29#include <drizzled/error.h>30#include <drizzled/error.h>
30#include <drizzled/internal/my_sys.h>31#include <drizzled/internal/my_sys.h>
31#include <drizzled/item/cache_int.h>32#include <drizzled/item/cache_int.h>
@@ -33,11 +34,11 @@
33#include <drizzled/item/int_with_ref.h>34#include <drizzled/item/int_with_ref.h>
34#include <drizzled/item/subselect.h>35#include <drizzled/item/subselect.h>
35#include <drizzled/session.h>36#include <drizzled/session.h>
37#include <drizzled/sql_lex.h>
36#include <drizzled/sql_select.h>38#include <drizzled/sql_select.h>
39#include <drizzled/system_variables.h>
37#include <drizzled/temporal.h>40#include <drizzled/temporal.h>
38#include <drizzled/time_functions.h>41#include <drizzled/time_functions.h>
39#include <drizzled/sql_lex.h>
40#include <drizzled/system_variables.h>
4142
42#include <math.h>43#include <math.h>
43#include <algorithm>44#include <algorithm>
@@ -94,7 +95,9 @@
94 for (; item < item_end; item++)95 for (; item < item_end; item++)
95 {96 {
96 if ((*item)->type() != Item::NULL_ITEM)97 if ((*item)->type() != Item::NULL_ITEM)
98 {
97 *type= item_store_type(*type, *item, unsigned_flag);99 *type= item_store_type(*type, *item, unsigned_flag);
100 }
98 }101 }
99}102}
100103
@@ -2371,8 +2374,7 @@
2371}2374}
23722375
23732376
2374void2377void Item_func_if::fix_length_and_dec()
2375Item_func_if::fix_length_and_dec()
2376{2378{
2377 maybe_null= args[1]->maybe_null || args[2]->maybe_null;2379 maybe_null= args[1]->maybe_null || args[2]->maybe_null;
2378 decimals= max(args[1]->decimals, args[2]->decimals);2380 decimals= max(args[1]->decimals, args[2]->decimals);
@@ -2397,32 +2399,38 @@
2397 }2399 }
2398 else2400 else
2399 {2401 {
2400 agg_result_type(&cached_result_type, args+1, 2);2402 agg_result_type(&cached_result_type, args +1, 2);
2401 if (cached_result_type == STRING_RESULT)2403 if (cached_result_type == STRING_RESULT)
2402 {2404 {
2403 if (agg_arg_charsets(collation, args+1, 2, MY_COLL_ALLOW_CONV, 1))2405 if (agg_arg_charsets(collation, args +1, 2, MY_COLL_ALLOW_CONV, 1))
2404 return;2406 return;
2405 }2407 }
2406 else2408 else
2407 {2409 {
2408 collation.set(&my_charset_bin); // Number2410 collation.set(&my_charset_bin); // Number
2409 }2411 }
2410 cached_field_type= agg_field_type(args + 1, 2);2412 cached_field_type= agg_field_type(args +1, 2);
2411 }2413 }
24122414
2413 if ((cached_result_type == DECIMAL_RESULT )2415 switch (cached_result_type)
2414 || (cached_result_type == INT_RESULT))
2415 {2416 {
2416 int len1= args[1]->max_length - args[1]->decimals2417 case DECIMAL_RESULT:
2417 - (args[1]->unsigned_flag ? 0 : 1);2418 case INT_RESULT:
24182419 {
2419 int len2= args[2]->max_length - args[2]->decimals2420 int len1= args[1]->max_length -args[1]->decimals -(args[1]->unsigned_flag ? 0 : 1);
2420 - (args[2]->unsigned_flag ? 0 : 1);2421 int len2= args[2]->max_length -args[2]->decimals -(args[2]->unsigned_flag ? 0 : 1);
24212422 max_length= max(len1, len2) + decimals + (unsigned_flag ? 0 : 1);
2422 max_length= max(len1, len2) + decimals + (unsigned_flag ? 0 : 1);2423 }
2423 }2424 break;
2424 else2425 case REAL_RESULT:
2426 case STRING_RESULT:
2425 max_length= max(args[1]->max_length, args[2]->max_length);2427 max_length= max(args[1]->max_length, args[2]->max_length);
2428 break;
2429
2430 case ROW_RESULT:
2431 assert(0);
2432 break;
2433 }
2426}2434}
24272435
24282436
@@ -2449,8 +2457,8 @@
2449{2457{
2450 assert(fixed == 1);2458 assert(fixed == 1);
2451 Item *arg= args[0]->val_bool() ? args[1] : args[2];2459 Item *arg= args[0]->val_bool() ? args[1] : args[2];
2452 int64_t value=arg->val_int();2460 int64_t value= arg->val_int();
2453 null_value=arg->null_value;2461 null_value= arg->null_value;
2454 return value;2462 return value;
2455}2463}
24562464
@@ -2459,10 +2467,12 @@
2459{2467{
2460 assert(fixed == 1);2468 assert(fixed == 1);
2461 Item *arg= args[0]->val_bool() ? args[1] : args[2];2469 Item *arg= args[0]->val_bool() ? args[1] : args[2];
2462 String *res=arg->val_str(str);2470 String *res= arg->val_str(str);
2463 if (res)2471 if (res)
2472 {
2464 res->set_charset(collation.collation);2473 res->set_charset(collation.collation);
2465 null_value=arg->null_value;2474 }
2475 null_value= arg->null_value;
2466 return res;2476 return res;
2467}2477}
24682478
24692479
=== modified file 'drizzled/item/cmpfunc.h'
--- drizzled/item/cmpfunc.h 2011-07-05 09:52:28 +0000
+++ drizzled/item/cmpfunc.h 2011-07-14 22:36:00 +0000
@@ -677,17 +677,20 @@
677677
678class Item_func_if :public Item_func678class Item_func_if :public Item_func
679{679{
680 enum Item_result cached_result_type;680 Item_result cached_result_type;
681 enum_field_types cached_field_type;681 enum_field_types cached_field_type;
682
682public:683public:
683 Item_func_if(Item *a,Item *b,Item *c)684 Item_func_if(Item *a, Item *b, Item *c) :
684 :Item_func(a,b,c), cached_result_type(INT_RESULT)685 Item_func(a,b,c),
686 cached_result_type(INT_RESULT)
685 {}687 {}
688
686 double val_real();689 double val_real();
687 int64_t val_int();690 int64_t val_int();
688 String *val_str(String *str);691 String *val_str(String *str);
689 type::Decimal *val_decimal(type::Decimal *);692 type::Decimal *val_decimal(type::Decimal *);
690 enum Item_result result_type () const { return cached_result_type; }693 Item_result result_type () const { return cached_result_type; }
691 enum_field_types field_type() const { return cached_field_type; }694 enum_field_types field_type() const { return cached_field_type; }
692 bool fix_fields(Session *, Item **);695 bool fix_fields(Session *, Item **);
693 void fix_length_and_dec();696 void fix_length_and_dec();
694697
=== modified file 'drizzled/message.cc'
--- drizzled/message.cc 2011-04-03 06:02:00 +0000
+++ drizzled/message.cc 2011-07-14 22:36:00 +0000
@@ -207,12 +207,6 @@
207 return NO_ACTION;207 return NO_ACTION;
208}208}
209209
210// This matches SQL standard of using YES/NO not the normal TRUE/FALSE
211const std::string &type(bool type)
212{
213 return type ? YES : NO;
214}
215
216const std::string &type(drizzled::message::Table::Index::IndexType type)210const std::string &type(drizzled::message::Table::Index::IndexType type)
217{211{
218 switch (type)212 switch (type)
219213
=== modified file 'drizzled/message.h'
--- drizzled/message.h 2011-04-04 21:37:55 +0000
+++ drizzled/message.h 2011-07-14 22:36:00 +0000
@@ -42,7 +42,6 @@
42const std::string &type(const drizzled::message::Table::Field &type);42const std::string &type(const drizzled::message::Table::Field &type);
43const std::string &type(drizzled::message::Table::Field::FieldType type);43const std::string &type(drizzled::message::Table::Field::FieldType type);
44const std::string &type(drizzled::message::Table::ForeignKeyConstraint::ForeignKeyOption type);44const std::string &type(drizzled::message::Table::ForeignKeyConstraint::ForeignKeyOption type);
45const std::string &type(bool type);
46const std::string &type(drizzled::message::Table::Index::IndexType type);45const std::string &type(drizzled::message::Table::Index::IndexType type);
47const std::string &type(drizzled::message::Table::ForeignKeyConstraint::ForeignKeyMatchOption type);46const std::string &type(drizzled::message::Table::ForeignKeyConstraint::ForeignKeyMatchOption type);
48const std::string &type(drizzled::message::Table::TableType type);47const std::string &type(drizzled::message::Table::TableType type);
4948
=== modified file 'drizzled/set_var.cc'
--- drizzled/set_var.cc 2011-06-25 13:36:24 +0000
+++ drizzled/set_var.cc 2011-07-14 22:36:00 +0000
@@ -70,6 +70,7 @@
70 error|= it->update(session); // Returns 0, -1 or 170 error|= it->update(session); // Returns 0, -1 or 1
71 }71 }
72 }72 }
73
73err:74err:
74 free_underlaid_joins(session, &session->lex().select_lex);75 free_underlaid_joins(session, &session->lex().select_lex);
75 return error;76 return error;
7677
=== modified file 'drizzled/signal_handler.cc'
--- drizzled/signal_handler.cc 2011-04-20 09:27:49 +0000
+++ drizzled/signal_handler.cc 2011-07-14 22:36:00 +0000
@@ -153,7 +153,7 @@
153 "Hope that's ok; if not, decrease some variables in the "153 "Hope that's ok; if not, decrease some variables in the "
154 "equation.\n\n"));154 "equation.\n\n"));
155155
156 drizzled::util::custom_backtrace();156 call_backtrace();
157157
158 write_core(sig);158 write_core(sig);
159159
160160
=== modified file 'drizzled/sql_string.cc'
--- drizzled/sql_string.cc 2011-07-04 18:16:24 +0000
+++ drizzled/sql_string.cc 2011-07-14 22:36:00 +0000
@@ -286,14 +286,14 @@
286286
287void String::append(const char *s,size_t arg_length)287void String::append(const char *s,size_t arg_length)
288{288{
289 if (!arg_length)289 if (arg_length == 0)
290 return;290 return;
291291
292 /*292 /*
293 For an ASCII compatinble string we can just append.293 For an ASCII compatinble string we can just append.
294 */294 */
295 realloc(str_length+arg_length);295 realloc(str_length+arg_length);
296 memcpy(Ptr+str_length,s,arg_length);296 memcpy(Ptr +str_length, s, arg_length);
297 str_length+=arg_length;297 str_length+=arg_length;
298}298}
299299
300300
=== modified file 'drizzled/sql_string.h'
--- drizzled/sql_string.h 2011-07-04 17:50:09 +0000
+++ drizzled/sql_string.h 2011-07-14 22:36:00 +0000
@@ -137,6 +137,7 @@
137 Ptr= str; str_length=Alloced_length=arg_length ; alloced=0;137 Ptr= str; str_length=Alloced_length=arg_length ; alloced=0;
138 str_charset=cs;138 str_charset=cs;
139 }139 }
140
140 inline void set(const char *str,size_t arg_length, const charset_info_st * const cs)141 inline void set(const char *str,size_t arg_length, const charset_info_st * const cs)
141 {142 {
142 free();143 free();
@@ -145,6 +146,7 @@
145 str_charset=cs;146 str_charset=cs;
146 }147 }
147 void set_ascii(const char *str, size_t arg_length);148 void set_ascii(const char *str, size_t arg_length);
149
148 inline void set_quick(char *str,size_t arg_length, const charset_info_st * const cs)150 inline void set_quick(char *str,size_t arg_length, const charset_info_st * const cs)
149 {151 {
150 if (!alloced)152 if (!alloced)
@@ -153,6 +155,7 @@
153 }155 }
154 str_charset= cs;156 str_charset= cs;
155 }157 }
158
156 void set_int(int64_t num, bool unsigned_flag, const charset_info_st * const cs);159 void set_int(int64_t num, bool unsigned_flag, const charset_info_st * const cs);
157 void set(int64_t num, const charset_info_st * const cs)160 void set(int64_t num, const charset_info_st * const cs)
158 { set_int(num, false, cs); }161 { set_int(num, false, cs); }
@@ -243,7 +246,13 @@
243 void copy(const String&); // Allocate new string246 void copy(const String&); // Allocate new string
244 void copy(const std::string&, const charset_info_st*); // Allocate new string247 void copy(const std::string&, const charset_info_st*); // Allocate new string
245 void copy(const char*, size_t, const charset_info_st*); // Allocate new string248 void copy(const char*, size_t, const charset_info_st*); // Allocate new string
249<<<<<<< TREE
246 static bool needs_conversion(size_t arg_length, const charset_info_st* cs_from, const charset_info_st* cs_to);250 static bool needs_conversion(size_t arg_length, const charset_info_st* cs_from, const charset_info_st* cs_to);
251=======
252 static bool needs_conversion(size_t arg_length,
253 const charset_info_st* cs_from, const charset_info_st* cs_to,
254 size_t *offset);
255>>>>>>> MERGE-SOURCE
247 void set_or_copy_aligned(const char *s, size_t arg_length, const charset_info_st*);256 void set_or_copy_aligned(const char *s, size_t arg_length, const charset_info_st*);
248 void copy(const char*s,size_t arg_length, const charset_info_st& csto);257 void copy(const char*s,size_t arg_length, const charset_info_st& csto);
249 void append(const String &s);258 void append(const String &s);
250259
=== modified file 'drizzled/sql_yacc.yy'
--- drizzled/sql_yacc.yy 2011-07-01 18:59:28 +0000
+++ drizzled/sql_yacc.yy 2011-07-14 22:36:00 +0000
@@ -2999,7 +2999,9 @@
2999 }2999 }
3000 }3000 }
3001 | IF '(' expr ',' expr ',' expr ')'3001 | IF '(' expr ',' expr ',' expr ')'
3002 { $$= new (YYSession->mem_root) Item_func_if($3,$5,$7); }3002 {
3003 $$= new (YYSession->mem_root) Item_func_if($3,$5,$7);
3004 }
3003 | KILL_SYM kill_option '(' expr ')'3005 | KILL_SYM kill_option '(' expr ')'
3004 {3006 {
3005 List<Item> *args= new (YYSession->mem_root) List<Item>;3007 List<Item> *args= new (YYSession->mem_root) List<Item>;
30063008
=== modified file 'drizzled/util/backtrace.cc'
--- drizzled/util/backtrace.cc 2011-02-17 00:14:13 +0000
+++ drizzled/util/backtrace.cc 2011-07-14 22:36:00 +0000
@@ -18,7 +18,6 @@
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */19 */
2020
21
22#include <config.h>21#include <config.h>
23#include <drizzled/util/backtrace.h>22#include <drizzled/util/backtrace.h>
2423
@@ -33,14 +32,14 @@
33#endif // HAVE_BACKTRACE32#endif // HAVE_BACKTRACE
34#endif // __GNUC__33#endif // __GNUC__
3534
36
37namespace drizzled35namespace drizzled
38{36{
39namespace util37namespace util
40{38{
4139
42void custom_backtrace(void)40void custom_backtrace(const char *file, int line, const char *func)
43{41{
42 std::cerr << std::endl << "call_backtrace() began at " << file << ":" << line << " for " << func << "()" << std::endl;
44#ifdef __GNUC__43#ifdef __GNUC__
45#ifdef HAVE_BACKTRACE44#ifdef HAVE_BACKTRACE
46 void *array[50];45 void *array[50];
4746
=== modified file 'drizzled/util/backtrace.h'
--- drizzled/util/backtrace.h 2011-03-14 05:40:28 +0000
+++ drizzled/util/backtrace.h 2011-07-14 22:36:00 +0000
@@ -22,6 +22,8 @@
2222
23#include <drizzled/visibility.h>23#include <drizzled/visibility.h>
2424
25#define call_backtrace() drizzled::util::custom_backtrace(__FILE__, __LINE__, __func__)
26
25namespace drizzled27namespace drizzled
26{28{
2729
@@ -29,7 +31,7 @@
29{31{
3032
31DRIZZLED_API33DRIZZLED_API
32void custom_backtrace(void);34void custom_backtrace(const char *file, int line, const char *func);
3335
34} /* namespace util */36} /* namespace util */
35} /* namespace drizzled */37} /* namespace drizzled */
3638
=== modified file 'plugin/debug/module.cc'
--- plugin/debug/module.cc 2011-02-17 00:14:13 +0000
+++ plugin/debug/module.cc 2011-07-14 22:36:00 +0000
@@ -101,7 +101,7 @@
101101
102 bool val_bool()102 bool val_bool()
103 {103 {
104 util::custom_backtrace();104 call_backtrace();
105 return true;105 return true;
106 }106 }
107107
108108
=== modified file 'plugin/utility_functions/tests/r/result_type.result'
--- plugin/utility_functions/tests/r/result_type.result 2010-12-30 04:59:36 +0000
+++ plugin/utility_functions/tests/r/result_type.result 2011-07-14 22:36:00 +0000
@@ -3,10 +3,10 @@
3STRING3STRING
4SELECT RESULT_TYPE(FALSE);4SELECT RESULT_TYPE(FALSE);
5RESULT_TYPE(FALSE)5RESULT_TYPE(FALSE)
6REAL6INTEGER
7SELECT RESULT_TYPE(TRUE);7SELECT RESULT_TYPE(TRUE);
8RESULT_TYPE(TRUE)8RESULT_TYPE(TRUE)
9REAL9INTEGER
10SELECT RESULT_TYPE("");10SELECT RESULT_TYPE("");
11RESULT_TYPE("")11RESULT_TYPE("")
12STRING12STRING
1313
=== modified file 'plugin/utility_functions/tests/r/typeof.result'
--- plugin/utility_functions/tests/r/typeof.result 2010-12-30 06:23:25 +0000
+++ plugin/utility_functions/tests/r/typeof.result 2011-07-14 22:36:00 +0000
@@ -3,10 +3,10 @@
3DRIZZLE_TYPE_NULL3DRIZZLE_TYPE_NULL
4SELECT TYPEOF(FALSE);4SELECT TYPEOF(FALSE);
5TYPEOF(FALSE)5TYPEOF(FALSE)
6DRIZZLE_TYPE_DOUBLE6DRIZZLE_TYPE_LONGLONG
7SELECT TYPEOF(TRUE);7SELECT TYPEOF(TRUE);
8TYPEOF(TRUE)8TYPEOF(TRUE)
9DRIZZLE_TYPE_DOUBLE9DRIZZLE_TYPE_LONGLONG
10SELECT TYPEOF("");10SELECT TYPEOF("");
11TYPEOF("")11TYPEOF("")
12DRIZZLE_TYPE_VARCHAR12DRIZZLE_TYPE_VARCHAR
1313
=== added file 'tests/suite/regression/r/798959.result'
--- tests/suite/regression/r/798959.result 1970-01-01 00:00:00 +0000
+++ tests/suite/regression/r/798959.result 2011-07-14 22:36:00 +0000
@@ -0,0 +1,18 @@
1SELECT IF(true, result_type(1), 'yes');
2IF(true, result_type(1), 'yes')
3INTEGER
4SELECT IF(true, typeof(1), 'yes');
5IF(true, typeof(1), 'yes')
6DRIZZLE_TYPE_LONGLONG
7SELECT IF(true, result_type(true), 'yes');
8IF(true, result_type(true), 'yes')
9INTEGER
10SELECT IF(true, typeof(true), 'yes');
11IF(true, typeof(true), 'yes')
12DRIZZLE_TYPE_LONGLONG
13SELECT IF(true, true, 'yes');
14IF(true, true, 'yes')
15TRUE
16SELECT IF(true, true, '');
17IF(true, true, '')
18TRUE
019
=== added file 'tests/suite/regression/t/798959.test'
--- tests/suite/regression/t/798959.test 1970-01-01 00:00:00 +0000
+++ tests/suite/regression/t/798959.test 2011-07-14 22:36:00 +0000
@@ -0,0 +1,6 @@
1SELECT IF(true, result_type(1), 'yes');
2SELECT IF(true, typeof(1), 'yes');
3SELECT IF(true, result_type(true), 'yes');
4SELECT IF(true, typeof(true), 'yes');
5SELECT IF(true, true, 'yes');
6SELECT IF(true, true, '');