options.c 15.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14

/* Module:          options.c
 *
 * Description:     This module contains routines for getting/setting
 *                  connection and statement options.
 *
 * Classes:         n/a
 *
 * API functions:   SQLSetConnectOption, SQLSetStmtOption, SQLGetConnectOption,
 *                  SQLGetStmtOption
 *
 * Comments:        See "notice.txt" for copyright and license information.
 *
 */
15

B
Byron Nikolaidis 已提交
16
#ifdef HAVE_CONFIG_H
17
#include "config.h"
B
Byron Nikolaidis 已提交
18 19
#endif

20
#include "psqlodbc.h"
B
Byron Nikolaidis 已提交
21

22
#ifndef WIN32
B
Byron Nikolaidis 已提交
23 24 25 26
#include "iodbc.h"
#include "isql.h"
#include "isqlext.h"
#else
27 28
#include <windows.h>
#include <sql.h>
29
#include <sqlext.h>
B
Byron Nikolaidis 已提交
30 31
#endif

32 33 34
#include "environ.h"
#include "connection.h"
#include "statement.h"
35
#include "qresult.h"
36

37 38 39

extern GLOBAL_VALUES globals;

40 41 42 43 44 45
RETCODE set_statement_option(ConnectionClass *conn, 
							 StatementClass *stmt, 
							 UWORD   fOption,
							 UDWORD  vParam);


