This project is a fork of the
csql.git project. If you have that one
already cloned locally, you can use
git clone --reference /path/to/your/csql.git/incarnation mirror_URL
to save bandwidth during cloning.
CSQL with Przemoc's changes
CSQL with fixes for Debian/Ubuntu (including 64-bit versions) and GCC 4.3. Tested on Debian 5.0, Ubuntu 8.04 and Ubuntu 8.10.
Tests (available in
test directory) are not working yet.
Requirements
Following software is needed to build CSQL:
- GCC
- Autoconf
- Automake
- Libtool
- Make
- Bison
- Flex
- unixODBC
- JDK 6
In Debian/Ubuntu you can install them with one command:
apt-get install g++ autoconf automake libtool make bison flex unixodbc-dev sun-java6-jdk
How to download?
$ git clone git://repo.or.cz/csql/przemoc.git csql
In following sections I assume that your working directory is the root of local git tree.
How to build?
$ make -f Makefile.cvs
$ export JDK_HOME=/usr/lib/jvm/java-6-sun # this is optional - 1st part
$ export PATH=$JDK_HOME/bin:$PATH # this is optional - 2nd part
$ ./build.ksh
How to run server?
$ . ./setupenv.ksh
$ csqlserver
How to run examples?
First run server in one terminal and execute following commands in another.
$ . ./setupenv.ksh
JDBC API
It will work only if you have built CSQL with JDBC lib (setting
JDK_HOME preceded running
./build.ksh).
$ ( export PATH=$JDK_HOME/bin:$PATH && \
cd examples/jdbc && make && \
java jdbcexample )
ODBC API
$ ( cd examples/odbc && make && \
for I in `seq 6`; do ./ODBCman$I; done )
SQL API
$ ( cd examples/sqlapi && make && \
./insert && ./update && ./delete && ./sqlapiexample )
SQL scripts
$ ( cd examples/isql && \
csql -u root -p manager -s create.sql && \
csql -u root -p manager -s insert.sql && \
csql -u root -p manager -s select.sql && \
csql -u root -p manager -s delete.sql && \
csql -u root -p manager -s drop.sql )
License
GNU General Public License, version 2