{ ************************************************************************* }
{                                                                           }
{  Licensed Materials - Property of IBM and/or HCL                                     }
{                                                                           }
{  IBM Informix Dynamic Server                                              }
{  (c) Copyright IBM Corporation 1996, 2004 All rights reserved.            }
{  (c) Copyright HCL Technologies Ltd. 2017.  All Rights Reserved.             }
{                                                                           }
{ ************************************************************************* }
{                                                                           }
{   Title:      boot920b.sql                                                }
{                                                                           }
{   Description:                                                            }
{       Bootstrapping script for a 9.20 post prebeta release                }
{                                                                           }
{ ************************************************************************* }
{                                                                           }
{  ** IMPORTANT - PLEASE READ                                               } 
{                                                                           }
{     All types and routines referenced in this file must be prefixed       }
{     with the user name "informix". E.g., use "informix.boolean"           }
{     and not "boolean"                                                     }
{									    }
{     Also, please follow the formatting conventions!!!                     }
{                                                                           }
{     Please ensure that the identifiers that you choose are <= 18          }
{     characters in length. Otherwise the changes would affect database     }
{     reversion.                                                            }
{                                                                           }
{ ************************************************************************* }
create opaque type informix.clientbinval
(
	internallength=variable,
	alignment = 1,
	maxlen = 2048,
	cannothash
);

create function informix.clientbinval_send(informix.clientbinval)
    returns informix.sendrecv
    external name '(mife_clientbinval_send)'
    language C;        
create function informix.clientbinval_recv(informix.sendrecv)
    returns informix.clientbinval
    external name '(mife_clientbinval_recv)'
    language C;        
create explicit cast (informix.clientbinval as informix.sendrecv
        with informix.clientbinval_send);
create implicit cast (informix.sendrecv as informix.clientbinval
        with informix.clientbinval_recv);

create dba function informix.mi_cast_datum(informix.clientbinval,
	  int, int, int, int)
	returns informix.clientbinval
	external name '(mife_cast_datum)'
	language C;

create dba function informix.mi_cast_datum(informix.clientbinval,
	  informix.lvarchar, informix.lvarchar)
	returns informix.clientbinval
	external name '(mife_cast_datum_by_name)'
	language C;

grant execute on function informix.mi_cast_datum(informix.clientbinval,
	  int, int, int, int)
	to public as informix;

grant execute on function informix.mi_cast_datum(informix.clientbinval,
	  informix.lvarchar, informix.lvarchar)
	to public as informix;

---Rtree tracing support
create dba function informix.rlt_tracelevel_set(integer)
	returns integer
	external name '(rlt_tracelevel_set)'
	language C;

grant execute on function informix.rlt_tracelevel_set(integer)
        to public as informix;

create dba function informix.rlt_tracefile_set(informix.lvarchar)
	returns integer
	external name '(rlt_tracefile_set)'
	language C;

grant execute on function informix.rlt_tracefile_set(informix.lvarchar)
        to public as informix;