46

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
RETCODE set_statement_option(ConnectionClass *conn, 
							 StatementClass *stmt, 
							 UWORD   fOption,
							 UDWORD  vParam)
{
static char *func="set_statement_option";
char changed = FALSE;


	switch(fOption) {
	case SQL_ASYNC_ENABLE:/* ignored */
		break;

	case SQL_BIND_TYPE:		
		/* now support multi-column and multi-row binding */
		if (conn) conn->stmtOptions.bind_size = vParam;
		if (stmt) stmt->options.bind_size = vParam;
		break;

	case SQL_CONCURRENCY:
		/*	positioned update isn't supported so cursor concurrency is read-only */

		if (conn) conn->stmtOptions.scroll_concurrency = vParam;
		if (stmt) stmt->options.scroll_concurrency = vParam;
		break;

		/*
		if (globals.lie) {
			if (conn) conn->stmtOptions.scroll_concurrency = vParam;
			if (stmt) stmt->options.scroll_concurrency = vParam;
		}
		else {

			if (conn) conn->stmtOptions.scroll_concurrency = SQL_CONCUR_READ_ONLY;
			if (stmt) stmt->options.scroll_concurrency = SQL_CONCUR_READ_ONLY;

			if (vParam != SQL_CONCUR_READ_ONLY)
				changed = TRUE;
		}
		break;
		*/
		
	case SQL_CURSOR_TYPE:
		/*	if declare/fetch, then type can only be forward.
			otherwise, it can only be forward or static.
		*/
		mylog("SetStmtOption(): SQL_CURSOR_TYPE = %d\n", vParam);

		if (globals.lie) {

			if (conn) conn->stmtOptions.cursor_type = vParam;
			if (stmt) stmt->options.cursor_type = vParam;

		}
		else {
			if (globals.use_declarefetch) {

				if (conn) conn->stmtOptions.cursor_type = SQL_CURSOR_FORWARD_ONLY;
				if (stmt) stmt->options.cursor_type = SQL_CURSOR_FORWARD_ONLY;

				if (vParam != SQL_CURSOR_FORWARD_ONLY) 
					changed = TRUE;
			}
			else {
				if (vParam == SQL_CURSOR_FORWARD_ONLY || vParam == SQL_CURSOR_STATIC) {

B
Bruce Momjian 已提交
113 114
					if (conn) conn->stmtOptions.cursor_type = vParam;		/* valid type */
					if (stmt) stmt->options.cursor_type = vParam;		/* valid type */
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
				}
				else {

					if (conn) conn->stmtOptions.cursor_type = SQL_CURSOR_STATIC;
					if (stmt) stmt->options.cursor_type = SQL_CURSOR_STATIC;

					changed = TRUE;
				}
			}
		}
		break;

	case SQL_KEYSET_SIZE: /* ignored, but saved and returned  */
		mylog("SetStmtOption(): SQL_KEYSET_SIZE, vParam = %d\n", vParam);

		if (conn) conn->stmtOptions.keyset_size = vParam;
		if (stmt) stmt->options.keyset_size = vParam;

		break;

		/*
		if (globals.lie)
			stmt->keyset_size = vParam;
		else {
			stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
			stmt->errormsg = "Driver does not support keyset size option";
			SC_log_error(func, "", stmt);
			return SQL_ERROR;
		}
		*/

	case SQL_MAX_LENGTH:/* ignored, but saved */
		mylog("SetStmtOption(): SQL_MAX_LENGTH, vParam = %d\n", vParam);
		if (conn) conn->stmtOptions.maxLength = vParam;
		if (stmt) stmt->options.maxLength = vParam;
		break;

	case SQL_MAX_ROWS: /* ignored, but saved */
		mylog("SetStmtOption(): SQL_MAX_ROWS, vParam = %d\n", vParam);
		if (conn) conn->stmtOptions.maxRows = vParam;
		if (stmt) stmt->options.maxRows = vParam;
		break;

	case SQL_NOSCAN: /* ignored */
		mylog("SetStmtOption: SQL_NOSCAN, vParam = %d\n", vParam);
		break;

	case SQL_QUERY_TIMEOUT: /* ignored */
		mylog("SetStmtOption: SQL_QUERY_TIMEOUT, vParam = %d\n", vParam);
B
Bruce Momjian 已提交
164
		/*	"0" returned in SQLGetStmtOption */
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
		break;

	case SQL_RETRIEVE_DATA: /* ignored, but saved */
		mylog("SetStmtOption(): SQL_RETRIEVE_DATA, vParam = %d\n", vParam);
		if (conn) conn->stmtOptions.retrieve_data = vParam;
		if (stmt) stmt->options.retrieve_data = vParam;
		break;

	case SQL_ROWSET_SIZE:
		mylog("SetStmtOption(): SQL_ROWSET_SIZE, vParam = %d\n", vParam);


		/*	Save old rowset size for SQLExtendedFetch purposes 
			If the rowset_size is being changed since the last call
			to fetch rows.
		*/

		if (stmt && stmt->save_rowset_size <= 0 && stmt->last_fetch_count > 0 )
			stmt->save_rowset_size = stmt->options.rowset_size;

		if (vParam < 1) {
			vParam = 1;
			changed = TRUE;
		}

		if (conn) conn->stmtOptions.rowset_size = vParam;
		if (stmt) stmt->options.rowset_size = vParam;

		break;

	case SQL_SIMULATE_CURSOR: /* NOT SUPPORTED */
		if (stmt) {
			stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
			stmt->errormsg = "Simulated positioned update/delete not supported.  Use the cursor library.";
			SC_log_error(func, "", stmt);
		}
		if (conn) {
			conn->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
			conn->errormsg = "Simulated positioned update/delete not supported.  Use the cursor library.";
			CC_log_error(func, "", conn);
		}
		return SQL_ERROR;

208 209 210 211 212
	case SQL_USE_BOOKMARKS:

		if (stmt) stmt->options.use_bookmarks = vParam;
		if (conn) conn->stmtOptions.use_bookmarks = vParam;
		break;
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251

    default:
		{
		char option[64];

		if (stmt) {
			stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
			stmt->errormsg = "Unknown statement option (Set)";
			sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
			SC_log_error(func, option, stmt);
		}
		if (conn) {
			conn->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
			conn->errormsg = "Unknown statement option (Set)";
			sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
			CC_log_error(func, option, conn);
		}

        return SQL_ERROR;
		}
    }

	if (changed) {
		if (stmt) {
			stmt->errormsg = "Requested value changed.";
			stmt->errornumber = STMT_OPTION_VALUE_CHANGED;
		}
		if (conn) {
			conn->errormsg = "Requested value changed.";
			conn->errornumber = STMT_OPTION_VALUE_CHANGED;
		}
		return SQL_SUCCESS_WITH_INFO;
	}
	else
		return SQL_SUCCESS;
}



