Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263233 - dev-db/mysql-5.0.70-r1 date error not caught
Summary: dev-db/mysql-5.0.70-r1 date error not caught
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-21 11:22 UTC by Damien
Modified: 2009-07-06 18:29 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damien 2009-03-21 11:22:01 UTC
mysql error parsing date format.  Dates in the form 2009-00-13 accepted when should generate error on month 0.  When these records are read in the terminal, it prints the date as inserted but when using connectorJ get unexpected value for this invalid date.  The returned date is some time in the previous year.

Reproducible: Always

Steps to Reproduce:
create database dt;
use dt;
create table tt ( tf DATE NOT NULL );
mysql> insert into tt ( tf ) values ( '2009-00-13' );
Query OK, 1 row affected (0.00 sec)
mysql> select * from tt;
+------------+
| tf         |
+------------+
| 2009-00-13 |
+------------+
1 row in set (0.00 sec)


Actual Results:  
stores erroneous date.  ConnectorJ returns a different value from the one stored in the database (because cant interpret month value 0).  This may also be a separate bug.

Expected Results:  
Mysql should have thrown an error on insert.  Jconnector should have thrown a date parse exception when returning the record to highlight the fact that the date parsed was different from the one in the field, and it was not a valid date.

emerge --info
Portage 2.1.6.7 (hardened/linux/x86/2008.0, gcc-3.4.6, glibc-2.6.1-r0, 2.6.25-hardened-r10 i686)
=================================================================
System uname: Linux-2.6.25-hardened-r10-i686-mobile_AMD_Athlon-tm-_XP2200+-with-glibc2.3.2
Timestamp of tree: Tue, 17 Mar 2009 01:45:01 +0000
distcc 3.0 i686-pc-linux-gnu [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r14, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.4.8
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fforce-addr"
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/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.qubenet.net/mirror/gentoo/ http://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://bing/gentoo-portage"
USE="X a52 aac acl alsa bash-completion berkdb bzip2 cdr cli cracklib crypt cups dhcp directfb dri dvd fortran gdbm gif gpm hardened iconv isdnlog java jpeg kde midi mmx mp3 mpeg mudflap mysql ncurses nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl pic png pppd python qt4 readline reflection samba sdl session spell spl sse ssl sysfs tcpd truetype urandom vorbis wifi win32codecs x86 xine xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1       emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m     maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="joystick synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" USERLAND="GNU" VIDEO_CARDS="radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-06 18:29:52 UTC
I'd say that you should take it upstream. I don't know if they'll accept a fix in the 5.0 series at this time.

Visit: http://bugs.mysql.com/

Please leave a link here to the upstream bug after you file it.