Version: 1.5 rc1 (SVN: 1.5 branch, 8 April 2006) (using KDE KDE 3.4.3) Installed from: Gentoo Packages Compiler: gcc 3.4.5 OS: Linux Just submitted 125216, so I thought: let's change the database directly with a simple SQL query (ALTER TABLE test ADD testcolumn VARCHAR(32); for example). But now Kexi refuses to load the database, even worse, it crashes. OK, it worth trying, but Kexi should handle this. I'm using PostgreSQL as database backend. #6 0xb5d30c72 in KexiDB::pqxxSqlCursor::pValue (this=0x8494d88, pos=2) at /home/bram/KDE/koffice/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp:274 #7 0xb5d31d26 in KexiDB::pqxxSqlCursor::storeCurrentRow (this=0x8494d88, data=@0x849d028) at /home/bram/KDE/koffice/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp:383 #8 0xb7beb8bf in KexiTableViewData::preloadAllRows (this=0x82640f0) at /home/bram/KDE/koffice/kexi/widget/tableview/kexitableviewdata.cpp:818 #9 0xb7c59fb8 in KexiDataTableView::setData (this=0x846d3b8, cursor=0x8494d88) at /home/bram/KDE/koffice/kexi/widget/kexidatatableview.cpp:117 #10 0xb7c59210 in KexiDataTable::setData (this=0x8443408, c=0x8494d88) at /home/bram/KDE/koffice/kexi/widget/kexidatatable.cpp:195 #11 0xb5b24a42 in KexiAlterTable_DataView::afterSwitchFrom (this=0x8443408, mode=0) at /home/bram/KDE/koffice/kexi/plugins/tables/kexialtertable_dataview.cpp:69 #12 0xb7b35654 in KexiDialogBase::switchToViewMode (this=0x845d150, newViewMode=1, staticObjectArgs=0x0) at /home/bram/KDE/koffice/kexi/core/kexidialogbase.cpp:353 #13 0xb7b4178c in KexiPart::Part::openInstance (this=0x83c30e0, win=0x8209dd0, item=@0x83afc88, viewMode=1, staticObjectArgs=0x0) at /home/bram/KDE/koffice/kexi/core/kexipart.cpp:287 #14 0xb7b2f0e7 in KexiProject::openObject (this=0x81ee2b8, wnd=0x8209dd0, item=@0x83afc88, viewMode=1, staticObjectArgs=0x0) at /home/bram/KDE/koffice/kexi/core/kexiproject.cpp:690 #15 0xb7f56491 in KexiMainWindowImpl::openObject (this=0x8209dd0, item=0x83afc88, viewMode=1, openingCancelled=@0xbf8f8ff3, staticObjectArgs=0x0) at /home/bram/KDE/koffice/kexi/main/keximainwindowimpl.cpp:3330 #16 0xb7f568aa in KexiMainWindowImpl::openObjectFromNavigator (this=0x8209dd0, item=0x83afc88, viewMode=1, openingCancelled=@0xbf8f8ff3) at /home/bram/KDE/koffice/kexi/main/keximainwindowimpl.cpp:3410 #17 0xb7f56694 in KexiMainWindowImpl::openObjectFromNavigator (this=0x8209dd0, item=0x83afc88, viewMode=1) at /home/bram/KDE/koffice/kexi/main/keximainwindowimpl.cpp:3373 #18 0xb7f5bf88 in KexiMainWindowImpl::qt_invoke (this=0x8209dd0, _id=196, _o=0xbf8f90e0) at keximainwindowimpl.moc:595 #19 0xb66f9744 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #20 0xb7f6f63a in KexiBrowser::openOrActivateItem (this=0x83a2f78, t0=0x83afc88, t1=1) at kexibrowser.moc:244 #21 0xb7f6d387 in KexiBrowser::slotExecuteItem (this=0x83a2f78, vitem=0x8453648) at /home/bram/KDE/koffice/kexi/main/kexibrowser.cpp:334 #22 0xb7f701ad in KexiBrowser::qt_invoke (this=0x83a2f78, _id=55, _o=0xbf8f9200) at kexibrowser.moc:354 #23 0xb66f9744 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #24 0xb6a694c0 in QListView::doubleClicked () from /usr/qt/3/lib/libqt-mt.so.3 #25 0xb70b226e in KListView::contentsMouseDoubleClickEvent (this=0x83a3b08, e=0xbf8f92c0) at /home/bram/KDE/kdelibs/kdeui/klistview.cpp:877 #26 0xb6816795 in QScrollView::viewportMouseDoubleClickEvent () from /usr/qt/3/lib/libqt-mt.so.3 #27 0xb6818cf4 in QScrollView::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3 #28 0xb67e5f88 in QListView::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3 #29 0xb66f6b4f in QObject::activate_filters () from /usr/qt/3/lib/libqt-mt.so.3 #30 0xb66f6c24 in QObject::event () from /usr/qt/3/lib/libqt-mt.so.3 #31 0xb673327f in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3 #32 0xb66956bf in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #33 0xb6695a82 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #34 0xb6d69440 in KApplication::notify (this=0xbf8f9eb0, receiver=0x83a41d0, event=0xbf8f98f0) at /home/bram/KDE/kdelibs/kdecore/kapplication.cpp:550 #35 0xb662e9a3 in QETWidget::translateMouseEvent () from /usr/qt/3/lib/libqt-mt.so.3 #36 0xb662d2a8 in QApplication::x11ProcessEvent () from /usr/qt/3/lib/libqt-mt.so.3 #37 0xb6640ec5 in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3 #38 0xb66ac231 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3 #39 0xb66ac186 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3 #40 0xb669482f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3 #41 0xb7fe4e10 in kdemain (argc=1, argv=0xbf8fa004) at /home/bram/KDE/koffice/kexi/main.cpp:89 #42 0x080488e2 in main (argc=1, argv=0xbf8fa004) at kdeinit_kexi.cpp:2
SVN commit 527973 by staniek: KexiDB - QuerySchema(TableSchema* tableSchema) ctor: To avoid problems (e.g. with fields added outside of Kexi using ALTER TABLE) we do not use "all-tables query asterisk" (see QueryAsterisk) item but instead we add all the fields explicity. - PostgreSQL driver: fixed crash when a new field has been added to existing table outside of Kexi CCMAIL:125220-done@bugs.kde.org M +19 -0 doc/dev/CHANGELOG-Kexi-js M +2 -1 kexidb/drivers/pqxx/pqxxcursor.cpp M +8 -2 kexidb/queryschema.cpp M +6 -2 kexidb/queryschema.h --- branches/koffice/1.6/koffice/kexi/doc/dev/CHANGELOG-Kexi-js #527972:527973 @@ -12,6 +12,25 @@ TODO: - inform Raphael about koffice.org/1.5/ url, give him the php code +2006-04-10 +KexiDB +- QuerySchema(TableSchema* tableSchema) ctor: + To avoid problems (e.g. with fields added outside of Kexi using ALTER TABLE) + we do not use "all-tables query asterisk" (see QueryAsterisk) item + but instead we add all the fields explicity. +- PostgreSQL driver: fixed crash when a new field has been added to existing + table outside of Kexi + +2006-04-08 +KexiDB +- use SQL-compliant TRUE and FALSE constants for PostgreSQL + (1 and 0 are unsupported) +0.9/1.0/2.0: ported + +2006-04-07 +Table View & Form View +- "invalid data warning" tool tip improved and reused for kexi forms + 2006-04-05 Form Designer - KexiDBDoubleSpinBox and KexiDBIntSpinBox replaced line edit with validator because --- branches/koffice/1.6/koffice/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp #527972:527973 @@ -271,7 +271,8 @@ return QVariant(); } - KexiDB::Field *f = (m_fieldsExpanded && pos<m_fieldCount) ? m_fieldsExpanded->at(pos)->field : 0; + KexiDB::Field *f = (m_fieldsExpanded && pos<QMIN(m_fieldsExpanded->count(), m_fieldCount)) + ? m_fieldsExpanded->at(pos)->field : 0; // KexiDBDrvDbg << "pqxxSqlCursor::value(" << pos << ")" << endl; --- branches/koffice/1.6/koffice/kexi/kexidb/queryschema.cpp #527972:527973 @@ -293,8 +293,14 @@ m_name = d->masterTable->name(); //inherit caption from a table m_caption = d->masterTable->caption(); - //add all fields of the table as asterisk: - addField( new QueryAsterisk(this) ); + +//replaced by explicit field list: //add all fields of the table as asterisk: +//replaced by explicit field list: addField( new QueryAsterisk(this) ); + + // add explicit field list to avoid problems (e.g. with fields added outside of Kexi): + for (Field::ListIterator it( d->masterTable->fieldsIterator() ); it.current(); ++it) { + addField( it.current() ); + } } QuerySchema::~QuerySchema() --- branches/koffice/1.6/koffice/kexi/kexidb/queryschema.h #527972:527973 @@ -82,8 +82,12 @@ /*! Creates query schema object that is equivalent to "SELECT * FROM table" sql command. Schema of \a table is used to contruct this query -- - it is defined just by defining "all-tables query asterisk" (see QueryAsterisk) - item. Properties such as the name and caption of the query are inherited + it is defined just adding all the fields to the query in natural order. + To avoid problems (e.g. with fields added outside of Kexi using ALTER TABLE) + we do not use "all-tables query asterisk" (see QueryAsterisk) item to achieve + this effect. + + Properties such as the name and caption of the query are inherited from table schema. We consider that query schema based on \a table is not (a least yet) stored
You need to log in before you can comment on or make changes to this bug.