252 253 254 255 256 257
/* Implements only SQL_AUTOCOMMIT */
RETCODE SQL_API SQLSetConnectOption(
        HDBC    hdbc,
        UWORD   fOption,
        UDWORD  vParam)
{
258
static char *func="SQLSetConnectOption";
259
ConnectionClass *conn = (ConnectionClass *) hdbc;
260 261 262
char changed = FALSE;
RETCODE retval;
int i;
263

264 265
	mylog("%s: entering...\n", func);

B
Byron Nikolaidis 已提交
266 267
	if ( ! conn)  {
		CC_log_error(func, "", NULL);
268
		return SQL_INVALID_HANDLE;
B
Byron Nikolaidis 已提交
269 270
	}

271 272

	switch (fOption) {
273
	/* Statement Options 
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
	   (apply to all stmts on the connection and become defaults for new stmts)
	*/
	case SQL_ASYNC_ENABLE:
	case SQL_BIND_TYPE:		
	case SQL_CONCURRENCY:
	case SQL_CURSOR_TYPE:
	case SQL_KEYSET_SIZE: 
	case SQL_MAX_LENGTH:
	case SQL_MAX_ROWS:
	case SQL_NOSCAN: 
	case SQL_QUERY_TIMEOUT:
	case SQL_RETRIEVE_DATA:
	case SQL_ROWSET_SIZE:
	case SQL_SIMULATE_CURSOR:
	case SQL_USE_BOOKMARKS:

		/*	Affect all current Statements */
		for (i = 0; i < conn->num_stmts; i++) {
			if ( conn->stmts[i]) {
				set_statement_option(NULL, conn->stmts[i], fOption, vParam);
			}
		}

		/*	Become the default for all future statements on this connection */
		retval = set_statement_option(conn, NULL, fOption, vParam);

		if (retval == SQL_SUCCESS_WITH_INFO)
			changed = TRUE;
		else if (retval == SQL_ERROR)
			return SQL_ERROR;

		break;

	/**********************************/
	/*****	Connection Options  *******/	
	/**********************************/

	case SQL_ACCESS_MODE: /* ignored */
		break;

314 315 316 317 318 319 320 321 322
	case SQL_AUTOCOMMIT:

		/*  Since we are almost always in a transaction, this is now ok.
			Even if we were, the logic will handle it by sending a commit
			after the statement.
		
		if (CC_is_in_trans(conn)) {
			conn->errormsg = "Cannot switch commit mode while a transaction is in progres";
			conn->errornumber = CONN_TRANSACT_IN_PROGRES;
B
Byron Nikolaidis 已提交
323
			CC_log_error(func, "", conn);
324 325 326 327 328 329 330 331 332
			return SQL_ERROR;
		}
		*/

		mylog("SQLSetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, vParam);

		switch(vParam) {
		case SQL_AUTOCOMMIT_OFF:
			CC_set_autocommit_off(conn);
333 334 335 336 337 338 339 340 341
		/* The following two lines are new.
		   With this modification the SELECT statements
		   are also included in the transactions.
		   Error handling should be written, 
		   this is missing yet, see
		   SC_execute in statement.c for details. Zoltan
		*/    
			CC_send_query(conn,"BEGIN",NULL);
			CC_set_in_trans(conn);
342 343 344 345 346 347 348 349 350
			break;

		case SQL_AUTOCOMMIT_ON:
			CC_set_autocommit_on(conn);
			break;

		default:
			conn->errormsg = "Illegal parameter value for SQL_AUTOCOMMIT";
			conn->errornumber = CONN_INVALID_ARGUMENT_NO;
B
Byron Nikolaidis 已提交
351
			CC_log_error(func, "", conn);
352 353 354 355 356
			return SQL_ERROR;
		}

		break;

357 358 359 360 361 362 363
	case SQL_CURRENT_QUALIFIER: /* ignored */
		break;

	case SQL_LOGIN_TIMEOUT: /* ignored */
		break;

	case SQL_PACKET_SIZE:	/* ignored */
364 365
		break;

366
	case SQL_QUIET_MODE:	/* ignored */
367 368
		break;

369 370 371 372 373 374 375 376 377 378
	case SQL_TXN_ISOLATION: /* ignored */
		break;
		
	/*	These options should be handled by driver manager */
	case SQL_ODBC_CURSORS:
	case SQL_OPT_TRACE:
	case SQL_OPT_TRACEFILE:
	case SQL_TRANSLATE_DLL:
	case SQL_TRANSLATE_OPTION:
		CC_log_error(func, "This connect option (Set) is only used by the Driver Manager", conn);
B
Byron Nikolaidis 已提交
379 380
		break;

381
	default:
B
Byron Nikolaidis 已提交
382
		{ 
B
Byron Nikolaidis 已提交
383
		char option[64];
384
		conn->errormsg = "Unknown connect option (Set)";
385
		conn->errornumber = CONN_UNSUPPORTED_OPTION;
386
		sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
B
Byron Nikolaidis 已提交
387
		CC_log_error(func, option, conn);
388
		return SQL_ERROR;
B
Byron Nikolaidis 已提交
389
		}
390 391

	}    
392 393 394 395 396 397 398 399

	if (changed) {
		conn->errornumber = CONN_OPTION_VALUE_CHANGED;
		conn->errormsg = "Requested value changed.";
		return SQL_SUCCESS_WITH_INFO;
	}
	else
		return SQL_SUCCESS;
400 401
}

B
Bruce Momjian 已提交
402
/*      -       -       -       -       -       -       -       -       - */
403

404 405 406 407 408 409
/* This function just can tell you whether you are in Autcommit mode or not */
RETCODE SQL_API SQLGetConnectOption(
        HDBC    hdbc,
        UWORD   fOption,
        PTR     pvParam)
{
410
static char *func="SQLGetConnectOption";
411 412
ConnectionClass *conn = (ConnectionClass *) hdbc;

413 414
	mylog("%s: entering...\n", func);

B
Byron Nikolaidis 已提交
415 416
	if (! conn)  {
		CC_log_error(func, "", NULL);
417
		return SQL_INVALID_HANDLE;
B
Byron Nikolaidis 已提交
418
	}
419 420

	switch (fOption) {
421 422 423 424
	case SQL_ACCESS_MODE:/* NOT SUPPORTED */
		*((UDWORD *) pvParam) = SQL_MODE_READ_WRITE;
		break;

425 426 427 428 429
	case SQL_AUTOCOMMIT:
		*((UDWORD *)pvParam) = (UDWORD)( CC_is_in_autocommit(conn) ?
						SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF);
		break;

430
	case SQL_CURRENT_QUALIFIER:	/* don't use qualifiers */
431 432 433 434 435
		if(pvParam)
			strcpy(pvParam, "");

		break;

436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460
	case SQL_LOGIN_TIMEOUT: /* NOT SUPPORTED */
		*((UDWORD *) pvParam) = 0;
		break;

	case SQL_PACKET_SIZE: /* NOT SUPPORTED */
		*((UDWORD *) pvParam) = globals.socket_buffersize;
		break;

	case SQL_QUIET_MODE:/* NOT SUPPORTED */
		*((UDWORD *) pvParam) = (UDWORD) NULL;
		break;

	case SQL_TXN_ISOLATION:/* NOT SUPPORTED */
		*((UDWORD *) pvParam) = SQL_TXN_SERIALIZABLE;
		break;

	/*	These options should be handled by driver manager */
	case SQL_ODBC_CURSORS:
	case SQL_OPT_TRACE:
	case SQL_OPT_TRACEFILE:
	case SQL_TRANSLATE_DLL:
	case SQL_TRANSLATE_OPTION:
		CC_log_error(func, "This connect option (Get) is only used by the Driver Manager", conn);
		break;

461
	default:
B
Byron Nikolaidis 已提交
462
		{
B
Byron Nikolaidis 已提交
463
		char option[64];
464
		conn->errormsg = "Unknown connect option (Get)";
465
		conn->errornumber = CONN_UNSUPPORTED_OPTION;
B
Byron Nikolaidis 已提交
466 467
		sprintf(option, "fOption=%d", fOption);
		CC_log_error(func, option, conn);
468 469
		return SQL_ERROR;
		break;
B
Byron Nikolaidis 已提交
470
		}
471 472 473 474 475 476

	}    

	return SQL_SUCCESS;
}

B
Bruce Momjian 已提交
477
/*      -       -       -       -       -       -       -       -       - */
478

479 480 481 482 483
RETCODE SQL_API SQLSetStmtOption(
        HSTMT   hstmt,
        UWORD   fOption,
        UDWORD  vParam)
{
484
static char *func="SQLSetStmtOption";
485 486
StatementClass *stmt = (StatementClass *) hstmt;

487 488
	mylog("%s: entering...\n", func);

B
Bruce Momjian 已提交
489 490 491
	/* thought we could fake Access out by just returning SQL_SUCCESS */
	/* all the time, but it tries to set a huge value for SQL_MAX_LENGTH */
	/* and expects the driver to reduce it to the real value */
492

B
Byron Nikolaidis 已提交
493 494
	if( ! stmt) {
		SC_log_error(func, "", NULL);
495
		return SQL_INVALID_HANDLE;
B
Byron Nikolaidis 已提交
496
	}
497

498
	return set_statement_option(NULL, stmt, fOption, vParam);
499 500
}

501

B
Bruce Momjian 已提交
502
/*      -       -       -       -       -       -       -       -       - */
503 504 505 506 507 508

RETCODE SQL_API SQLGetStmtOption(
        HSTMT   hstmt,
        UWORD   fOption,
        PTR     pvParam)
{
509
static char *func="SQLGetStmtOption";
510
StatementClass *stmt = (StatementClass *) hstmt;
511
QResultClass *res;
512

513 514
	mylog("%s: entering...\n", func);

B
Bruce Momjian 已提交
515 516 517
	/* thought we could fake Access out by just returning SQL_SUCCESS */
	/* all the time, but it tries to set a huge value for SQL_MAX_LENGTH */
	/* and expects the driver to reduce it to the real value */
518

B
Byron Nikolaidis 已提交
519 520
	if( ! stmt) {
		SC_log_error(func, "", NULL);
521
		return SQL_INVALID_HANDLE;
B
Byron Nikolaidis 已提交
522
	}
523 524

	switch(fOption) {
525
	case SQL_GET_BOOKMARK:
526
	case SQL_ROW_NUMBER:
527 528 529 530

		res = stmt->result;

		if ( stmt->manual_result || ! globals.use_declarefetch) {
B
Bruce Momjian 已提交
531
			/* make sure we're positioned on a valid row */
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
			if((stmt->currTuple < 0) ||
			   (stmt->currTuple >= QR_get_num_tuples(res))) {
				stmt->errormsg = "Not positioned on a valid row.";
				stmt->errornumber = STMT_INVALID_CURSOR_STATE_ERROR;
				SC_log_error(func, "", stmt);
				return SQL_ERROR;
			}
		}
		else {
			if (stmt->currTuple == -1 || ! res || ! res->tupleField) {
				stmt->errormsg = "Not positioned on a valid row.";
				stmt->errornumber = STMT_INVALID_CURSOR_STATE_ERROR;
				SC_log_error(func, "", stmt);
				return SQL_ERROR;
			}
		}

		if (fOption == SQL_GET_BOOKMARK && stmt->options.use_bookmarks == SQL_UB_OFF) {
			stmt->errormsg = "Operation invalid because use bookmarks not enabled.";
			stmt->errornumber = STMT_OPERATION_INVALID;
			SC_log_error(func, "", stmt);
			return SQL_ERROR;
		}

		*((UDWORD *) pvParam) = SC_get_bookmark(stmt);
		
558
		break;
559

560 561
	case SQL_ASYNC_ENABLE:	/* NOT SUPPORTED */
		*((SDWORD *) pvParam) = SQL_ASYNC_ENABLE_OFF;
562
		break;
563

564 565
	case SQL_BIND_TYPE:
		*((SDWORD *) pvParam) = stmt->options.bind_size;
566 567
		break;

568 569 570 571 572 573 574 575 576 577 578
	case SQL_CONCURRENCY: /* NOT REALLY SUPPORTED */
		mylog("GetStmtOption(): SQL_CONCURRENCY\n");
		*((SDWORD *)pvParam) = stmt->options.scroll_concurrency;
		break;

	case SQL_CURSOR_TYPE: /* PARTIAL SUPPORT */
		mylog("GetStmtOption(): SQL_CURSOR_TYPE\n");
		*((SDWORD *)pvParam) = stmt->options.cursor_type;
		break;

	case SQL_KEYSET_SIZE: /* NOT SUPPORTED, but saved */
579
		mylog("GetStmtOption(): SQL_KEYSET_SIZE\n");
580
		*((SDWORD *)pvParam) = stmt->options.keyset_size;
581 582
		break;

583 584
	case SQL_MAX_LENGTH: /* NOT SUPPORTED, but saved */
		*((SDWORD *)pvParam) = stmt->options.maxLength;
585 586
		break;

587 588 589
	case SQL_MAX_ROWS: /* NOT SUPPORTED, but saved */
		*((SDWORD *)pvParam) = stmt->options.maxRows;
		mylog("GetSmtOption: MAX_ROWS, returning %d\n", stmt->options.maxRows);
590 591
		break;

592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611
	case SQL_NOSCAN:/* NOT SUPPORTED */
		*((SDWORD *) pvParam) = SQL_NOSCAN_ON;
		break;

	case SQL_QUERY_TIMEOUT: /* NOT SUPPORTED */
		*((SDWORD *) pvParam) = 0;
		break;

	case SQL_RETRIEVE_DATA: /* NOT SUPPORTED, but saved */
		*((SDWORD *) pvParam) = stmt->options.retrieve_data;
		break;

	case SQL_ROWSET_SIZE:
		*((SDWORD *) pvParam) = stmt->options.rowset_size;
		break;

	case SQL_SIMULATE_CURSOR:/* NOT SUPPORTED */
		*((SDWORD *) pvParam) = SQL_SC_NON_UNIQUE;
		break;

612 613
	case SQL_USE_BOOKMARKS:
		*((SDWORD *) pvParam) = stmt->options.use_bookmarks;
614
		break;
615 616

	default:
B
Byron Nikolaidis 已提交
617
		{
B
Byron Nikolaidis 已提交
618
		char option[64];
619
		stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
620
		stmt->errormsg = "Unknown statement option (Get)";
B
Byron Nikolaidis 已提交
621 622
		sprintf(option, "fOption=%d", fOption);
		SC_log_error(func, option, stmt);
623
		return SQL_ERROR;
B
Byron Nikolaidis 已提交
624
		}
625 626 627
	}

	return SQL_SUCCESS;
628 629
}

B
Bruce Momjian 已提交
630
/*      -       -       -       -       -       -       -       -       - */