Hi $ cat test.sql CREATE TABLE table1 (uid int NOT NULL PRIMARY KEY default '0'); ALTER TABLE table1 ADD uid int NOT NULL PRIMARY KEY DEFAULT '0'; ALTER TABLE table1 ADD username varchar(32) DEFAULT NULL; ALTER TABLE table1 ADD username2 varchar(32) DEFAULT NULL; UPDATE table1 SET username2 = lower(username); ALTER TABLE table1 ADD userid int DEFAULT NULL; ALTER TABLE table1 ADD passhash1 varchar(128) DEFAULT NULL; ALTER TABLE table1 ADD email varchar(128) DEFAULT NULL; ALTER TABLE table1 ADD admin varchar(16) DEFAULT 'false'; ALTER TABLE table1 ADD normallogin varchar(16) DEFAULT 'true'; ALTER TABLE table1 ADD changepass varchar(16) DEFAULT 'true'; ALTER TABLE table1 ADD changeprofile varchar(16) DEFAULT 'true'; ALTER TABLE table1 ADD botlogin varchar(16) DEFAULT 'true'; ALTER TABLE table1 ADD operator varchar(16) DEFAULT 'false'; $ cat test.sql | valgrind --num-callers=10 sqlite3 test.db 2> sqlite-valgrind.log ALTER TABLE table1 ADD uid int NOT NULL PRIMARY KEY DEFAULT '0'; SQL error: duplicate column name: uid Segmentation fault Reproduced with 3.2.1-r3 and 3.2.2 (haven't tried anything else). Obviously, it does happen without valgrind too... # emerge info Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5-r1, 2.6.12-gentoo-r4 i686) ================================================================= System uname: 2.6.12-gentoo-r4 i686 Celeron (Coppermine) Gentoo Base System version 1.6.13 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.2.3-r5, 2.3.5 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O3 -pipe -m32" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium3 -O3 -pipe -m32" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.roedu.net/pub/mirrors/gentoo.org" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 apm avi bitmap-fonts boundschecking cdr crypt cups curl divx4linux eds emboss encode foomaticdb gd gdbm gstreamer gtk2 imlib jpeg libg++ libwww mad maildir mbox mikmod mmx mmx2 motif mp3 mpeg mysql ncurses ogg oggvorbis pam pdflib perl png quicktime readline slang spell sqlite sse ssl tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Could you try 3.2.6 thanks? If it does it might be a good idea to contact upstream also.
Hi there Thanks for looking into this. The reason I didnt tested with latest sqlite or reported upstream was because I didnt had time (I am in exam session right now) and there was no sqlite 3.2.6 in portage (thus posting here I assumed I will speed up including it in portage ;)). However, I found out that it was my problem this time, I was using a 3.2.0 sqlite version (found in /usr/local/bin) instead of the /usr/bin/sqlite3 (bash3 thought the /usr/local/bin one had priority in PATH). I even opened an sqlite3 bug entry upstream... So, with 3.2.6 at least the problem doesnt show up. Sorry for the trouble...
Ok cool. It can take a little while for cvs to sync with all the mirrors, which might be why you didn't see 3.2.6. Glad to have helped.