Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crashes when trying to convert timestamp to str with incorrect format #3816

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working major SQL

Comments

@monetdb-team
Copy link

Date: 2015-10-01 15:25:20 +0200
From: Sherzod Mutalov <>
To: SQL devs <>
Version: 11.21.5 (Jul2015)

Last updated: 2015-11-03 10:18:00 +0100

Comment 21317

Date: 2015-10-01 15:25:20 +0200
From: Sherzod Mutalov <>

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:

Server crashes when trying to convert timestamp to str with incorrect format.
This problem occurs, because strftime function implementation in msvc library have different behaviour, other than in GNU libraries.

Reproducible: Always

Steps to Reproduce:

  1. Execute following query: SELECT timestamp_to_str(current_timestamp, '%Q');

Actual Results:

Server crashes

Expected Results:

SQL exception

In mtime.c file, inside MTIMEtimestamp_to_str function
at the line 3610:

if ((sz = strftime(buf, BUFSIZ, *format, &t)) == 0)

Also, need new feature to extract QUARTER part from dates (like pgsql date_part('quarter', ...) function)

Comment 21337

Date: 2015-10-14 19:02:06 +0200
From: MonetDB Mercurial Repository <>

Changeset e21bad0f10c1 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e21bad0f10c1

Changeset description:

added tests for bug #3815 and bug #3816

Comment 21365

Date: 2015-10-21 15:01:26 +0200
From: @sjoerdmullender

Fixed in changeset e3f3f7c48a48

Comment 21366

Date: 2015-10-21 15:03:15 +0200
From: @sjoerdmullender

(In reply to Sherzod Mutalov from comment 0)

Also, need new feature to extract QUARTER part from dates (like pgsql
date_part('quarter', ...) function)

This is a feature request. Please create a separate bug report (and mark it as "enhancement").

Comment 21432

Date: 2015-11-03 10:18:00 +0100
From: @sjoerdmullender

Jul2015 SP1 has been released.

@monetdb-team monetdb-team added bug Something isn't working major SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major SQL
Projects
None yet
Development

No branches or pull requests

2 participants