summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorIgnacio Galarza <iggy@mysql.com>2009-07-31 15:22:02 -0400
committerIgnacio Galarza <iggy@mysql.com>2009-07-31 15:22:02 -0400
commit286e9e40f2725b6f539db6f9b539147843dcee86 (patch)
tree1ec946eb73a7116ce88cd568b44517de785490e0 /sql
parent8e410185edbce0a7b7370cb9c70dee46254ddf55 (diff)
downloadmariadb-git-286e9e40f2725b6f539db6f9b539147843dcee86.tar.gz
Bug#17270 - mysql client tool could not find ../share/charsets folder and fails.
- Define and pass compile time path variables as pre-processor definitions to mimic the makefile build. - Set new CMake version and policy requirements explicitly. - Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in Platform SDK header ObjIdl.h which also defines DATADIR.
Diffstat (limited to 'sql')
-rw-r--r--sql/Makefile.am2
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/unireg.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 2a0d59d0ab9..e4f339384c9 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -114,7 +114,7 @@ mysql_tzinfo_to_sql_LDADD = @MYSQLD_EXTRA_LDFLAGS@ $(LDADD) $(CXXLDFLAGS)
DEFS = -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
- -DDATADIR="\"$(MYSQLDATAdir)\"" \
+ -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
@DEFS@
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ec08edbc265..37b3754d716 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6865,7 +6865,7 @@ static void mysql_init_variables(void)
/* Set directory paths */
strmake(language, LANGUAGE, sizeof(language)-1);
- strmake(mysql_real_data_home, get_relative_path(DATADIR),
+ strmake(mysql_real_data_home, get_relative_path(MYSQL_DATADIR),
sizeof(mysql_real_data_home)-1);
mysql_data_home_buff[0]=FN_CURLIB; // all paths are relative from here
mysql_data_home_buff[1]=0;
diff --git a/sql/unireg.h b/sql/unireg.h
index 8e01e6222e6..781b9b980e2 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -29,8 +29,8 @@
#define TEMP_PREFIX "MY"
#define LOG_PREFIX "ML"
#define PROGDIR "bin/"
-#ifndef DATADIR
-#define DATADIR "data/"
+#ifndef MYSQL_DATADIR
+#define MYSQL_DATADIR "data/"
#endif
#ifndef SHAREDIR
#define SHAREDIR "share/"