Skip to content
Snippets Groups Projects
Commit 2a8b626d authored by Michael Meskes's avatar Michael Meskes
Browse files

Fixed segfault in Informix mode.

parent e32bba20
No related branches found
No related tags found
No related merge requests found
...@@ -1854,6 +1854,10 @@ Tue Jul 20 09:15:21 CEST 2004 ...@@ -1854,6 +1854,10 @@ Tue Jul 20 09:15:21 CEST 2004
Mon Jul 26 09:04:53 CEST 2004 Mon Jul 26 09:04:53 CEST 2004
- SQL defines are only used in SQL space in Informix mode. - SQL defines are only used in SQL space in Informix mode.
Mon Sep 6 13:17:46 CEST 2004
- Fixed bug in Informix mode that caused a segfault.
- Set pgtypes library version to 1.2. - Set pgtypes library version to 1.2.
- Set ecpg version to 3.2.0. - Set ecpg version to 3.2.0.
- Set compat library version to 1.2. - Set compat library version to 1.2.
......
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.295 2004/08/28 18:04:51 tgl Exp $ */ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.296 2004/09/06 11:23:07 meskes Exp $ */
/* Copyright comment */ /* Copyright comment */
%{ %{
...@@ -230,6 +230,11 @@ adjust_informix(struct arguments *list) ...@@ -230,6 +230,11 @@ adjust_informix(struct arguments *list)
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); 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++); 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)
{
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++);
}
else else
{ {
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); 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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment