Fixed segfault in adjust_informix due to missing varchar type.
authorMichael Meskes
Mon, 10 Jan 2005 12:58:30 +0000 (12:58 +0000)
committerMichael Meskes
Mon, 10 Jan 2005 12:58:30 +0000 (12:58 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/preproc/preproc.y

index 3d6fe4fbb1f5c5cb6381428c3f964250297eff23..1f8252731b6d2d3924459241c0261520323e690b 100644 (file)
@@ -1882,6 +1882,15 @@ Mon Dec  6 21:27:34 CET 2004
    
    - Fixed bug in parsing of typedef'ed array sizes.
    - Synced parser.
+   
+Thu Dec 23 09:26:08 CET 2004
+
+   - Added PGTYPEStimestamp_add_interval written by Dave Cramer.
+   - Fixed parsing of defines to make sure they used more than once.   
+   
+Mon Jan 10 13:55:32 CET 2005
+   
+   - Fixed segfault in adjust_informix due to missing varchar type.
    - Set ecpg version to 3.2.0.
    - Set compat library version to 1.2.
    - Set ecpg library version to 4.2.
index 02b33e8bbd5a21801147ad111e19552fba2f1e65..8ee348fc2f72c3b26773f3033cbfbecbb9459d84 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.302 2004/12/06 20:35:35 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.303 2005/01/10 12:58:30 meskes Exp $ */
 
 /* Copyright comment */
 %{
@@ -231,12 +231,12 @@ adjust_informix(struct arguments *list)
        original_var = ptr->variable->name;
        sprintf(temp, "%d))", ecpg_informix_var);
        
-       if ((ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
+       if ((ptr->variable->type->type != ECPGt_varchar && ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
        {
            ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ECPGtype_name(ptr->variable->type->u.element->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type, make_str("1")), ptr->variable->type->size), 0);
            sprintf(temp, "%d, (", ecpg_informix_var++);
        }
-       else if ((ptr->variable->type->type == ECPGt_char || ptr->variable->type->type == ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
+       else if ((ptr->variable->type->type == ECPGt_varchar || ptr->variable->type->type == ECPGt_char || ptr->variable->type->type == ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
        {
            ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ECPGtype_name(ptr->variable->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->variable->type->type, ptr->variable->type->size), 0);
            sprintf(temp, "%d, (", ecpg_informix_var++);