Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155624 - kde-base/umbrello exports to SQL incorrectly
Summary: kde-base/umbrello exports to SQL incorrectly
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-18 16:10 UTC by Alexey Parshin
Modified: 2007-04-30 15:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for correct SQL export (3.5.5-sql-export.patch,1.43 KB, patch)
2006-11-18 16:12 UTC, Alexey Parshin
Details | Diff
Ebuild for the patched SQL export (umbrello-3.5.5-r1.ebuild,454 bytes, text/plain)
2006-11-18 16:13 UTC, Alexey Parshin
Details
The new patch for the correct SQL export (3.5.5-sql-export.patch,1.47 KB, patch)
2006-11-19 21:53 UTC, Alexey Parshin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Parshin 2006-11-18 16:10:21 UTC
Umbrello makes two errors while exporting class diagram to SQL.

1) During export, the aggregations with no roles defined should not be exported. Most of the SQL servers would error in such situation.

2) Export to SQL ignores aggregation of table to itself, even that this is perfectly legal in any SQL database. Example:

create table t1 (
  id int,
  parent int references t1(id)
);

I'm attaching the draft of ebuild and patch.
Comment 1 Alexey Parshin 2006-11-18 16:12:20 UTC
Created attachment 102307 [details, diff]
Patch for correct SQL export
Comment 2 Alexey Parshin 2006-11-18 16:13:21 UTC
Created attachment 102308 [details]
Ebuild for the patched SQL export
Comment 3 Alexey Parshin 2006-11-18 16:20:32 UTC
KDE version: 3.5.5

Umbrello exports/keeps in the XMI file empty (non-existing) aggregations not accessible through the interface. During export to SQL, these aggregations create (in .sql file) foreign keys with not fields or table names. Proposed patch ignores such empty definitions and doesn't export these foreign keys.

Also, SQL export ignores references from table to the same table. Such references are perfectly legal. Patch allows such references to be exported as foreign keys.


Portage 2.1.2_rc1-r7 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-suspend2 i686)
=================================================================
System uname: 2.6.18-suspend2 i686 Genuine Intel(R) CPU           T2400  @ 1.83GHz
Gentoo Base System version 1.12.6
Last Sync: Sat, 18 Nov 2006 20:50:01 +0000
distcc[11641] (dcc_mkdir) ERROR: mkdir /var/tmp/portage/.distcc/state failed: No such file or directory [disabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks parallel-fetch sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ ftp://mirror.datapipe.net/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="x86 7zip X a52 aac acpi aim aio akode alsa amarok amd amr amrr amuled ao apache2 applet artworkextra asf asm async automount badval bash-completion berkdb bitmap-fonts bl bluetooth bootsplash branding buttons bzip2 cairo calendar cardbus cdda cdinstall cdio cdparanoia cdr cdrom cgi chroot cjk clamav clamd cli corba cpudetection crypt css cups curl cvs cvsgraph dbus dbx dhcp dio directfb djvu dmi dpms dri dts dv dvbplayer dvd dvdr dvdread dvi edl elibc_glibc encode enscript escreen evo evolution exo exscalibar extraengine extramodules fam fame fastcgi fat fax faxonly fbcon fbdev fbsplash festival ffmpeg firefox flac fltk fluidsynth fontconfig foomaticdb fortran freetds freetts freetype ftp gd gdb gdbm gif gimp glitz gmail gmailtimestamps gnokii gnome gnome-print gpm gprof gps gstreamer gtk gtk2 gzip h323 hal hddtemp httpd i8x0 ibam icq icu ide ieee1394 imap imlib input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 irc jpeg jpeg2k kernel_linux kqemu lame lcd ldap libclamav libg++ libnotify libsexy libvisual libwww linuxkeys lirc live lm_sensors lzw mad madwifi maildir matroska mbox mbrola mcal mikmod mime mixer mjpeg mmap mmx mmxext mng mono motif mouse mozcalendar mozsvg mp3 mp4 mp4live mpeg mpeg2 mplayer mpm-prefork mppe-mppc mschap msn mythtv nautilus ncurses nfs nis nls nntp nptl nptlonly nsplugin ntfs ntlm ogg ogre opengl oss pam panel-plugin pango pcmcia pcre pda pdf perl pg-hier php player plib pmu png pnp pop postgres ppds pppd pvm python qemu-fast qt qt3 quicktime rar razor rdesktop readline real reflection reiser4 reiserfs rplay rpm rtc rtsp samba scanner sdl sdl-sound sensord server session sftp shorten silc slang slp sms snmp soap sockets socks5 soundtouch sox spamassassin speech speex spell spf spl spreadsheet sql sqlite sqlite3 sse sse-filters sse2 ssl standalone startup-notification stream stroke subject-rewrite subp subtitles subversion svg swarmcache swat sysfs tcltk tcpd tga theora thesaurus threads thumbnail thunar-vfs tiff timidity tpctlir transcode transparent-proxy truetype truetype-fonts type1 type1-fonts udev unicode upnp usb userland_GNU utf8 v4l v4l2 vcd vcdimager vdr vfat video_cards_ati video_cards_nvidia video_cards_s3 video_cards_savage vidix virus-scan vlm vnc vorbis vorbis-psy webdav wifi win32codecs winbind wma wmf wv x264 xanim xcomposite xfs xine xinetd xml xmlreader xmlrpc xmlwriter xorg xosd xpm xprint xscreensaver xv xvid xvmc yahoo yv12 zip zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Alexey Parshin 2006-11-19 21:52:24 UTC
It looks like my prior patch solved one problem and created another. It incorrectly allows reference a table to itself. The correct way is presented in the new patch, that should replace the prior one.
Comment 5 Alexey Parshin 2006-11-19 21:53:57 UTC
Created attachment 102376 [details, diff]
The new patch for the correct SQL export
Comment 6 Carsten Lohrke (RETIRED) gentoo-dev 2007-04-25 15:52:05 UTC
Alexey, we're not developing Umbrello, just packaging it. Can you please take this patch upstream!? 
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2007-04-30 15:14:08 UTC
As I said, take it upstream please, minor issue from distributors pov so we're not caring.