更新日期:2024年09月11日
摘要:
执行由“query”指向的SQL 查询,它应是字符串长度字节“long”
。正常
情况下,字符串必须包含1 条SQL 语句,而且不应为语句添加终结分号(
‘;’
)
或“\g”
。如果允许多语句执行,字符串可包含由分号隔开的多条语句。
语法:
int
gbase_real_query(GBASE *gbase, const char *q,
unsigned
long length);
参数:
返回值:
如果查询成功,返回0。如果出现错误,返回非0 值。
GBase 8a 程序员手册C API 篇
南大通用数据技术股份有限公司
- 39 -
错误
CR_COMMANDS_OUT_OF_SYNC
以不恰当的顺序执行了命令。
CR_SERVER_GONE_ERROR
GBase 服务器不可用。
CR_SERVER_LOST
在查询过程中,与服务器的连接丢失。
CR_UNKNOWN_ERROR
出现未知错误。
示例
使用gs_install 脚本进行GBase 8c 安装。
gs_install -X /opt/software/gbase/clusterconfig.xml
Parsing the configuration file.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
begin deploy..
Installing the cluster.
begin prepare Install Cluster..
Checking the installation environment on all nodes.
begin install Cluster..
Installing applications on all nodes.
Successfully installed APP.
begin init Instance..
encrypt cipher and rand files for database.
Please enter password for database:
Please repeat for database:
begin to create CA cert files
The sslcert will be generated in /opt/gbase/cluster/app/share/sslcert/om
Cluster installation is completed.
Configuring.
Deleting instances from all nodes.
GBase 8c 工具参考手册
南大通用数据技术股份有限公司
227
Successfully deleted instances from all nodes.
Checking node configuration on all nodes.
Initializing instances on all nodes.
Updating instance configuration on all nodes.
Check consistence of memCheck and coresCheck on DN nodes.
Successful check consistence of memCheck and coresCheck on all nodes.
Configuring pg_hba on all nodes.
Configuration is completed.
Successfully started cluster.
Successfully installed application.