From: Mark O'D. <mar...@lu...> - 2001-01-02 08:28:12
|
Hi All With the 0.9-4 release the version string returned is: T0.9.4.XX Firebird Test1 (I forget what we're up to with the XX, but it's a number). Pat has found the first instance of parsing the version string in a utility in the TCS suite. The main issue is that tools that parse out the major version number will get a 0, version 0 in the scheme of interbase things, wasn't very impressive and some tools may be looking for version > 4 or > 6. So since this is the first version with the new string, it's worth keeping an eye of for problems using other tools that interact with Firebird. If we strike too many incompatibilities, we'll go back and find another way round - probably by making the first firebird release in the 6.X range. Cheers Mark Patrick J. P. Griffin wrote: > Mark; > > Sure, > > In tcs/gds_drop/drop.c And there I was searching though interbase/*/* ;-). Yep it's a bonefide parse the version string command (in drop.c). get_version() with #define VERSION_STRING "version \"%[A-Z]-%c%c.%c" #define VERSION_MAJOR 1 #define VERSION_MINOR 2 /* extract the vital version info from the string */ if (sscanf(ptr, VERSION_STRING, machine, &ch[0], &ch[VERSION_MAJOR], &ch[VERSION_MINOR])) version = (ch[VERSION_MAJOR] - '0') * 10 + (ch[VERSION_MINOR] - '0'); Then if version < 40 then do some rsh stuff to delete the database. The rsh stuff looks like it would never be relevant to us anyway, so I'd say feel free to commit your change making this the only route used. I think we did a quick check of tcs for dependancies on version a while ago but I guess this one hidden in it's own directory rather than the main tcs one was missed. I still think it's worth pushing through if we can, to aviod confusion with Borland releases, but Im willing to rollback if we get too many of these problems. I'll cc this to firebird-devel about this, so that people can keep an eye out for this sort of thing (Reed gets first dibs on saying I told you so for this ;-). Cheers Mark > First: > > /* extract the version into global variables */ > version = 0; > isc_version(&db_handle, get_version, 0); > > > Then: > > /* if the version is 4.0 then try isc_drop_database */ > if (version >= 40) > { > > > ...pat > > -----Original Message----- > From: fir...@li... > [mailto:fir...@li...] On Behalf Of Mark > O'Donohue > Sent: Tuesday, January 02, 2001 12:48 AM > To: fir...@li... > Subject: Re: [Firebird-test] drop_gds side effect > > > Hi Pat > > Could you give me a clue (like a file and function name ;-). > > I've greped for gds_drop and had a brief look but there is nothing > specific that I can try down to what your saying here. But what you are > saying here sounds like you are looking at a specific line of code. > > Im interested, because if I have missed this comparison, there may be > others. > > At the time I checked fairly extensively for usage of IB_MAJOR_VER, > IB_MINOR_VER and GDS_VERSION. > > Cheers > > Mark > > Patrick J. P. Griffin wrote: > > >> Mark, I believe this is result of changing the Major version from 6 to 0. >> drop_gds is checking the Major and Minor Version ID before selecting >> routines. >> >> ...pat >> >> -----Original Message----- >> From: fir...@li... >> [mailto:fir...@li...] On Behalf Of Mark >> O'Donohue >> Sent: Monday, January 01, 2001 10:46 PM >> To: fir...@li... >> Subject: Re: [Firebird-test] drop_gds side effect >> >> >> Hi Pat >> >> Thanks for that, I'll try and verify it. I presume your aware that the >> changes are related to a security issue, and that some of the cvs >> history has now been wiped (local copy kept of course). >> >> Cheers >> >> Mark >> >> >> Patrick J. P. Griffin wrote: >> >> >> >>> F.Y.I. I've noticed that the latest Firebird build (in my case >> >> PA-T0.9.4.43 >> >> >>> Firebird Test1) has an unpleasant side-effect on drop_gds when attempting >> >> to >> >> >>> drop a database on a remote system. This problem did not exist in build >>> PA-T6.0.9.32. >>> >>> Drop_gds is using the isc_version call and selects different routines >> > when > >>> running with versions greater than 4.0. >>> >>> I'm sorry I'm not able to look at this problem closer at the moment. >>> >>> ...pat >>> p.s. Since I have no interest in versions of IB less than 4.0 I simply >>> hacked on my copy gds_drop. >>> >>> >>> >>> _______________________________________________ >>> Firebird-test mailing list >>> Fir...@li... >>> http://lists.sourceforge.net/mailman/listinfo/firebird-test >> >> >> -- >> Your database needs YOU! >> http://firebird.sourceforge.net >> >> >> _______________________________________________ >> Firebird-test mailing list >> Fir...@li... >> http://lists.sourceforge.net/mailman/listinfo/firebird-test >> >> >> _______________________________________________ >> Firebird-test mailing list >> Fir...@li... >> http://lists.sourceforge.net/mailman/listinfo/firebird-test > > > > -- > Your database needs YOU! > http://firebird.sourceforge.net > > > _______________________________________________ > Firebird-test mailing list > Fir...@li... > http://lists.sourceforge.net/mailman/listinfo/firebird-test > > > _______________________________________________ > Firebird-test mailing list > Fir...@li... > http://lists.sourceforge.net/mailman/listinfo/firebird-test -- Your database needs YOU! http://firebird.sourceforge.net |