OSDN Git Service

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

index 3d6fe4f..1f82527 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 02b33e8..8ee348f 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++);