truncar
Con ftruncate, el fichero debe estar abierto para escritura; con truncate, el fichero debe ser escribible. | With ftruncate(), the file must be open for writing; with truncate(), the file must be writable. |
Las funciones truncate y ftruncate hacen que el fichero regular cuyo nombre es path o que es referenciado por fd sea truncado a un tamaño de length bytes. | The truncate() and ftruncate() functions cause the regular file named by path or referenced by fd to be truncated to a size of precisely length bytes. |
Por defecto, esta señal termina el proceso, pero un proceso puede atrapar esta señal en su lugar, en cuyo caso la llamada al sistema relevante (p.e., write (), truncate ()) falla con el error EFBIG. | By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g., write (2), truncate (2)) fails with the error EFBIG. |
Para sistemas no conformes con XSI, el estándar POSIX permite dos comportamientos para ftruncate cuando length excede la longitud del fichero (observe que truncate no está especificada en absoluto en tales condiciones): bien devolver un error o extender el fichero. | For non-XSI-compliant systems, the POSIX standard allows two behaviors for ftruncate () when length exceeds the file length (note that truncate () is not specified at all in such an environment): either returning an error, or extending the file. |
Errores Corregidos:- InnoDB: TRUNCATE TABLE operación en una tabla temporal planteado una afirmación. | Bugs Fixed:- InnoDB: A TRUNCATE TABLE operation on a temporary table raised an assertion. |
Así, conociendo las ventajas de TRUNCATE DELETE más, la mayoría de los desarrolladores prefieren utilizar DELETE. | Thus knowing the advantages of DELETE over TRUNCATE, most developers prefer to use DELETE. |
Truncate Subject to (chars): – Puede especificar cuánto tiempo podría ser el nombre del archivo exportado correo electrónico. | Truncate Subject to (chars):–You may specify how long the exported email file name could be. |
Nota: el concepto y funcionamiento de este comando es similar al del comando SQL TRUNCATE (TABLA). | Note: The concept and functioning of this command is similar to that of the SQL TRUNCATE (TABLE) command. |
Si tabla ya está vacía, TRUNCATE TABLE no hace nada y la variable OK toma el valor 1. | If aTable is already empty, TRUNCATE TABLE does nothing and sets the OK variable to 1. |
De acuerdo con este valor, procedimiento restablece el valor de inicialización de campos de identidad al llamar comando TRUNCATE. | According to this value, procedure resets the SEED value of identity fields while calling TRUNCATE command. |
En este caso, en primer lugar tenemos que desactivar todos los controles y factores desencadenantes de la mesa y luego llamar a DELETE o TRUNCATE sintaxis. | In this case, first of all we have to disable all CHECKs and TRIGGERs for that table and then call DELETE or TRUNCATE syntax. |
En el procedimiento anterior tenemos que pasar un valor de bit (es decir, 0 ó 1) que se utiliza para saber si se pide DELETE o TRUNCATE. | In the above procedure we need to pass a bit value (i.e. 0 or 1) which is used to know whether it is called for DELETE or TRUNCATE. |
Esto se puede hacer fácilmente si DELETE o TRUNCATE TABLE no tiene una relación de clave externa. | It can be easily done if DELETE or TRUNCATE table doesn't has a foreign key relationship. |
Palabra al azar
¡Tirar los dados y aprender una palabra nueva ahora!
¿Quieres aprender inglés?
¡Aprende inglés gratis!