Flamerobin 0.9.3 patch

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Flamerobin 0.9.3 patch

Anton Kavalenka
Dear Flamerobin developers!

We fell strange problem with recent flamerobin and Firebird 2.5
Since the 2.5 rdb$relation table properly utilizes dependence of view or from view
(RDB$DEPENDED_ON_TYPE, RDB$DEPENDENT_TYPE) with type =1 (view object type)
Firebird 2.0 has type always set to 0 (table object type)

Generation of 'Alter' statement from context menu requires building of dependencies list.
Currently the dependencies builder explicitly forces self type to 0 (but actually object being examined is a view type=1)
So for the view dependent on views incorrect 'Alter' statement generated.

Proposed patch (author
Arkadi Mazanik) corrects the behavior for Firebird 2.5.

index 20b899f..d3bde94 100644
--- a/src/metadata/metadataitem.cpp
+++ b/src/metadata/metadataitem.cpp
@@ -275,8 +275,8 @@ void MetadataItem::getDependencies(std::vector<Dependency>& list,
             mytype = i;
 
     // views count as relations(tables) when other object refer to them
-    if (mytype == 1 && !ofObject)
-        mytype = 0;
+    //if (mytype == 1 && !ofObject)
+    //    mytype = 0;
     // system tables should be treated as tables
     if (typeM == ntSysTable)
         mytype = 0;

With best regards,
Anton Kavalenka





------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Flamerobin 0.9.3 patch

Milan Babuskov-4
On Thu, Oct 27, 2011 at 2:14 PM, Anton Kavalenka
<[hidden email]> wrote:
> We fell strange problem with recent flamerobin and Firebird 2.5

No wonder because 2.5 is not 100% supported ;)

> Proposed patch (author Arkadi Mazanik) corrects the behavior for Firebird
> 2.5.

Thanks for digging in the source and sending the patch, but AFAICT, it
also makes it wrong for all older versions?

We need something that would be compatible with all Firebird versions.
>From the first glance, it seems it would be enough to check TYPE IN
(0,1) instead of current TYPE=0 when we inspect depended-on Views. So
the statement string build code needs to be modified as well.

Regards,

--
Milan Babuskov
http://www.guacosoft.com

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Flamerobin 0.9.3 patch

Milan Babuskov-4
On Sat, Oct 29, 2011 at 1:51 AM, Milan Babuskov
<[hidden email]> wrote:
> We need something that would be compatible with all Firebird versions.
> From the first glance, it seems it would be enough to check TYPE IN
> (0,1) instead of current TYPE=0 when we inspect depended-on Views. So
> the statement string build code needs to be modified as well.

I committed revision 2192 that should work on both 2.1 and 2.5. I have
tested on 2.1 and it seems fine. Could you please test if this fixes
your problem on 2.5?

Thanks,

--
Milan Babuskov
http://www.guacosoft.com

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Flamerobin 0.9.3 patch

Anton Kavalenka
On -10.01.-28163 22:59, Milan Babuskov wrote:

> On Sat, Oct 29, 2011 at 1:51 AM, Milan Babuskov
> <[hidden email]>  wrote:
>> We need something that would be compatible with all Firebird versions.
>>  From the first glance, it seems it would be enough to check TYPE IN
>> (0,1) instead of current TYPE=0 when we inspect depended-on Views. So
>> the statement string build code needs to be modified as well.
> I committed revision 2192 that should work on both 2.1 and 2.5. I have
> tested on 2.1 and it seems fine. Could you please test if this fixes
> your problem on 2.5?
>
> Thanks,
>
Thank you!

Tested r2194 under
Debian GNU/Linux 6.0 x86_64
Firebird 2.5 and found worked.

regards,
Anton

------------------------------------------------------------------------------
RSA&#174; Conference 2012
Save $700 by Nov 18
Register now&#33;
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel