403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/man/man3/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/man/man3/mysql_autocommit.3
.\" Automatically generated by Pandoc 3.5
.\"
.TH "mysql_autocommit" "3" "" "Version 3.3" "MariaDB Connector/C"
.SS Name
mysql_autocommit \- Toggles autocommit mode
.SS Synopsis
.IP
.EX
#include \f[B]<mysql.h>\f[R]

my_bool mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
.EE
.SS Description
Toggles autocommit mode on or off for the current database connection.
Autocommit mode will be set if mode=1 or unset if mode=0.
.SS Parameters:
.IP \[bu] 2
\f[CR]mysql\f[R] is a connection identifier, which was previously
allocated by \f[B]mysql_init(3)\f[R] and connected by
\f[B]mysql_real_connect(3)\f[R].
.IP \[bu] 2
\f[CR]auto_mode\f[R] \- whether to turn autocommit on or not.
.SS Notes
.IP \[bu] 2
Autocommit mode only affects operations on transactional table types.
To determine the current state of autocommit mode use the SQL command
\f[CR]SELECT \[at]\[at]autocommit\f[R] or check the server status (see
example below).
.IP \[bu] 2
Be aware: the [mysql_rollback()}(mysql_rollback() function will not work
if autocommit mode is switched on.
.SS Examples
.SS SQL
.IP
.EX
# Turn \f[B]off\f[R] autocommit
\f[B]SET\f[R] AUTOCOMMIT=0;

# Retrieve autocommit
\f[B]SELECT\f[R] \[at]\[at]autocommit;
+\f[I]\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\f[R]
| \[at]\[at]autocommit |
+\f[I]\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\f[R]
|            0 |
+\f[I]\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\f[R]
.EE
.SS MariaDB Connector/C
.IP
.EX
static int test_autocommit(MYSQL *mysql)
{
  int rc;
  unsigned int server_status;
  
  \f[I]/* Turn autocommit off */\f[R]
  rc= mysql_autocommit(mysql, 0);
  \f[B]if\f[R] (rc)
    \f[B]return\f[R] rc; \f[I]/* Error */\f[R]

  \f[I]/* If autocommit = 0 succeeded, the last OK packet updated the server status */\f[R]
  rc= mariadb_get_infov(mysql, MARIADB_CONNECTION_SERVER_STATUS, &server_status);
  \f[B]if\f[R] (rc)
    \f[B]return\f[R] rc; \f[I]/* Error */\f[R]

  \f[B]if\f[R] (server_status & SERVER_STATUS_AUTOCOMMIT)
  {
    printf(\[dq]Error: autocommit is on\[rs]n\[dq]);
    \f[B]return\f[R] 1;
  }
  printf(\[dq]OK: autocommit is off\[rs]n\[dq]);
  \f[B]return\f[R] 0;
}
.EE

Youez - 2016 - github.com/yon3zu
LinuXploit