Skip to content

mysql bug on macosx #22086

Description

@lorenko

V doctor:

V full version: V 0.4.7 7baff15
OS: macos, macOS, 14.5, 23F79
Processor: 10 cpus, 64bit, little endian, Apple M1 Pro

getwd: /Users/lorenko/v/examples/database
vexe: /opt/homebrew/Cellar/vlang/0.4.7/libexec/v
vexe mtime: 2024-07-26 04:41:00

vroot: OK, value: /opt/homebrew/Cellar/vlang/0.4.7/libexec
VMODULES: OK, value: /Users/lorenko/.vmodules
VTMP: OK, value: /tmp/v_501

Git version: git version 2.39.2
Git vroot status: 4.3.17 (59578 commit(s) behind V master)
.git/config present: false

CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc: N/A

What did you do?
./v -g -o vdbg cmd/v && ./vdbg mysql.v

import db.mysql

fn main() {
	mut conn := mysql.connect(
		host:     'localhost'
		port:     3306
		username: 'root'
		password: ''
		dbname:   'mysql'
	)!
	res := conn.query('show tables')!
	for row in res.rows() {
		println(row.vals.join(', '))
	}
	conn.close()
}

What did you expect to see?

connection

What did you see instead?

================== C compilation error (from cc): ==============
cc:                       ^
cc: /tmp/v_501/mysql.01J5RP27RW6P5HHEWPQCPD9YSY.tmp.c:19263:43: error: use of undeclared identifier 'REFRESH_HOSTS'
cc:         _const_db__mysql__refresh_hosts = ((u32)(REFRESH_HOSTS));
cc:                                                  ^
cc: /tmp/v_501/mysql.01J5RP27RW6P5HHEWPQCPD9YSY.tmp.c:19265:45: error: use of undeclared identifier 'REFRESH_THREADS'
cc:         _const_db__mysql__refresh_threads = ((u32)(REFRESH_THREADS));
cc:                                                    ^
cc: /tmp/v_501/mysql.01J5RP27RW6P5HHEWPQCPD9YSY.tmp.c:19266:43: error: use of undeclared identifier 'REFRESH_SLAVE'
cc:         _const_db__mysql__refresh_slave = ((u32)(REFRESH_SLAVE));
cc:                                                  ^
cc: /tmp/v_501/mysql.01J5RP27RW6P5HHEWPQCPD9YSY.tmp.c:19267:44: error: use of undeclared identifier 'REFRESH_MASTER'
cc:         _const_db__mysql__refresh_master = ((u32)(REFRESH_MASTER));
... (the original output was 235 lines long, and was truncated to 12 lines)
================================================================
(You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).
builder error: 
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildV build error on any OS/CPU architecture.Modules: dbBugs/feature requests, that are related to the `db.*` modules.Unit: vlibBugs/feature requests, that are related to the vlib.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions