Skip to content

Update SQLite3 to version 3.35 #926

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

Closed
wants to merge 1 commit into from
Closed

Conversation

dihedron
Copy link

Hallo,
new SQLite version 3.35 is out with a bunch of interesting things such as maths functions.
I ran the upgrade tool and checked the sqlite3-binding.* files against manually upgraded sources.
Successfully ran all tests.
Hope this helps.

@codecov-io
Copy link

codecov-io commented Mar 14, 2021

Codecov Report

Merging #926 (df9b5f5) into master (ab91e93) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #926   +/-   ##
=======================================
  Coverage   46.80%   46.80%           
=======================================
  Files          11       11           
  Lines        1457     1457           
=======================================
  Hits          682      682           
  Misses        640      640           
  Partials      135      135           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab91e93...df9b5f5. Read the comment docs.

@msaron
Copy link

msaron commented Mar 19, 2021

How to run the upgrade tool from my project? I tried many ways but could not figure it out. Any help would be appreciated.

@msaron
Copy link

msaron commented Mar 20, 2021

NVM. Figured it out. :)

@neilalexander
Copy link

@mattn Is there anything blocking an upgrade to 3.35.x? We could probably even move up to 3.35.4.

@mattn
Copy link
Owner

mattn commented Apr 14, 2021

Sorry all, I have made it a rule to upgrade the amalgamation code myself. I'll do this soon.

@neilalexander
Copy link

Thanks for the fast response — itching to be able to use RETURNING! :-)

@devfd
Copy link

devfd commented May 11, 2021

Hi there,

When I go get this package, version github.com/mattn/go-sqlite3 v1.14.7 is installed, but I get a syntax error when trying the new returning syntax.
Also when executing select sqlite_version() it prints 3.31.0 rather than the expected 3.35.4 version.

I tried to use the master branch instead but still getting a DB stuck at 3.31. I'm building on OSX, am I missing something ?

Thanks

@neilalexander
Copy link

@devfd From the root of your repository, try:

go get github.com/mattn/go-sqlite3@1157a42

That should pin your go.mod file to the merge commit of this PR.

@devfd
Copy link

devfd commented May 12, 2021

thanks @neilalexander still getting 3.31.0 version though

When installing on a linux container I get a 3.27.2 version 🤔

steps to reproduce:

docker run -ti golang bash
apt-get update && apt-get install vim sqlite3
mkdir /hello && cd /hello
go mod init hello
go get github.com/mattn/go-sqlite3
vim main.go
package main

import (
	"database/sql"

	_ "github.com/mattn/go-sqlite3"
)

func main() {
	db, err := sql.Open("sqlite3", "file:hello.sqlite3?mode=rwc")
	if err != nil {
		panic(err)
	}

	db.Exec("CREATE TABLE IF NOT EXISTS hello(name text primary key)")
}
go run main.go
sqlite3 hello.sqlite3 "select sqlite_version()"
3.27.2

@itizir
Copy link
Contributor

itizir commented May 12, 2021

When you're running

$ sqlite3 hello.sqlite3 "select sqlite_version()"

you're executing the sqlite3 binary installed on your system (presumably 3.27.2 indeed: https://packages.debian.org/search?searchon=names&keywords=sqlite3), not whatever sqlite3 code packaged within go-sqlite3...

@devfd
Copy link

devfd commented May 12, 2021

yes of course, how did I not see that. many thanks @itizir 🙏

@itizir
Copy link
Contributor

itizir commented May 12, 2021

yes of course, how did I not see that. many thanks @itizir 🙏

Hahah, you're welcome! These things just happen... 😃

@rittneje
Copy link
Collaborator

To add to what @itizir said, if you want to verify what version of SQLite is actually being used by your application, you can leverage the Version function. https://pkg.go.dev/github.com/mattn/go-sqlite3#Version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants