File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 77
88echo " Compiling snippets_udf.cc for MySQL/MariaDB..."
99
10- # Find MySQL/MariaDB headers
10+ # Find MySQL/MariaDB server headers (needed for sql_class.h)
1111MYSQL_INCLUDE=" "
12- for path in " /usr/include/mysql" " /usr/local/ include/mysql " " /opt/homebrew/ include/mysql" " /usr/local/mysql/ include" " /usr/include/mariadb" " /usr/local/include/mariadb " " /opt/homebrew/include/mariadb " ; do
12+ for path in " /usr/include/mysql/server " " /usr/include/mariadb/server " " /usr/ include/mysql/server/private " " /usr/include/mariadb/server/private " " /usr/ include/mysql " " /usr/include/mariadb" " /usr/local/include/mysql " " /opt/homebrew/include/mysql " ; do
1313 if [ -d " $path " ]; then
14- MYSQL_INCLUDE=" $path "
15- break
14+ # Check if sql_class.h exists in this path
15+ if [ -f " $path /sql_class.h" ] || [ -f " $path /private/sql_class.h" ]; then
16+ MYSQL_INCLUDE=" $path "
17+ break
18+ fi
1619 fi
1720done
1821
1922if [ -z " $MYSQL_INCLUDE " ]; then
20- echo " ❌ MySQL/MariaDB headers not found!"
21- echo " Install development package:"
22- echo " macOS: brew install mysql (or mariadb)"
23- echo " Ubuntu: sudo apt-get install libmysqlclient-dev (or libmariadb-dev)"
24- echo " CentOS: sudo yum install mysql-devel (or mariadb-devel)"
23+ echo " ❌ MySQL/MariaDB server headers not found!"
24+ echo " Install server development package:"
25+ echo " Ubuntu/Debian: sudo apt-get install mariadb-server-dev-10.6 (or similar version)"
26+ echo " CentOS/RHEL: sudo yum install mariadb-devel"
27+ echo " Fedora: sudo dnf install mariadb11.8-devel"
28+ echo " "
29+ echo " Note: You need server headers (not just client headers) for sql_class.h"
2530 exit 1
2631fi
2732
You can’t perform that action at this time.
0 commit comments